How codesagarrr/celebare-project-01 works
This is a Next.js photo-ordering and UPI-payment application: guests choose event photos, create an order, pay through a QR/link, and wait for bank-email processing to confirm payment and unlock photo links. The graph also preserves photographer setup, dashboard, and payment-ingestion capabilities. Relationship evidence is limited to the supplied excerpts and SOURCE INDEX; unsampled route and page behavior is not expanded beyond what those references support.
Main entry points: db.ts Database client · route.ts Order endpoints · PhotoGrid.tsx Photo selection · PaymentStatus.tsx Payment status
Components 24
Guest experience
- Photo storefront
src/app/page.tsx - Photo selection
src/components/PhotoGrid.tsx - Checkout page
src/app/pay/[orderId]/page.tsx - Payment status
src/components/PaymentStatus.tsx - Expiry countdown
src/components/Countdown.tsx - Client API helpers
src/lib/api.ts - Operations dashboard
src/app/dashboard/page.tsx
Orders and payments
- Photographer setup
src/app/api/photographers/route.ts - Order endpoints
src/app/api/orders/route.ts - Order status endpoint
src/app/api/orders/[id]/route.ts - Order photo endpoint
src/app/api/orders/[id]/photos/route.ts - Order rules
src/lib/orders.ts - UPI link and QR
src/lib/upi.ts
Bank email ingestion
- Email ingest endpoint
src/app/api/ingest/route.ts - Email verification
src/lib/ingest/verify.ts - Bank parser dispatch
src/lib/ingest/parsers/index.ts - Bank A parser
src/lib/ingest/parsers/fakebank-a.ts - Bank B parser
src/lib/ingest/parsers/fakebank-b.ts - Payment matching
src/lib/ingest/match.ts
Persistence and operations
- Event endpoint
src/app/api/events/route.ts - Database client
src/lib/db.ts - Application database
prisma/schema.prisma - Email worker
worker/email-worker.ts
Other components
- Guest
Connections 26
- Guest → Photo selection: selects photos
src/components/PhotoGrid.tsx - Photo storefront → Photo selection: renders
src/app/page.tsx - Photo selection → Order endpoints: creates order
src/components/PhotoGrid.tsx - Photo selection → Checkout page: opens checkout
src/components/PhotoGrid.tsx - Checkout page → Payment status: renders
src/app/pay/[orderId]/page.tsx - Payment status → Expiry countdown: renders
src/components/PaymentStatus.tsx - Payment status → Client API helpers: polls through
src/components/PaymentStatus.tsx - Operations dashboard → Database client: reads
src/app/dashboard/page.tsx - Operations dashboard → Payment status: uses status UI
src/app/dashboard/page.tsx - Photographer setup → Database client: reads and writes
src/app/api/photographers/route.ts - Order endpoints → Database client: reads and writes
src/app/api/orders/route.ts - Order endpoints → Order rules: chooses amount
src/app/api/orders/route.ts - Order endpoints → UPI link and QR: builds checkout QR
src/app/api/orders/route.ts - Order status endpoint → Database client: reads order
src/app/api/orders/[id]/route.ts - Order status endpoint → Order rules: computes status
src/app/api/orders/[id]/route.ts - Order status endpoint → UPI link and QR: builds checkout QR
src/app/api/orders/[id]/route.ts - Order photo endpoint → Database client: accesses photos
src/app/api/orders/[id]/photos/route.ts - Event endpoint → Database client: accesses events
src/app/api/events/route.ts - Email ingest endpoint → Database client: records delivery
src/app/api/ingest/route.ts - Email ingest endpoint → Email verification: verifies email
src/app/api/ingest/route.ts - Email ingest endpoint → Payment matching: matches transaction
src/app/api/ingest/route.ts - Email verification → Bank parser dispatch: parses bank email
src/lib/ingest/verify.ts - Bank parser dispatch → Bank A parser: dispatches
src/lib/ingest/parsers/index.ts - Bank parser dispatch → Bank B parser: dispatches
src/lib/ingest/parsers/index.ts - Payment matching → Database client: matches and updates
src/lib/ingest/match.ts - Database client → Application database: persists data