Khadok is a full-featured food ordering platform built for the Bangladesh market. It connects Consumers, Stakeholders (restaurant owners), Riders, and Admins in one ecosystem, offering delivery, pickup, and immersive dine-in experiences. Key differentiators include real-time logistics, 3D interior previews, AI recommendations, and multi-role dashboards.
Khadok streamlines every step of the ordering journey:
- Consumers browse nearby restaurants on an interactive map, place orders for delivery or pickup, book dine-in tables, and view 3D restaurant interiors before arriving.
- Stakeholders manage menus, pricing, table inventory, upload 360° interior tours, and monitor incoming orders in real time.
- Riders receive optimized delivery assignments, track their route, update deliveries via mobile, and view their performance dashboard.
- Admins oversee the entire system: user management, session auditing, analytics, and compliance.
Check the Features Page in the live demo for full details and screenshots.
- MapTiler + Leaflet.js
- Custom-styled tiled maps for desktop & mobile.
- Consumer location auto-detected; restaurants clustered by proximity.
- OSRM Integration
- Computes real-world driving routes and ETAs.
- Isochrone zones (“restaurants within 10 mins”) drawn dynamically.
- Geofencing
- Defines restaurant pickup zones.
- Triggers “order ready” notifications when rider enters geofence.
- Socket.io
- Live order-status updates (e.g. “Preparing → En Route → Delivered”).
- Two-way chat channel between consumer & rider.
- Browser Push Notifications
- Service Workers deliver status alerts even when the user’s tab is closed.
- SMS Alerts via bKash API
- Consumers opt-in to receive SMS confirmations and delivery arrival messages.
- Panolens.js
- Embed 360° panoramic tours of restaurant interiors.
- Allows consumers to virtually “look around” before booking tables.
- Three.js
- Renders interactive 3D models of table layouts.
- Consumers can select specific tables during booking.
- bKash Checkout Integration
- Secure mobile-wallet payments within the browser.
- Webhook support for payment confirmation & transaction logging.
- PDFKit
- On-the-fly generation of PDF receipts.
- Automated emailing of invoices via SMTP (e.g. SendGrid).
- Full-Text Search (PostgreSQL tsvector + Highlighting)
- Fast search across restaurant names, menu items, and reviews.
- Autocomplete suggestions as you type.
- Cache Layer (Redis)
- Caches popular search queries and top-selling menus to minimize DB load.
- Consumers
- Order history, favorite restaurants, saved payment methods.
- Stakeholders
- Live sales dashboard: orders per hour, busiest menu items, table occupancy heatmap.
- Riders
- Delivery performance metrics: average time, distance covered, on-time rate.
- Admins
- System-wide KPIs: active sessions, revenue trends, user growth.
- Session management: per-session logout, session expiry controls.
- PostgreSQL with TLS for encrypted in-transit data.
- bcrypt for password hashing.
- Helmet.js + CSP headers to mitigate XSS, clickjacking, and other attacks.
- Session Management
- Per-session tracking stored in PostgreSQL sessions table.
- Individual-session logout endpoint for greater security.
| Layer | Technology |
|---|---|
| Frontend | HTML5, CSS3, Vanilla JavaScript |
| Mapping | MapTiler (tiles), Leaflet.js, OSRM routing |
| 3D Tours | Panolens.js, Three.js |
| Backend | Node.js, Express.js |
| Real-Time | Socket.io |
| Payments | bKash API |
| Database | PostgreSQL (primary), Redis (cache) |
| Authentication | express-session |
| File Uploads | Multer |
| Environment | dotenv |
| PDF Generation | PDFKit |
| SendGrid / SMTP |
- Clone the repository
git clone https://github.com/IamSadik/khadok-2.0.git
- Navigate to the project directory
cd khadok-2.0 - Install dependencies
npm install
- Set up environment variables
Create a.envfile in the root directory and add the following variables:PORT=3000 DATABASE_URL=postgres://user:password@host:5432/database DB_HOST=your_database_host DB_USER=your_database_user DB_PASSWORD=your_database_password DB_PORT=5432 DB_NAME=your_database_name SESSION_SECRET=your_session_secret SESSION_NAME=your_session_name SESSION_LIFETIME=your_session_lifetime_in_ms BKASH_API_KEY=your_bkash_api_key SENDGRID_API_KEY=your_sendgrid_api_key MAPTILER_API_KEY=your_maptiler_api_key
- Start the development server
npm start