How hardik-sharma-1005/punarchakra works
PunarChakra is a role-based C&D waste recovery marketplace. Its main workflow runs from generator listings through collector pickup and processor takeover to completion, with admin approval gating account access. The dashboard coordinates role-specific views; auth helpers and Supabase server access provide an internal access/data layer. The graph also preserves the landing-page capabilities and future aggregation concept. Some dashboard and processor implementations were not sampled, so their links rely on README statements or indexed references rather than inspected implementation details.
Main entry points: server.ts Supabase server client · page.tsx Role dashboard · processor-discovery.tsx Processor discovery and tracking · get-approved-profile.ts Approved-role check
Components 25
Product experience
- Marketplace landing
app/page.tsx - Recovery overview
components/sections/how-it-works.tsx - Matching explainer
components/sections/economics.tsx - Load aggregation concept
components/sections/aggregation.tsx - Status updates
components/sections/verification.tsx
Identity and approval
- Sign-in entry
components/site/auth-modal.tsx - Login
app/login/page.tsx - Role registration
app/register/page.tsx - Auth actions
lib/auth/actions.ts - Current profile
lib/auth/get-current-profile.ts - Approved-role check
lib/auth/get-approved-profile.ts - Admin approval
app/dashboard/admin-approval-panel.tsx
Recovery workflow
- Role dashboard
app/dashboard/page.tsx - Create listing
app/dashboard/generator-waste-listing-form.tsx - Listing operations
lib/listings/actions.ts - Collector discovery and tracking
app/dashboard/collector-discovery.tsx - Collector recovery services
lib/collector/discovery.ts - Collector active recoveries
lib/collector/active-recoveries.ts - Processor discovery and tracking
app/dashboard/processor-discovery.tsx - Processor operations
lib/processor/actions.ts - Processor active recoveries
lib/processor/active-recoveries.ts - Recovery transactions
lib/collector/transaction-actions.ts
Data services
- Supabase server client
lib/supabase/server.ts - Supabase auth and database
Other components
- Platform user
Connections 42
- Platform user → Marketplace landing: browses
app/page.tsx - Marketplace landing → Recovery overview: renders
app/page.tsx - Marketplace landing → Matching explainer: renders
app/page.tsx - Marketplace landing → Load aggregation concept: renders
app/page.tsx - Marketplace landing → Status updates: renders
app/page.tsx - Platform user → Sign-in entry: starts access
- Sign-in entry → Login: opens login
- Sign-in entry → Role registration: opens registration
- Login → Auth actions: submits credentials
app/login/page.tsx - Role registration → Auth actions: submits registration
app/register/page.tsx - Auth actions → Supabase server client: uses client
lib/auth/actions.ts - Auth actions → Current profile: checks profile
lib/auth/actions.ts - Current profile → Supabase server client: reads account
lib/auth/get-current-profile.ts - Current profile → Supabase auth and database: reads profile
lib/auth/get-current-profile.ts - Approved-role check → Current profile: checks approval
lib/auth/get-approved-profile.ts - Auth actions → Admin approval: updates approval
lib/auth/actions.ts - Platform user → Role dashboard: uses workspace
README.md - Role dashboard → Create listing: renders
app/dashboard/page.tsx - Create listing → Listing operations: submits listing
app/dashboard/generator-waste-listing-form.tsx - Listing operations → Approved-role check: checks role
lib/listings/actions.ts - Listing operations → Supabase server client: uses client
lib/listings/actions.ts - Role dashboard → Collector discovery and tracking: renders
app/dashboard/page.tsx - Role dashboard → Collector recovery services: loads opportunities
app/dashboard/page.tsx - Role dashboard → Collector active recoveries: loads active work
app/dashboard/page.tsx - Collector recovery services → Approved-role check: checks role
lib/collector/discovery.ts - Collector recovery services → Supabase server client: queries listings
lib/collector/discovery.ts - Collector active recoveries → Approved-role check: checks role
lib/collector/active-recoveries.ts - Collector active recoveries → Supabase server client: reads recoveries
lib/collector/active-recoveries.ts - Collector discovery and tracking → Recovery transactions: accepts recovery
app/dashboard/collector-discovery.tsx - Role dashboard → Processor discovery and tracking: renders
app/dashboard/page.tsx - Processor discovery and tracking → Processor operations: uses operations
- Processor discovery and tracking → Processor active recoveries: tracks recovery
- Processor operations → Approved-role check: checks role
lib/processor/actions.ts - Processor operations → Supabase server client: uses client
lib/processor/actions.ts - Processor active recoveries → Approved-role check: checks role
lib/processor/active-recoveries.ts - Processor active recoveries → Supabase server client: reads recoveries
lib/processor/active-recoveries.ts - Collector discovery and tracking → Processor discovery and tracking: hands off material
README.md - Processor discovery and tracking → Recovery transactions: advances status
- Recovery transactions → Supabase auth and database: updates lifecycle
README.md - Supabase server client → Supabase auth and database: connects
README.md - Create listing → Collector discovery and tracking: lists then matches
README.md - Processor discovery and tracking → Role dashboard: reports completion
README.md