Project Description
RoisFood is a SaaS platform that allows restaurants to manage orders, delivery with their own couriers, tables and kitchen from a single place. It includes a web dashboard for administrators, a mobile app for customers, waiters and drivers, all connected in real time via WebSockets.
Key Features
- Order management: Creation, tracking and real-time status updates
- Delivery with tracking: Driver assignment, GPS tracking with Mapbox and delivery proof with photo
- Waiter app: Kanban view of orders, table management and dine-in orders
- Driver app: Optimized routes, delivery accounting and live tracking
- Configurable menu: Items with modifiers, combos, ingredients and dynamic pricing
- Admin dashboard: Analytics, exportable reports to Excel, staff management
- Real-time chat: Communication between staff and customers
- Ticket printing: Integration with network printers via PrintNode
- Multi-tenant: Each restaurant is an independent organization with its own configuration
Technologies Used
- Next.js 15: Web dashboard with React 19 and Server Components
- React Native + Expo: Mobile app for customers, waiters and drivers
- Bun: Backend runtime, significantly faster than Node.js
- tRPC: End-to-end type-safe API between frontend and backend
- PostgreSQL 16 + Drizzle ORM: Relational database with automatic migrations
- Redis: Cache and WebSocket scaling between instances
- Clerk: Multi-tenant authentication with webhooks
- Mapbox GL: Maps, routes and ETA calculations for delivery
- Docker Compose + Caddy: Service orchestration with automatic HTTPS
- Turborepo: Monorepo with Bun workspaces
Architecture
Monorepo with Turborepo containing three applications:
- Web (Next.js): Admin dashboard with Radix UI and TanStack Table
- Mobile (Expo): Multi-role app (customer, waiter, driver) with Expo Router
- API (Bun + tRPC): Backend with layered architecture (Domain -> Use Cases -> Services -> Infrastructure)
Infrastructure
- AWS EC2 with Docker Compose
- Caddy as reverse proxy with automatic SSL and per-endpoint rate limiting
- CI/CD with git-based deploy, automatic migrations and health checks with rollback
- Resource limits per container to optimize costs on a single instance