How adityakamble69/tiffin-hub works
Tiffin Hub is a homemade-food marketplace: customers discover kitchen plans and subscribe, while community NGOs accept meal sponsorships and volunteer requests. Kitchen owners manage plans and incoming orders; administrators verify organizations and oversee users and platform activity. The backend exposes the API and implements orders, payment, review, notification, and account behavior over Supabase, with optional Razorpay and email integrations. The README documents the user flows; several frontend pages and backend controllers were not sampled, so links between those layers are shown only where documentation or excerpts support them.
Main entry points: requests.service.js Orders and subscriptions · payments.service.js Payment processing · supabase.js Supabase database and auth · notifications.service.js Notifications
Components 27
Marketplace web
- Kitchen and plan discovery
frontend/app/providers/page.tsx - Subscription checkout
frontend/features/orders/Checkout.tsx - Order tracking
frontend/features/orders/OrderDetail.tsx - Kitchen workspace
frontend/features/kitchen/PlanManager.tsx - NGO support
frontend/features/ngo/SupportPanel.tsx - Admin console
frontend/features/admin/AdminConsole.tsx - API client
frontend/lib/api.ts
API and identity
- HTTP application
backend/src/app.js - API routes
backend/src/routes/index.js - Request controllers
backend/src/controllers/index.js - Authentication
backend/src/middleware/auth.js - User profiles
backend/src/services/profiles.service.js
Orders and payments
- Orders and subscriptions
backend/src/services/requests.service.js - Payment processing
backend/src/services/payments.service.js - Razorpay gateway
- Kitchen reviews
backend/src/services/reviews.service.js
Organizations and community
- Kitchens and NGOs
backend/src/services/organizations.service.js - Kitchen plans
backend/src/services/plans.service.js
Platform services
- Supabase database and auth
backend/src/config/supabase.js - Notifications
backend/src/services/notifications.service.js - Email delivery
backend/src/services/email.service.js - Audit logging
backend/src/services/audit.service.js - Runtime configuration
backend/src/config/env.js - Database helpers
backend/src/utils/db.js
Other components
- Customer
- Kitchen owner
- Administrator
Connections 29
- Customer → Kitchen and plan discovery: browses kitchens
- Kitchen and plan discovery → Subscription checkout: chooses a plan
- Customer → Subscription checkout: subscribes
- Customer → Order tracking: tracks order
- Kitchen owner → Kitchen workspace: manages plans
- Kitchen owner → Order tracking: manages incoming orders
- Customer → NGO support: sponsors meals
- Administrator → Admin console: reviews organizations
- API client → HTTP application: calls API
- HTTP application → API routes: mounts routes
backend/src/app.js - API routes → Request controllers: dispatches
backend/src/routes/index.js - API routes → Authentication: applies auth
backend/src/routes/index.js - Authentication → Supabase database and auth: validates token
backend/src/middleware/auth.js - Authentication → User profiles: resolves profile
backend/src/middleware/auth.js - Orders and subscriptions → Supabase database and auth: reads and writes
backend/src/services/requests.service.js - Orders and subscriptions → Notifications: notifies parties
backend/src/services/requests.service.js - Orders and subscriptions → Audit logging: records admin actions
backend/src/services/requests.service.js - Payment processing → Orders and subscriptions: loads order
backend/src/services/payments.service.js - Payment processing → Supabase database and auth: updates payment state
backend/src/services/payments.service.js - Payment processing → Razorpay gateway: creates and verifies payments
backend/src/services/payments.service.js - Payment processing → Notifications: notifies payment
backend/src/services/payments.service.js - Kitchen reviews → Orders and subscriptions: checks order
backend/src/services/reviews.service.js - Kitchen reviews → Notifications: notifies kitchen
backend/src/services/reviews.service.js - Notifications → Email delivery: sends email
backend/src/services/notifications.service.js - Notifications → Supabase database and auth: stores and reads
backend/src/services/notifications.service.js - User profiles → Supabase database and auth: reads and writes
backend/src/services/profiles.service.js - Runtime configuration → Supabase database and auth: configures client
backend/src/config/supabase.js - Orders and subscriptions → Database helpers: unwraps database results
backend/src/services/requests.service.js - Payment processing → Runtime configuration: reads gateway settings
backend/src/services/payments.service.js