Skip to content
Raiyan-19Public

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍽️ TableTurn β€” Bangladesh Restaurant Discovery & Table Reservation Platform

TableTurn Banner

Next-Generation Dining Experience across all 8 Administrative Divisions of Bangladesh πŸ‡§πŸ‡©

Live Demo Divisions Tech Stack License


🌐 Live Interactive Demo

Experience the live interactive frontend directly in your browser:

Note

The frontend features an intelligent client-side fallback engine, allowing full exploration of all 8 administrative divisions, real-time filters, 3D animations, slot reservations, and dynamic QR passes in standalone preview mode!


πŸ“– Overview

TableTurn is a high-performance, mobile-responsive restaurant discovery and real-time table reservation platform inspired by Resy & OpenTable, designed specifically for the Bangladeshi culinary landscape.

From upscale rooftop lounges in Gulshan (Dhaka) to heritage dining in Chattogram, lakefront cafes in Sylhet, and riverside eateries in Barishal β€” TableTurn connects food lovers with premier dining spots with instant booking confirmations, digital QR passes, and automated seating management.


✨ Key Features

🌐 1. Interactive 3D Cyber & Dual-Theme Experience

  • Interactive 3D Constellation Sphere: Real-time mouse-tracking holographic orbital sphere with glowing divisional coordinates.
  • 3D Tilt & Light Sheen Feature Cards: Dynamic gyroscope card perspective with moving cursor lighting highlights.
  • Space Black & Silk Light Themes: Seamless 1-click toggle between cyber obsidian dark mode and clean Linear/Notion-style silk white light mode.

πŸ—ΊοΈ 2. Nationwide 8-Division Discovery Engine

  • Full Coverage: Seamless browsing across Dhaka, Chattogram, Sylhet, Rajshahi, Khulna, Barishal, Rangpur, and Mymensingh.
  • Localized Sub-Districts: Filter by major food hubs (Gulshan, Banani, Dhanmondi, GEC Circle, Agrabad, Zindabazar, Shaheb Bazar, Shibbari, etc.).
  • Dynamic Search & Filters: Filter by cuisine types (Bengali, Mughlai, Italian, Japanese, BBQ, Continental), price categories (ΰ§³ to ΰ§³ΰ§³ΰ§³ΰ§³), and dining slots (Breakfast, Lunch, Evening Adda, Dinner, Late Night).

⚑ 3. Real-Time 4-Step Reservation Engine

  • Interactive Seating Selection: Choose seating preferences (Main Dining Room, Open-Air Rooftop, Chef’s Table, VIP Booth, Garden Terrace).
  • Special Occasion Customization: Tailor bookings for Birthdays, Date Nights, Anniversaries, Business Dinners, or Family Gatherings.
  • Bangladeshi Mobile Verification: Built-in phone validation supporting +8801XXXXXXXXX and 01XXXXXXXXX formats.
  • Smart Party Sizing: Dynamic guest stepper with support for 1 to 30 diners with instant slot availability calculations.

🎟️ 4. Digital QR Pass & Instant Confirmation

  • Cryptographic High-Entropy Reservation ID: Automatically generated booking codes (TT-DHA-XXXXXXXX, TT-CTG-XXXXXXXX).
  • Scannable QR Pass: On-screen dynamic QR code for swift guest check-in at the host podium.
  • Calendar & Social Integration: 1-Click Add to Calendar (.ics download) and WhatsApp Booking Share.
  • Confetti Celebration: Delightful micro-animations upon successful table booking.

πŸ‘₯ 5. Role-Based Access & Admin Management Terminal

  • Admin Dashboard: Full MongoDB CRUD interface for adding venues, toggling flash discounts, and managing listings.
  • Live KPIs & Analytics: Division breakdown statistics, lifetime reservations count, upcoming diners, and active venue counts.
  • Host Stand Scanner: Real-time verification of guest QR code references and 1-click table seating (seated).
  • Verified Reviews & Star Ratings: Authentic diner community feedback, ratings recalculation, and reviews engine.

πŸ”’ 6. Security & VAPT Hardening (OWASP Top 10 Compliance)

  • Rate Limiting & Anti-Bruteforce: Custom sliding window rate limiters (authLimiter, apiLimiter) preventing brute-force attacks on auth and API endpoints.
  • Security Headers & CORS Controls: Production HTTP security headers (X-Content-Type-Options: nosniff, X-Frame-Options: DENY, X-XSS-Protection: 1; mode=block), strict origin validation, and 10kb request payload limits.
  • IDOR & BOLA Prevention: Ownership check verification on reservation management and mandatory protect auth guards for user booking data.
  • Role Escalation Safeguards: Locked public user registration roles (role forced to user).

πŸ”‘ Default Test Accounts

Role Email Password Access & Capabilities
Super Administrator admin@tableturn.bd admin1122 Full Management Terminal, Analytics, Venue CRUD, Flash Deals, Scanner
Venue Manager manager@thegrove.bd Shakila1122 Host Stand Scanner, Seating Management, Live Reservations
Diner (User) Register new or any account User password Instant Table Bookings, Profile & Favorite Venues, Reviews

πŸ“‘ API Reference Overview

