How innocentqqq/forge-backend works
Forge is a 3D-printing marketplace with a mobile customer app, provider dashboard, and API. Customers discover printers and models, submit print settings and an order, then track its status; providers onboard, manage printer/provider details, and update orders. The API also supports profiles, saved providers, authentication checks, and pricing. Edges reflect README capabilities and sampled calls; some route wiring and persistence beyond shown excerpts are documented or unsampled, so those links are omitted or marked unverified.
Main entry points: api.ts API client · app.ts API application · supabase.ts Supabase data · app Marketplace screens
Components 23
Mobile app
- Marketplace screens
apps/mobile/app - Sign-in screens
apps/mobile/app/(auth) - Provider dashboard
apps/mobile/app/(tabs)/provider.tsx - Order detail
apps/mobile/app/order/[id].tsx - Provider order
apps/mobile/app/provider-order/[id].tsx - API client
apps/mobile/lib/api.ts - Auth client
apps/mobile/lib/auth.tsx - OAuth flow
apps/mobile/lib/oauth.ts - UI components
apps/mobile/components/ui.tsx
API and identity
- API application
apps/api/src/app.ts - Authentication
apps/api/src/middleware/auth.ts - OAuth account check
apps/api/src/modules/auth/auth.controller.ts - Supabase data
apps/api/src/config/supabase.ts
Marketplace operations
- Model processing
apps/api/src/modules/models/models.controller.ts - Printer catalog
apps/api/src/modules/printers/printers.controller.ts - Order lifecycle
apps/api/src/modules/orders/orders.controller.ts - Print pricing
apps/api/src/modules/pricing/pricing.service.ts - Profiles
apps/api/src/modules/profile/profile.service.ts - Provider management
apps/api/src/modules/providers/providers.service.ts
Shared contract
- API contract types
packages/types/src/index.ts
Other components
- Customer
- Print provider
- Supabase Auth
Connections 24
- Customer → Marketplace screens: uses
- Print provider → Provider dashboard: uses
- Marketplace screens → API client: requests
apps/mobile/app/(tabs)/index.tsx - Marketplace screens → UI components: renders
apps/mobile/app/(tabs)/index.tsx - Sign-in screens → Auth client: authenticates
- Auth client → OAuth flow: delegates to
apps/mobile/lib/auth.tsx - OAuth flow → API client: checks account
apps/mobile/lib/oauth.ts - Order detail → API client: requests
apps/mobile/app/order/[id].tsx - Provider order → API client: requests
apps/mobile/app/provider-order/[id].tsx - Provider dashboard → API client: requests
- API client → API application: HTTP requests
apps/mobile/lib/api.ts - API client → API contract types: uses types
- API application → Authentication: registers middleware
- API application → Order lifecycle: routes requests
- API application → Printer catalog: routes requests
- API application → Model processing: routes requests
- Order lifecycle → Print pricing: estimates price
apps/api/src/modules/orders/orders.controller.ts - Order lifecycle → Supabase data: reads and writes
apps/api/src/modules/orders/orders.controller.ts - Provider management → Supabase data: reads and writes
apps/api/src/modules/providers/providers.service.ts - Profiles → Supabase data: reads and writes
apps/api/src/modules/profile/profile.service.ts - Authentication → Supabase data: validates token
apps/api/src/middleware/auth.ts - OAuth account check → Supabase Auth: checks or deletes
apps/api/src/modules/auth/auth.controller.ts - OAuth account check → Authentication: gets user
apps/api/src/modules/auth/auth.controller.ts - Provider management → API contract types: uses contract