αααΊααΎα Project: Next.js, PostgreSQL (Neon.tech), Vercel ααα―α·ααΌαα·αΊ αααΊαα±α¬ααΊαα¬αΈαα±α¬ Multi-Tenant QR Menu System
A modern, multi-tenant QR menu management system designed specifically for restaurants. Built with Next.js, featuring QR code generation, real-time menu management, order tracking, and mobile-friendly customer interfaces.
- Multi-Tenant Architecture - Manage multiple restaurants on one platform
- Authentication System - Secure login for restaurant staff and admins
- Menu Management - Full CRUD operations for categories and menu items
- Table Management - Create and manage restaurant tables with QR codes
- Order Management - Track and manage customer orders
- Out of Stock Control - Critical feature to mark menu items as unavailable
- QR Code Generation - Automatic QR code creation for each table
- Dashboard Analytics - View restaurant statistics and performance
- Mobile-Friendly Menu - Optimized for smartphone browsing
- QR Code Scanning - Easy access to menu via QR code
- Cart Management - Add/remove items, modify quantities
- Real-time Availability - See out-of-stock items marked clearly
- Order Placement - Send orders directly to restaurant
- Multi-language Support - Myanmar (Burmese) language support
- Framework: Next.js 16.x (App Router)
- Database: PostgreSQL via Neon.tech
- ORM: Prisma
- Authentication: NextAuth.js
- Styling: Tailwind CSS
- Language: TypeScript
- QR Codes: qrcode
- Deployment: Vercel
Before running this project, make sure you have:
- Node.js 18.x or higher
- npm, yarn, or pnpm package manager
- PostgreSQL database (Neon.tech recommended)
- Vercel account (for deployment)
git clone <repository-url>
cd qr-menu-saasnpm install
# or
yarn install
# or
pnpm installCreate a .env file in the root directory:
# Database
DATABASE_URL="postgresql://username:password@hostname:port/database"
# NextAuth.js
NEXTAUTH_SECRET="your-nextauth-secret-here"
NEXTAUTH_URL="http://localhost:3000"Database Setup with Neon.tech:
- Create account at Neon.tech
- Create a new project
- Copy the connection string
- Add to your
.envfile
# Generate Prisma client
npm run db:generate
# Run database migrations
npm run db:migrate
# Seed the database (optional)
npm run db:seednpm run devOpen http://localhost:3000 in your browser.
qr-menu-saas/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints
β β βββ categories/ # Category management
β β βββ menu-items/ # Menu item management
β β βββ tables/ # Table management
β β βββ public/ # Public endpoints
β βββ dashboard/ # Admin dashboard
β βββ login/ # Login page
β βββ menu/ # Customer menu pages
β βββ page.tsx # Landing page
βββ prisma/ # Database schema and migrations
β βββ schema.prisma # Database schema
β βββ migrations/ # Database migrations
β βββ seed.cjs # Database seeding
βββ scripts/ # Utility scripts
βββ types/ # TypeScript type definitions
βββ public/ # Static assets
The system uses a multi-tenant architecture with the following main models:
- Tenant - Restaurant/business information
- User - Restaurant staff and admin accounts
- Table - Restaurant tables with QR codes
- Category - Menu item categories
- MenuItem - Individual menu items with pricing
- Order - Customer orders
- OrderItem - Items within each order
- Multi-tenant data isolation
- Role-based access (ADMIN, STAFF)
- Out of stock management
- Order status tracking
- Cart persistence
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run db:generate # Generate Prisma client
npm run db:migrate # Run database migrations
npm run db:seed # Seed database with sample dataEach table generates a unique QR code containing:
https://yourdomain.com/menu/[tenantId]/[tableId]
- Each restaurant (tenant) has isolated data
- Users belong to specific tenants
- All queries are automatically filtered by tenant
- Support for multiple restaurants on one instance
- Admin visits
/login - Credentials verified against database
- JWT token created with tenant information
- Session established with NextAuth.js
- Redirected to
/dashboard
- Customer scans QR code β accesses menu
- Adds items to cart β places order
- Order appears in admin dashboard
- Admin updates order status
- Customer sees real-time updates
-
Connect Repository
# Push to GitHub git add . git commit -m "Initial commit" git push origin main
-
Deploy to Vercel
- Visit Vercel Dashboard
- Import your GitHub repository
- Configure environment variables
- Deploy
-
Environment Variables in Vercel
DATABASE_URL=your_postgres_connection_string NEXTAUTH_SECRET=your_secret_key NEXTAUTH_URL=https://your-domain.vercel.app
# Run migrations on production database
npx prisma migrate deploy- Password Hashing - bcryptjs for secure password storage
- JWT Authentication - Secure session management
- Role-Based Access - ADMIN and STAFF roles
- Multi-Tenant Isolation - Data separation between restaurants
- Input Validation - Server-side validation for all inputs
- SQL Injection Protection - Prisma ORM provides built-in protection
The system is fully responsive and optimized for:
- Admin Dashboard - Works on tablets and desktop
- Customer Menu - Optimized for mobile devices
- QR Code Scanning - Works with all modern smartphones
Currently supports:
- English - Default interface language
- Myanmar (Burmese) - User-facing text and descriptions
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Current development focuses on completing the core MVP features:
- Basic project setup with Next.js
- Database schema design and implementation
- Authentication system
- Admin dashboard structure
- Menu management (CRUD)
- Table management with QR generation
- Customer menu interface
- Order management system
- Cart functionality
- Real-time order updates
- Payment integration
- Analytics dashboard
- Multi-language expansion
- Mobile app
- Advanced reporting
- Order status updates need real-time functionality
- Mobile menu could use more responsive design improvements
- QR code generation could be optimized for faster loading
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js team for the amazing framework
- Prisma for the excellent ORM
- Tailwind CSS for the utility-first CSS framework
- Neon.tech for serverless PostgreSQL hosting
- Vercel for seamless deployment
For support and questions:
- Create an issue on GitHub
- Check the documentation in
/docs - Review the development roadmap
Built with β€οΈ for Myanmar restaurants
This README was generated on 2025-11-15. Last updated: 2025-11-15T13:12:44.618Z