Skip to content

chatman-media/qr-asia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

138 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍽️ QR Menu Platform

Modern platform for creating digital menus for restaurants with QR codes

E2E Tests Lint Type Check Build Node.js Bun TypeScript Next.js

πŸ‡·πŸ‡Ί Русский | πŸ‡¬πŸ‡§ English


🌐 Production Deployment

API (Koyeb): https://fat-cherlyn-chatman-d593e748.koyeb.app

Web App (Vercel): https://qr-asia-web.vercel.app

Admin Panel (Vercel): https://qr-asia-admin.vercel.app

πŸ’‘ See PRODUCTION.md for detailed deployment info and monitoring links.


πŸ“‹ About the Project

QR Menu Platform is a full-featured digital menu management system for restaurants. The platform allows restaurant owners to easily create multilingual menus, generate QR codes, and track analytics.

✨ Key Features

  • 🌐 Multilingual Support: 5 languages (EN, TH, RU, CN, AR)
  • πŸ“± QR Codes: Generation with Vercel Blob Storage and scan tracking
  • πŸ–ΌοΈ Image Upload: Vercel Blob Storage + automatic resizing (4 versions)
  • πŸ“Š Full CRUD: Restaurants, categories, menu items
  • 🎨 Modern UI: Built with Next.js 16 + shadcn/ui + Tailwind CSS
  • ⚑ Fast Backend: Bun.js + PostgreSQL (25+ API endpoints)
  • πŸ” Security: JWT access tokens (1h) + refresh tokens (7d) with automatic rotation
  • πŸ“± Responsive Design: Sidebar navigation on desktop, mobile-first
  • βœ… Testing: E2E tests with Playwright (195 tests)
  • πŸš€ CI/CD: GitHub Actions with automated testing

πŸš€ Quick Start

Requirements

  • Bun 1.0+
  • PostgreSQL (or Neon database)
  • Vercel Blob Storage token (for image upload in production)

Installation

# Clone repository
git clone <repository-url>
cd qr-menu-platform

# Install dependencies
bun install

# Set up environment variables
cp apps/api/.env.example apps/api/.env
cp apps/admin/.env.example apps/admin/.env
cp apps/web/.env.example apps/web/.env

# Set up database
cd packages/database
bun run db:push
bun run db:seed

# Run all services
bun run dev

Access Applications

Test Credentials

Super Admin:
Email: superadmin@qr-menu.com
Password: password123

Admin:
Email: admin@qr-menu.com
Password: password123

Restaurant Owner:
Email: owner@example.com
Password: password123

πŸ“¦ Project Structure

qr-menu-platform/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/          # Next.js client application (port 3001)
β”‚   β”œβ”€β”€ admin/        # Next.js admin panel (port 3000)
β”‚   └── api/          # Bun.js API server (port 4004)
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ database/     # Prisma schema + migrations
β”‚   β”œβ”€β”€ ui/           # Reusable components
β”‚   β”œβ”€β”€ types/        # Shared TypeScript types
β”‚   └── utils/        # Utilities and helper functions
└── docs/
    β”œβ”€β”€ en/           # English documentation
    └── ru/           # Russian documentation

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 16.0.1 (App Router)
  • Library: React 19.2.0
  • Language: TypeScript 5.9.3
  • Styling: Tailwind CSS 4.0
  • UI Components: shadcn/ui (Radix UI)
  • Forms: React Hook Form + Zod 4.1
  • HTTP Client: Fetch API

Backend

  • Runtime: Bun.js 1.3.1
  • HTTP Server: Bun.serve()
  • Database: PostgreSQL (Neon with connection pooling)
  • ORM: Prisma 6.0+
  • Authentication: JWT access tokens (1h) + refresh tokens (7d) + SHA-256 hashing
  • Storage: Vercel Blob Storage with fallback to local storage
  • Image Processing: Sharp (4 versions: thumbnail, small, medium, large)
  • QR Codes: qrcode library with upload to Vercel Blob

πŸ“š Documentation

Detailed documentation is available in two languages:

Development Plan

🎯 Project Status

Version: MVP v1.0 Overall Progress: 100% βœ…

Completed βœ…

  • Backend API - 100% (25+ endpoints)
    • βœ… Refresh token authentication with automatic rotation
    • βœ… JWT access tokens (1h) + refresh tokens (7d)
    • βœ… Device tracking (userAgent, ipAddress)
    • βœ… Restaurant CRUD with moderation
    • βœ… Menu CRUD (categories + items)
    • βœ… Image upload (Vercel Blob + Sharp, 4 versions)
    • βœ… QR code generation with upload to Vercel Blob
    • βœ… Analytics tracking
  • Admin Panel - 100%
    • βœ… Login page with refresh token support
    • βœ… Dashboard with statistics
    • βœ… Restaurant management + moderation
    • βœ… Menu builder with drag & drop
    • βœ… Category and item management
    • βœ… Image upload (drag & drop, 5MB limit)
    • βœ… QR code generation and viewing
    • βœ… Analytics page
  • Client Web App - 100%
    • βœ… Menu display by slug
    • βœ… Sidebar navigation by categories (desktop)
    • βœ… Horizontal category scrolling (mobile)
    • βœ… Language switcher (EN, TH, RU, CN, AR)
    • βœ… "Home" button for navigation
    • βœ… Responsive design (mobile-first)
    • βœ… Menu item cards with images
  • Production Deployment - 100%
  • Testing - 100%
    • βœ… E2E tests (195 tests)
    • βœ… Linting/Formatting (Biome)
    • βœ… GitHub Actions CI
  • Documentation - 100%

Planned for v2.0 πŸ“…

  • Analytics dashboard with charts
  • Email notifications for owners
  • Rate limiting for API endpoints
  • Sentry error tracking
  • WebSocket real-time updates
  • PDF export for menus

πŸ§ͺ Testing

The project uses Playwright for E2E testing.

# Run all tests
bun test

# Run in UI mode
bun test:ui

# By category
bun test:api      # API tests
bun test:admin    # Admin panel tests
bun test:web      # Web app tests

Current Test Status: 195 tests

  • βœ… API tests: auth, restaurants, menu, upload, QR codes, analytics, dashboard, settings, admin access, public menu
  • βœ… Admin tests: login, register, restaurants, settings, QR codes
  • βœ… Web tests: menu, homepage

🎨 Linting and Formatting

The project uses Biome for code linting and formatting.

# Check code (linting + formatting + imports)
bun run check

# Auto-fix
bun run check:fix

# Format only
bun run format:write

# Lint only
bun run lint:fix

Overall Progress: 100% βœ… (Backend 100%, Frontend 100%, Tests 100%, Docs 100%, Production 100%)

🀝 Contributing

We welcome contributions! Please see Contributing Guide.

πŸ“„ License

MIT License - see LICENSE for details.

πŸ‘₯ Authors

Developed for restaurants in Thailand πŸ‡ΉπŸ‡­

πŸ“ž Support

If you have questions or issues:

  1. Check the documentation
  2. Create an issue on GitHub
  3. Contact support@example.com

Last Updated: 2025-11-05

New Features in v1.0:

  • ✨ Refresh token authentication with automatic rotation
  • 🌐 Arabic language support (5 languages)
  • πŸ“± Sidebar navigation for menu categories
  • 🏠 "Home" button for navigation
  • πŸš€ Production deployment with CI/CD

Made with ❀️ using Bun.js + Next.js 16

About

QR Asia - Menu platform (and other small businesses in Asia)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages