Ultra-fast grocery delivery platform β groceries in 10 minutes.
Built with Next.js 15, TypeScript, Prisma, PostgreSQL, Razorpay, Socket.io, and Tailwind CSS in a Turborepo monorepo.
π START_HERE.md - Complete navigation guide to all documentation
Quick Links:
- π Quick Start Guide - Get running in 5 minutes
- π§ Run Separately Guide - Run backend/frontend independently
- β Backend/Frontend Separation - Proof they're separated
- ποΈ Architecture Guide - System design & diagrams
- π Project Overview - Visual overview
freshin10/
βββ apps/
β βββ web/ # Customer frontend (Next.js 15) β port 3000
β βββ admin/ # Admin dashboard (Next.js 15) β port 3001
β βββ delivery/ # Delivery partner app (Next.js 15) β port 3002
β βββ api/ # Backend API (Express + Socket.io) β port 3003
βββ packages/
β βββ ui/ # Shared UI components
β βββ utils/ # Shared utilities, validators, constants
βββ .env.example
βββ turbo.json
| Layer | Technology |
|---|---|
| Frontend | Next.js 15 (App Router), TypeScript, Tailwind CSS |
| State | Zustand |
| Animations | Framer Motion |
| Backend | Express.js, TypeScript |
| Database | PostgreSQL + Prisma ORM |
| Auth | JWT (access + refresh tokens) |
| Payments | Razorpay |
| Real-time | Socket.io |
| Monorepo | Turborepo |
- Install dependencies:
npm install - Setup database: Double-click
setup-database.bat - Start everything: Double-click
start-all.bat - Open browser: http://localhost:3000
Or start apps separately:
- Backend:
start-backend.bat - Customer App:
start-frontend-web.bat - Admin Dashboard:
start-frontend-admin.bat - Delivery App:
start-frontend-delivery.bat
-
Install dependencies:
npm install
-
Setup environment:
cp .env apps/api/.env # Edit apps/api/.env with your values -
Setup database:
cd apps/api npm run db:generate npm run db:push npm run db:seed -
Start development:
# From root directory npm run dev
- β‘ Quick Start: See
QUICK_START.md- Get running in 5 minutes - π§ Run Separately: See
RUN_SEPARATELY.md- Run backend/frontend independently - ποΈ Architecture: See
ARCHITECTURE.md- Understand the system design
| Role | Password | |
|---|---|---|
| Admin | admin@freshin10.com | Admin@123 |
POST /api/auth/register
POST /api/auth/login
POST /api/auth/refresh
POST /api/auth/logout
GET /api/auth/me
POST /api/auth/send-otp
GET /api/products
GET /api/products/search?q=
GET /api/products/featured
GET /api/products/trending
GET /api/products/:id
GET /api/cart
POST /api/cart/add
PUT /api/cart/update
DELETE /api/cart/remove/:productId
DELETE /api/cart/clear
POST /api/orders/create
GET /api/orders/history
GET /api/orders/track/:id
POST /api/orders/:id/cancel
POST /api/payment/create-order
POST /api/payment/verify
GET /api/admin/dashboard
GET /api/admin/products
POST /api/admin/products
PUT /api/admin/products/:id
GET /api/admin/orders
PUT /api/admin/orders/:id/status
GET /api/admin/users
POST /api/admin/coupons
- Connect your GitHub repo to Vercel
- Set root directory to
apps/web(orapps/admin) - Add environment variables
- Deploy
- Create a new Railway project
- Connect GitHub repo, set root to
apps/api - Add environment variables
- Railway auto-detects Node.js
- Create a Supabase project
- Copy the connection string to
DATABASE_URL - Run
npm run db:push
- π Premium homepage with hero, categories, offers, trending products
- π Real-time search with autocomplete
- π Cart with live updates + mobile sticky bar
- π³ Razorpay + COD + Wallet payments
- π Address management
- ποΈ Coupon system
- π¦ Order tracking with real-time updates
- β€οΈ Wishlist
- β Product reviews
- π Notifications
- π Revenue & orders analytics with charts
- π¦ Products CRUD with inventory management
- ποΈ Order management with status updates
- π₯ User management
- ποΈ Coupon management
β οΈ Low stock alerts- π Delivery partner management
- π± Mobile-optimized PWA
- π’ Online/Offline toggle
- π Active orders list
- β Pickup & delivery confirmation
- πΊοΈ Google Maps navigation
- π° Earnings dashboard
- π‘ Real-time location tracking
| Event | Direction | Description |
|---|---|---|
order:created |
Server β Customer | New order placed |
order:confirmed |
Server β Customer | Payment confirmed |
order:status |
Server β Customer | Status update |
order:delivered |
Server β Customer | Order delivered |
order:new |
Server β Admin | New order alert |
delivery:location |
Partner β Server | Location update |
MIT Β© FreshIn10