FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
Pratham211
Pratham211canteen
Public
Like
canteen
Home
Code
4
backend
3
frontend
3
shared
1
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Settings
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://Pratham211--5274bfb83eef11f0b41a76b3cceeab13.web.val.run
README.md

College Canteen Management System

A modern web-based canteen management system with QR code ordering for college canteens.

Features

Customer Features

  • 📱 QR code scanning for table identification
  • 🍽️ Browse menu with categories and prices
  • 🛒 Add items to cart with quantity selection
  • 📝 Place orders with customer details
  • ⏱️ Real-time order status updates

Admin Features

  • 📊 Real-time order dashboard
  • 🍕 Menu management (add/edit/delete items)
  • 🪑 Table management with QR code generation
  • 📈 Order status management
  • 💰 Basic sales tracking

Technology Stack

  • Frontend: React 18 with TypeScript
  • Backend: Hono.js API framework
  • Database: SQLite for data persistence
  • Styling: TailwindCSS
  • QR Codes: QR code generation and scanning
  • Real-time: Polling-based updates

Project Structure

├── backend/
│   ├── database/
│   │   ├── migrations.ts    # Database schema setup
│   │   └── queries.ts       # Database query functions
│   ├── routes/
│   │   ├── admin.ts         # Admin panel routes
│   │   ├── menu.ts          # Menu management routes
│   │   ├── orders.ts        # Order management routes
│   │   └── tables.ts        # Table management routes
│   └── index.ts             # Main API entry point
├── frontend/
│   ├── components/
│   │   ├── Admin/           # Admin panel components
│   │   ├── Customer/        # Customer interface components
│   │   └── Shared/          # Shared UI components
│   ├── index.html           # Main HTML template
│   └── index.tsx            # Frontend entry point
└── shared/
    └── types.ts             # Shared TypeScript types

Getting Started

  1. The system will automatically set up the database on first run
  2. Access the admin panel at /admin to set up menu items and tables
  3. Generate QR codes for tables from the admin panel
  4. Print and place QR codes on tables
  5. Customers scan QR codes to access the ordering interface

API Endpoints

Menu Management

  • GET /api/menu - Get all menu items
  • POST /api/menu - Add new menu item
  • PUT /api/menu/:id - Update menu item
  • DELETE /api/menu/:id - Delete menu item

Order Management

  • GET /api/orders - Get all orders (admin)
  • POST /api/orders - Place new order
  • PUT /api/orders/:id/status - Update order status

Table Management

  • GET /api/tables - Get all tables
  • POST /api/tables - Add new table
  • GET /api/tables/:id/qr - Get QR code for table

Database Schema

Tables

  • menu_items: id, name, description, price, category, available
  • tables: id, number, name, qr_code, active
  • orders: id, table_id, customer_name, customer_phone, items, total, status, created_at
  • order_items: id, order_id, menu_item_id, quantity, price

Order Status Flow

  1. pending - Order placed, waiting for confirmation
  2. confirmed - Order confirmed by admin
  3. preparing - Order being prepared
  4. ready - Order ready for pickup
  5. completed - Order delivered/completed
  6. cancelled - Order cancelled
HTTP
  • index.ts
    Pratham211--52…13.web.val.run
Code
backendfrontendsharedREADME.md
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.