How mallikarjun1520/impactledger works
ImpactLedger is an early-stage provenance API for organizations to record contributions, resource inventory, and relief distributions. The intended user workflow is to authenticate, act within an organization, record lifecycle events, and query resulting records; sampled code confirms organization membership and distribution/inventory behavior. The web page remains a Next.js starter, and README-listed passkeys, storage, blockchain anchoring, and LLM interaction are not evidenced as implemented here, so their runtime links are omitted.
Main entry points: main.py FastAPI app · organizations.py Organization routes · authorization.py Membership checks · auth.py JWT verification
Components 18
API entry
- FastAPI app
apps/api/app/main.py - Starter web page
apps/web/src/app/page.tsx - Health route
apps/api/app/api/v1/health.py
Identity and tenancy
- Auth routes
apps/api/app/api/v1/auth.py - JWT verification
apps/api/app/core/auth.py - Membership checks
apps/api/app/core/authorization.py - Supabase Auth
- Organization routes
apps/api/app/api/v1/organizations.py
Lifecycle records
- Contribution routes
apps/api/app/api/v1/contributions.py - Allocation routes
apps/api/app/api/v1/allocations.py - Resource routes
apps/api/app/api/v1/resources.py - Distribution routes
apps/api/app/api/v1/distributions.py
Persistence
- Membership data access
apps/api/app/infrastructure/database/organization_members.py - Organization data access
apps/api/app/infrastructure/database/organizations.py - Resource ledger access
apps/api/app/infrastructure/database/resources.py - Distribution and inventory
apps/api/app/infrastructure/database/distributions.py - Supabase PostgreSQL
supabase/migrations/001_create_organizations.sql
Other components
- API user
Connections 20
- API user → FastAPI app: sends requests
- FastAPI app → Auth routes: registers
- FastAPI app → Organization routes: registers
- FastAPI app → Distribution routes: registers
- FastAPI app → Health route: registers
- Auth routes → JWT verification: validates identity
- JWT verification → Supabase Auth: fetches signing keys
- Auth routes → Membership checks: checks membership
- Membership checks → JWT verification: resolves user
- Membership checks → Membership data access: looks up membership
- Organization routes → JWT verification: authenticates requests
- Organization routes → Membership checks: checks membership
- Organization routes → Membership data access: manages members
- Organization routes → Organization data access: reads and creates organizations
- Membership data access → Supabase PostgreSQL: reads and writes
- Organization data access → Supabase PostgreSQL: reads and writes
- Resource ledger access → Supabase PostgreSQL: reads and writes
- Distribution and inventory → Supabase PostgreSQL: reads and writes
- Distribution and inventory → Resource ledger access: records inventory event
- Starter web page → API user: displays starter page