Method Endpoint Access Description
GET /api/health Public Service health & division manifest
GET /api/restaurants Public Get all restaurants with division/cuisine/price filters
GET /api/restaurants/:id Public Get single restaurant details
GET /api/restaurants/meta/division-stats Public Get counts per Bangladesh division
POST /api/auth/register Public Register a new user
POST /api/auth/login Public Authenticate user & get JWT token
GET /api/auth/me User Get current logged-in user profile
POST /api/reservations Public/User Create real-time table booking & QR pass
GET /api/reservations/lookup/:code Public/Host Verify reservation by booking code
GET /api/reservations/my User Get authenticated user's reservations
PATCH /api/reservations/:id/cancel User/Staff Cancel reservation (BOLA protected)
GET /api/admin/stats Admin/Manager Platform KPI statistics & division breakdowns
GET /api/admin/reservations Admin/Manager Filtered list of all nationwide reservations
PATCH /api/admin/reservations/:id/status Admin/Manager Update reservation status (confirmed, seated, cancelled)
POST /api/admin/restaurants Admin/Manager List a new partner restaurant
PATCH /api/admin/restaurants/:id/offer Admin/Manager Toggle 30% flash deal on venue

πŸ› οΈ Tech Stack

Frontend (Client)

Technology Description
React 18 Modern Component Architecture with React Hooks
Vite 5 Lightning-fast HMR and optimized production bundling
Tailwind CSS 3 Utility-first responsive design & custom glassmorphism
Framer Motion Fluid page transitions, modal drawers & 3D micro-interactions
HTML5 Canvas 3D Constellation Sphere & Orbital Node Physics
Lucide Icons Clean, modern iconography
Axios HTTP client with automatic JWT bearer interception
Canvas Confetti & QRCode.react Visual celebrations and dynamic QR pass rendering

Backend (Server)

Technology Description
Node.js & Express.js High-throughput REST API server
MongoDB & Mongoose Document database for persistent storage
JWT (JSON Web Tokens) Secure stateless authentication
Bcrypt.js Industry-standard password hashing
Rate Limiters & Security Headers Hardened HTTP security headers and anti-DDoS throttles
Morgan & CORS Request logging and cross-origin resource sharing

πŸ“ Project Structure

TableTurn/
β”œβ”€β”€ client/                     # Frontend (React + Vite + Tailwind)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/         # UI Components (3D Hero, Navbar, Modals, Cards, Filters, QR)
β”‚   β”‚   β”œβ”€β”€ context/            # AuthContext, ReservationContext & ThemeContext
β”‚   β”‚   β”œβ”€β”€ data/               # Mock dataset & Bangladesh division metadata
β”‚   β”‚   β”œβ”€β”€ services/           # Axios API Client with offline/static fallback
β”‚   β”‚   β”œβ”€β”€ App.jsx             # Main Application Layout & Master Gradients
β”‚   β”‚   β”œβ”€β”€ main.jsx            # React Root Entrypoint
β”‚   β”‚   └── index.css           # Custom Design Tokens, Space Black & Silk Light Themes
β”‚   β”œβ”€β”€ index.html              # HTML Shell
β”‚   β”œβ”€β”€ package.json            # Frontend Dependencies & Scripts
β”‚   β”œβ”€β”€ tailwind.config.js      # Tailwind Configuration
β”‚   β”œβ”€β”€ vercel.json             # Vercel SPA Routing Configuration
β”‚   └── vite.config.js          # Vite Bundler & Relative Base Settings
β”‚
β”œβ”€β”€ server/                     # Backend (Node.js + Express + MongoDB)
β”‚   β”œβ”€β”€ config/                 # Database configuration (db.js)
β”‚   β”œβ”€β”€ controllers/            # Route controllers (Auth, Restaurant, Reservation, Admin, Review)
β”‚   β”œβ”€β”€ data/                   # Seed data across all 8 divisions
β”‚   β”œβ”€β”€ middleware/             # Auth JWT guard, VAPT rate limiters & Global Error Handler
β”‚   β”œβ”€β”€ models/                 # Mongoose schemas (User, Restaurant, Reservation)
β”‚   β”œβ”€β”€ routes/                 # Express API routes (Auth, Restaurant, Reservation, Admin)
β”‚   β”œβ”€β”€ package.json            # Server Dependencies & Scripts
β”‚   └── server.js               # Express Server Entrypoint
β”‚
β”œβ”€β”€ .gitignore                  # Git ignore rules
β”œβ”€β”€ package.json                # Root package manager
β”œβ”€β”€ README.md                   # Project Documentation & Live Demo Badges
└── start.bat                   # Windows 1-Click Dual Service Launcher

πŸš€ Getting Started Locally

Prerequisites

1. Clone the Repository

git clone https://github.com/Raiyan-19/TableTurn.git
cd TableTurn

2. Install Dependencies

# Install root dependencies
npm install

# Install server dependencies
npm --prefix server install

# Install client dependencies
npm --prefix client install

3. Run Locally

Option A: 1-Click Launcher (Windows)

Simply double-click start.bat in the root directory.

Option B: Concurrently

npm run dev

Option C: Separate Terminals

# Terminal 1: Backend Server (Port 5000)
cd server
npm start

# Terminal 2: Frontend App (Port 5173)
cd client
npm run dev

Visit http://localhost:5173 in your browser.


πŸ‘¨β€πŸ’» Author

Developed with ❀️ by Raiyan-19


πŸ“„ License

This project is licensed under the MIT License β€” feel free to use and modify for personal or commercial projects.

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages