Tiffly is a full-stack marketplace application connecting customers with local home-based tiffin providers. It streamlines the process of subscribing to daily meals, managing payments, and coordinating deliveries. The system consists of a mobile app (for Customers & Providers), a web admin panel, and a custom backend server.
| User Role | Features |
|---|---|
| Customer (Mobile) | • Browse "Approved" providers & search by cuisine/city. • View detailed 7-day Weekly Menus. • Subscribe to Weekly/Monthly plans via Stripe. • "Deliver Here" address bar & Profile management. • Pause/Resume subscriptions (with auto-renewal date extension). • Payment History with detailed receipts. • Rate & Review providers after purchase. • Notification Inbox with unread badge (Order updates, Menu changes). |
| Provider (Mobile) | • Multi-step Onboarding Form (Kitchen details, FSSAI, Image upload). • Daily Dashboard: See active deliveries for today with "Dispatch" button. • Menu Management: Create/Edit subscription plans & update Weekly Menu. • Earnings: View transaction history & calculated earnings (90% share). • Food Waste: Report leftover food for donation. • Receive push notifications for New Subscribers & Account Approval. |
| Admin (Web) | • Dashboard: Real-time analytics (Revenue, Active Subs) & Charts. • Provider Management: Approve/Reject applications; Suspend/Deactivate accounts. • Transactions: View full ledger & Platform Revenue (8% share). • Food Reports: Manage leftover food reports from providers. |
| Backend | • Stripe Connect (Simulated): Handles payments & webhooks. • Push Notifications: Triggers via Expo Push API. • Job Processing: Calculates ratings & revenue splits. |
- Frontend (Mobile): React Native, Expo, TypeScript, React Native Paper, React Navigation
- Frontend (Admin): React.js, TypeScript, Vite, Tailwind CSS, Recharts
- Backend: Node.js, Express.js, TypeScript
- Database & Auth: Google Firebase (Firestore, Authentication, Storage)
- Payments: Stripe Checkout
- Image Storage: Cloudinary
- Notifications: Expo Push Notifications
Ensure you have the following installed:
- Node.js (LTS Version) & npm
- Git
- Expo Go app on your physical Android/iOS device.
- Stripe CLI (for forwarding webhooks locally).
Follow these steps in order. Open your terminal in the folder where you want to store the project.
git clone [https://github.com/afsheen-pathan/Tiffly-Project.git](https://github.com/afsheen-pathan/Tiffly-Project.git)
cd Tiffly-Project
cd tiffly-mobile
npm install
cd ..cd tiffly-admin
npm install
cd ..cd local-backend
npm install
# Install specific packages required for this setup
npm install node-fetch@2
npm i --save-dev @types/node-fetch@2
cd ..Since this is a secure project, API keys are not included. You must create the following files manually.
Get keys from: Firebase Console > Project Settings > General > Web App.
Update File: tiffly-mobile/src/config/firebase.ts
Update File: tiffly-admin/src/config/firebase.ts
// Replace the placeholder object with your actual config
const firebaseConfig = {
apiKey: "...",
authDomain: "...",
projectId: "...",
storageBucket: "...",
messagingSenderId: "...",
appId: "..."
};Get key from: Firebase Console > Project Settings > Service Accounts > "Generate new private key".
Action:
Download the JSON file.
Rename it to serviceAccountKey.json.
Move it into the local-backend/ folder.
Why: Allows your phone to talk to your computer's server.
Find IP: Run ipconfig (Windows) or ifconfig (Mac) and copy your IPv4 Address (e.g., 192.168.1.10).
Update File: tiffly-mobile/src/config/api.ts
const LOCAL_IP_ADDRESS = 'YOUR_IPV4_ADDRESS'; // e.g. '192.168.1.10'Update File: local-backend/src/server.ts
// Find this line near the top
const YOUR_IP = 'YOUR_IPV4_ADDRESS';Update File: tiffly-admin/src/services/adminNotificationService.ts
const LOCAL_BACKEND_URL = 'http://YOUR_IPV4_ADDRESS:4242';Get keys from: Stripe Dashboard > Developers > API Keys.
Create File: local-backend/.env
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_... (Get this after running 'stripe listen')
PORT=4242Update File: tiffly-mobile/App.tsx
const STRIPE_PUBLISHABLE_KEY = "pk_test_...";Get keys from: Cloudinary Dashboard > Settings > Upload.
Update File: tiffly-mobile/src/services/imageService.ts
Update CLOUDINARY_CLOUD_NAME and CLOUDINARY_UPLOAD_PRESET.
Action: Run npx expo config --json inside tiffly-mobile to verify your ID.
Update File: tiffly-mobile/app.json
"extra": {
"eas": {
"projectId": "YOUR_EXPO_PROJECT_ID"
}
}You need 4 separate terminal windows running simultaneously.
cd local-backend
npm run devcd tiffly-admin
npm run dev# Forwards Stripe events to your local server
stripe listen --forward-to localhost:4242/webhookcd tiffly-mobile
npx expo start -c- Provider Signup:
(Mobile) Sign up as a Provider -> Fill Onboarding Form -> Submit.
- Admin Approval:
(Web) Log in -> "Pending Providers" -> Click "Approve".
(Check: Provider gets "Account Approved" notification).
- Provider Setup:
(Mobile) Log in -> "My Menu" -> Set Weekly Menu -> Add a Subscription Plan.
(Check: "Menu Updated" notification logic).
- Customer Subscription:
(Mobile) Log in as Customer -> Browse -> Tap Provider -> "Subscribe" -> Pay via Stripe.
(Check: Redirects to Success Page -> App shows Active Subscription).
(Check: Provider gets "New Subscriber" notification).
- Provider Dispatch:
(Mobile) Provider Dashboard -> Tap "Dispatch".
(Check: Customer gets "Tiffin on its way" notification).
- Review:
(Mobile) Customer Profile -> Payment History -> Tap "Rate".
(Check: Admin Panel shows updated average rating for Provider).