How krrish0704/dropforge works
DropForge combines a live-drop storefront and admin UI with a reservation engine for tenant-scoped sales. The backend workflow is sale creation and browsing, queue entry and turn assignment, stock reservation, then asynchronous payment and order persistence, with inventory rollback on failure. The frontend also has its own sales and queue APIs backed by a separate database layer; the excerpts do not establish how its storefront connects to those APIs or to the Python engine, so those links are omitted.
Main entry points: routes.py Sale and Queue Routes · tasks.py Turn and Payment Tasks · page.tsx Sales Admin · route.ts Sales API
Components 15
Storefront and Admin
- Sales Admin
frontend/app/admin/page.tsx - Storefront
frontend/components/dropforge-storefront.tsx - Queue Confirmation
frontend/app/queue/page.tsx
Frontend APIs
- Sales API
frontend/app/api/sales/route.ts - Queue API
frontend/app/api/queue/route.ts - Frontend Sales Store
frontend/lib/db.ts
Reservation Engine
- FastAPI App
backend/src/main.py - Sale and Queue Routes
backend/src/api/routes.py - Redis State
backend/src/core/redis.py - Tenant Database Access
backend/src/core/db.py
Async Processing
- Celery Configuration
backend/src/worker/celery_app.py - Turn and Payment Tasks
backend/src/worker/tasks.py
Other components
- Seller
- Buyer
- PostgreSQL
Connections 15
- Seller → Sales Admin: manages drops
- Sales Admin → Sales API: loads and creates
frontend/app/admin/page.tsx - Sales API → Frontend Sales Store: reads and writes
frontend/app/api/sales/route.ts - Queue API → Frontend Sales Store: looks up sales
frontend/app/api/queue/route.ts - Buyer → Storefront: browses drops
- FastAPI App → Sale and Queue Routes: mounts routes
backend/src/main.py - Seller → Sale and Queue Routes: creates sales
- Buyer → Sale and Queue Routes: joins and reserves
- Sale and Queue Routes → Redis State: checks and updates
backend/src/api/routes.py - Sale and Queue Routes → Tenant Database Access: queries sales
backend/src/api/routes.py - Sale and Queue Routes → Turn and Payment Tasks: dispatches payment
backend/src/api/routes.py - Turn and Payment Tasks → Celery Configuration: uses task app
backend/src/worker/tasks.py - Turn and Payment Tasks → Redis State: advances turns; rolls back stock
backend/src/worker/tasks.py - Tenant Database Access → PostgreSQL: opens sessions
- Turn and Payment Tasks → PostgreSQL: persists completed orders
backend/src/worker/tasks.py