Exquisite dining, interactive 2D floor-plan table reservations, and automated guest notifications.
Explore. Pick Your Table. Reserve. Savor.
🚀 Live Dev Server (Port 8000) · ☕ Spring Boot (Port 8080) · 🐳 Docker Compose · ⚙️ CI/CD Pipeline · 🗺️ 2D Floor-Plan Picker
OmRestaurant is a responsive restaurant web platform combining interactive visual table reservations, real-time dining slot availability checks, automated EmailJS confirmations, GPU-accelerated ambient visuals, and PostgreSQL / Supabase persistence—packaged for local dev, standalone Java 21 Spring Boot, Docker Compose, and GitHub Actions CI/CD.
🗺️ 2D SVG Table Picker · ✨ WebGL & GSAP Animations · ⚡ Instant EmailJS Notifications · 🐳 Docker + CI/CD · ♿ Reduced-Motion Accessible
- Core Users
- Project Highlights
- Repository Statistics
- Feature Overview
- Page Showcase
- Interactive 2D Floor-Plan Table Picker
- Visual Effects, Animations & UI Interactions
- System Architecture
- Data Model
- End-to-End Reservation & Notification Flow
- Tech Stack
- Project Metrics
- Design Principles
- Project Structure
- Prerequisites
- Getting Started
- Docker & Containers
- CI/CD Pipeline
- API & Form Endpoints
- EmailJS Configuration
- Security & Accessibility
- Performance & Optimization
- Project Vision
- Future Roadmap
- License & Third-Party Notices
| User | Purpose |
|---|---|
| Guests & Diners | Explore menus, inspect real-time table availability across dining zones on the 2D floor plan, pick specific tables, and receive instant EmailJS confirmations. |
| Subscribers | Receive automated welcome emails and updates on seasonal specials and events. |
| Restaurant Staff & Hosts | Prevent overlapping table double-bookings via ±90-minute turn-window locks, track reservations (table_id), and manage guest inquiries. |
- Interactive 2D SVG Floor-Plan Table Picker: Real-time dining map on
booking.htmland#floorPlanModalfeaturing 14 tables across Window-Side, Main Dining Room, Outdoor Patio, and VIP Private Booths with instant party-size filtering and hover tooltips. - Transactional Conflict Protection:
POST /bookingsuses PostgreSQLSELECT ... FOR UPDATErow locking and ±90-minute turn-window overlap detection (409 ConflictJSON or PRG alert) before sending EmailJS confirmation. - Premium Native Animations & Micro-Interactions: Bundled GSAP 3.13 +
IntersectionObserverscroll & menu-tab reveals, word-mask heading animations, 3D card tilt with cursor spotlight glow, shimmer/magnetic CTA buttons, hero particle canvas, smooth page transitions, and accessible ARIA toasts. - Dual Runtime + Docker Support: Run via Spring Boot 4 (
8080), Python Dev Server (8000), ordocker compose up --buildwith PostgreSQL 16 and automated schema seeding. - Automated GitHub Actions CI/CD: Validates JS/Python syntax, root-to-static asset parity, Maven production builds, live Spring Boot + PostgreSQL 16 API smoke tests, and multi-stage GHCR Docker image publishing.
| 🏗️ Architecture | 🌐 Runtime Modes | 📄 Pages | 🔌 API & Form Routes | 🗄️ Database | 🎨 Graphics | 🐳 DevOps |
|---|---|---|---|---|---|---|
| Dual-Entry Web App | Spring Boot / Python / Docker | 8 Full Pages | 4 Endpoints | 4 PostgreSQL Tables | WebGL + Canvas + SVG + GSAP | Docker + GitHub Actions |
| 🗺️ 2D Visual Floor Plan | 🍽️ Culinary Showcase | ⚡ Instant EmailJS Dispatch |
|---|---|---|
Select exact tables by zone and capacity with live slot availability and #FD6B10 highlights. |
Filterable Breakfast, Lunch, and Dinner menus with staggered GSAP tab reveal animations. | Automated reservation, contact inquiry, and newsletter confirmation emails including table metadata. |
| 🛡️ Conflict-Safe Bookings | ✨ Motion & Toast UI | ☁️ Cloud / Local Postgres |
|---|---|---|
| Transactional row locks block overlapping reservations within a ±90-minute window. | Hardware WebGL glow, 3D card tilt, page transitions, and non-blocking ARIA toast notifications. | Pre-configured for Supabase PostgreSQL with local PostgreSQL 16 Docker support. |
The platform features 8 interconnected pages (mirrored between project root and src/main/resources/static/):
index.html— Restaurant landing page with hero WebGL + floating particle canvas, animated stats counters, team showcase, testimonials, inline quick booking, and newsletter footer.booking.html— Full interactive reservation workspace featuring the 2D SVG Floor-Plan Table Picker (inline+#floorPlanModal), zone filter pills, party-size validation, live slot sync, and reservation form.menu.html— Breakfast, Lunch, and Dinner tabbed showcase with GSAP staggered item reveals.service.html— Catering, Master Chefs, Online Ordering, and 24/7 service cards with 3D tilt and cursor spotlight glow.team.html— Chef profiles with 3D tilt/glow cards and social quick links.about.html— Story, photo gallery zoom reveals, and GSAP-driven experience/chef counters.testimonial.html— Owl Carousel guest reviews.contact.html— Embedded Google Map, department addresses, and EmailJS contact form.
Mounted on booking.html via js/table-picker.js (both inline #om-table-picker and fullscreen modal #floorPlanModal):
- 4 Architectural Zones (14 Physical Tables):
- Window-Side Seating (
Window): Tables1–4(2-seaters overlooking the panoramic glass wall) - Main Dining Room (
Main): Tables5–7(4-seaters) & Tables8–9(6-seaters) - Outdoor Patio / Terrace (
Patio): Table10(2-seater) & Tables11–12(4-seaters) - Private Booths (
Booth): Table13(6-seat VIP Booth) & Table14(8-seat Grand Booth)
- Window-Side Seating (
- Visual Table States:
- Available: Brand-outlined interactive geometry with chair silhouettes and hover glow.
- Selected (
#FD6B10): Instant warm accent highlight, glow filter, and top-right checkmark badge synced toinput[name="table_id"]and#om-selected-table-pill. - Reserved: Diagonal hatch pattern and disabled cursor for tables marked reserved or booked within ±90 minutes of the chosen
YYYY-MM-DDTHH:MMslot. - Too Small for Party Size: Dimmed dashed outline when
table.capacity < partySize, popping an explanatory toast if clicked (and auto-deselecting if the guest increases party size).
Implemented natively across js/webgl-hero.js, js/particles.js, js/animations.js, and css/style.css:
- Ambient WebGL & Canvas Particles: Hardware-accelerated fragment shader glow on all
.hero-headersections plus upward-drifting warm amber bokeh particles on the home hero (particles.js). - Word-Mask Text & Scroll Reveals:
IntersectionObserver+ GSAP word-mask reveals (preserving<br>, icons, and fullaria-labeltext) alongside zoom/fade-up.om-revealblocks. - Micro-Interactions: Cursor-tracking 3D perspective tilt +
.om-card-glowspotlight on team/service cards, diagonal shine sweep on.btn-primary, magnetic cursor pull on primary CTAs & play button, and::beforenavbar link underline slides. - Page Transitions & Toast Feedback: Top amber progress bar (
#om-page-progress) + blur veil (pageshowbfcache-safe) and non-blocking ARIA toasts (window.showOmToast) replacing browseralert(). - Accessibility: Honors
@media (prefers-reduced-motion: reduce)andmatchMedia("(prefers-reduced-motion: reduce)"), disabling continuous shaders, particles, transitions, and tilts automatically.
flowchart TB
Guest[Guest Browser] --> UI[HTML5 / Bootstrap 5 / CSS3 / SVG]
subgraph ClientEngine[Client-Side Interactive & Notification Layer]
TP[2D SVG Floor-Plan Picker<br/>js/table-picker.js]
FX[WebGL Shader + Particles + GSAP<br/>animations.js / particles.js]
EJS[EmailJS Dispatcher<br/>js/email-service.js]
end
UI --> TP
UI --> FX
UI --> EJS
TP -->|GET /api/tables/availability| Server
UI -->|POST /bookings, /contact, /newsletter| Server
EJS -->|REST API Over HTTPS| EmailService[EmailJS Cloud API]
EmailService -->|Confirmation Email| GuestInbox[Guest Email Inbox]
subgraph Server[Runtime Environment Options]
direction TB
SpringBoot[Spring Boot 4 JAR / Docker<br/>FormController + TableController + HikariCP]
DevServer[Python 3 Dev Server<br/>HTTP + SQLite + Supabase Sync]
end
SpringBoot -->|JDBC / PostgreSQL| DB[(Supabase Cloud or<br/>Docker PostgreSQL 16)]
DevServer -->|SQLite + psql| DB
erDiagram
TABLES {
bigserial id PK
varchar table_number UK
integer capacity
varchar zone
varchar status
}
BOOKING {
bigserial id PK
varchar name
varchar email
timestamp booking_at
smallint people
text request
bigint table_id FK
timestamptz created_at
}
CONTACT_US {
bigserial id PK
varchar name
varchar email
varchar subject
text message
timestamptz created_at
}
NEWSLETTER {
bigserial id PK
varchar email
timestamptz created_at
}
TABLES ||--o{ BOOKING : reserves
sequenceDiagram
autonumber
actor Guest as Diner / Guest
participant Picker as 2D Floor-Plan UI
participant Backend as Spring Boot / Dev Server
participant DB as PostgreSQL / Supabase
participant EmailJS as EmailJS API
Guest->>Picker: Picks Date, Time & Party Size (e.g. 5 guests)
Picker->>Backend: GET /api/tables/availability?date=YYYY-MM-DD&time=HH:MM
Backend->>DB: Query tables + 90-min overlapping bookings
DB-->>Backend: Availability list (14 tables)
Backend-->>Picker: JSON table list (id, table_number, capacity, zone, status, available)
Picker->>Guest: Greys out under-5 seat & reserved tables, guest selects Table 8
Guest->>Picker: Submits reservation form
Picker->>Backend: POST /bookings (JSON, table_id=8)
Backend->>DB: SELECT FOR UPDATE & check 90-min turn overlap
alt Slot taken concurrently
Backend-->>Picker: HTTP 409 Conflict (table-unavailable)
Picker->>Guest: Shows error toast & refreshes floor plan
else Reservation persisted
DB-->>Backend: Row inserted in booking (table_id=8)
Backend-->>Picker: HTTP 200 OK
Picker->>EmailJS: emailjs.send (table_info, table_number, table_zone)
EmailJS-->>Guest: Confirmation email delivered with table details
Picker->>Backend: Refresh availability (Table 8 marked Reserved)
end
| Layer | Technology | Details |
|---|---|---|
| Frontend & Floor Plan | HTML5, Bootstrap 5, CSS3, Vanilla JS, Inline SVG | Responsive multi-page UI with SVG 2D dining floor plan |
| Motion & Shaders | GSAP 3.13.0, ScrollToPlugin, Canvas 2D, GLSL WebGL | Locally bundled in lib/gsap/, custom glow shaders & particles |
| Email Service | EmailJS Browser SDK v4 | Locally bundled in lib/emailjs/ for instant inbox delivery |
| Backend (Primary) | Java 21 / 26, Spring Boot 4.1.1 | Spring Web MVC, Spring JDBC, HikariCP, @Transactional row locks |
| Backend (Dev) | Python 3.9+ | Built-in HTTP server with /api/tables/availability, SQLite, and Supabase sync |
| Database | PostgreSQL 16 (Supabase Cloud or Docker) | tables, booking (with table_id FK), contact_us, newsletter |
| Containers & CI/CD | Docker, Docker Compose, GitHub Actions | Multi-stage JRE 21 Alpine image, GHCR publishing, automated Postgres integration tests |
| Metric | Detail |
|---|---|
| Web Pages | 8 full HTML pages (mirrored cleanly between root and src/main/resources/static/) |
| Endpoints | 4 routes (GET /api/tables/availability, POST /bookings, POST /contact, POST /newsletter) |
| Database Tables | 4 relational tables (tables, booking, contact_us, newsletter) |
| Floor Plan Capacity | 14 seeded physical tables across 4 dining zones (2, 4, 6, 8 seats) |
| CI/CD Jobs | 3 automated pipeline jobs (frontend-checks, build-and-test, docker) |
- Zero-CDN Vendor Resilience: GSAP, ScrollToPlugin, and EmailJS are bundled in
lib/for deterministic loading without external JS CDN outages. - Progressive Fallback: Missing WebGL falls back cleanly to hero background photography; offline static previews fall back to the local floor-plan JSON config.
- Double-Booking Safety: Row-level
FOR UPDATElocking + ±90-minute turn-window queries prevent race conditions across concurrent guests. - Accessibility First: Keyboard focusable SVG tables (
role="button",tabindex="0",Enter/Spaceselection), ARIA live toasts, andprefers-reduced-motionsupport across all scripts and styles.
OmRestaurant/
├── .github/workflows/
│ └── ci-cd.yml # GitHub Actions CI/CD (checks, Postgres tests, GHCR Docker)
├── assets/
│ └── omrestaurant-banner.jpg # Custom README hero banner graphic
├── css/
│ ├── bootstrap.min.css # Bootstrap 5 core CSS
│ └── style.css # Theme styles, UI animations, & 2D floor plan styles
├── js/
│ ├── animations.js # Scroll/tab reveals, word-mask text, tilt/glow, transitions, toasts
│ ├── email-config.js # EmailJS credentials & template configuration
│ ├── email-service.js # Booking transaction coordinator, contact & newsletter dispatch
│ ├── main.js # Navbar sticky/scroll logic, modals, PRG status toasts
│ ├── particles.js # Home hero Canvas 2D warm bokeh particle engine
│ ├── table-picker.js # Modular 2D SVG floor-plan component & live availability sync
│ └── webgl-hero.js # WebGL fragment shader hero glow engine
├── lib/ # Locally bundled EmailJS, GSAP, WOW, Owl Carousel, Tempus Dominus
├── img/ # Photography & graphic assets
├── database/
│ ├── omRest_db.sql # Standalone MySQL schema reference
│ └── supabase_floor_plan_migration.sql # Idempotent Supabase PostgreSQL floor-plan migration + seed
├── src/main/
│ ├── java/com/omrestaurant/
│ │ ├── OmRestaurantApplication.java # Spring Boot entrypoint
│ │ ├── model/RestaurantTable.java # Table availability DTO record
│ │ ├── service/FormService.java # Availability checks, row-locked booking & JDBC persistence
│ │ └── web/
│ │ ├── FormController.java # /bookings, /contact, /newsletter controller (JSON + PRG)
│ │ └── TableController.java # GET /api/tables/availability REST endpoint
│ └── resources/
│ ├── application.properties # JDBC pool config (env-overridable for Docker / Supabase)
│ ├── schema.sql # Automatic PostgreSQL DDL + idempotent 14-table seed
│ └── static/ # Packaged Spring Boot static web assets mirror
├── Dockerfile # Multi-stage Maven + Eclipse Temurin 21 JRE Alpine image
├── docker-compose.yml # Spring Boot app + PostgreSQL 16 service stack
├── .dockerignore # Optimized Docker build context exclusions
├── .env.example # Environment variable template (Docker / Supabase)
├── dev_server.py # Python 3 dev server with table availability & SQLite/Supabase sync
├── pom.xml # Maven build configuration (Spring Boot 4.1.1 / Java 21)
├── THIRD-PARTY-NOTICES.md # Third-party library licenses
└── README.md # Project documentation
- Java JDK 21+ and Apache Maven 3.9+ (for Spring Boot builds), or
- Docker Desktop / Docker Engine + Compose v2 (for single-command containerized startup), or
- Python 3.9+ (for lightweight zero-dependency local development via
dev_server.py)
git clone https://github.com/gopaljilab/OmRestaurant.git
cd OmRestaurantFor existing Supabase databases, run database/supabase_floor_plan_migration.sql in the Supabase SQL Editor (Spring Boot also runs src/main/resources/schema.sql idempotently when spring.sql.init.mode=always).
Set environment variables (or copy .env.example to .env):
export DB_URL='jdbc:postgresql://aws-0-eu-west-1.pooler.supabase.com:5432/postgres?sslmode=require'
export DB_USERNAME='postgres.ujiftprtpulyhudloyvp'
export DB_PASSWORD='your-supabase-password'python3 dev_server.pyOpen http://localhost:8000/booking.html to test the interactive 2D floor plan immediately backed by local SQLite (omrestaurant.sqlite3) and optional Supabase psql synchronization.
mvn spring-boot:runOpen http://localhost:8080/booking.html.
mvn clean package -DskipTests
java -jar target/omrestaurant-1.0.0.jarStart both the Spring Boot application (8080) and a persistent postgres:16-alpine database (5432) automatically seeded with schema.sql:
docker compose up --build -dOpen http://localhost:8080/booking.html. To tear down containers (keeping database volume intact):
docker compose down- Copy
.env.exampleto.envand fill in your SupabaseDB_URL,DB_USERNAME, andDB_PASSWORD. - Start only the web service without the local Postgres container:
docker compose up --build -d --no-deps webdocker build -t omrestaurant:latest .
docker run --rm -p 8080:8080 \
-e DB_URL="jdbc:postgresql://aws-0-eu-west-1.pooler.supabase.com:5432/postgres?sslmode=require" \
-e DB_USERNAME="postgres.ujiftprtpulyhudloyvp" \
-e DB_PASSWORD="your-supabase-password" \
omrestaurant:latestDefined in .github/workflows/ci-cd.yml and triggered on pushes/PRs to main plus manual workflow_dispatch:
frontend-checks- Runs
node --checksyntax validation across all root andstatic/JavaScript modules. - Runs
python3 -m py_compile dev_server.py. - Enforces exact asset parity (
diff -u) between rootcss//js/andsrc/main/resources/static/.
- Runs
build-and-test- Provisions a live
postgres:16-alpineGitHub Actions service container. - Packages
target/omrestaurant-1.0.0.jarwithmvn -B clean packageon Java 21 (Temurin). - Boots the compiled JAR against PostgreSQL 16 and executes live HTTP assertions covering
GET /api/tables/availability, bookingtable_id=5, ±90-minute conflict rejection (409 Conflict), and capacity enforcement (400 Bad Request). - Uploads the compiled JAR as a build artifact.
- Provisions a live
docker(runs after both jobs pass)- Builds the multi-stage
Dockerfilewith Buildx + GitHub Actions layer caching (type=gha). - On pushes to
main, logs into GitHub Container Registry (ghcr.io/gopaljilab/omrestaurant) usingGITHUB_TOKENand pushes:latest+:sha-<commit>.
- Builds the multi-stage
| Route | Method | Query / Body Fields | Destination / Response |
|---|---|---|---|
/api/tables/availability |
GET |
date (YYYY-MM-DD), time (HH:MM) |
JSON list of 14 tables (id, table_number, capacity, zone, status, available) |
/bookings |
POST |
name, email, date, people, request, table_id (optional) |
Inserts row in booking; returns JSON (200/409/400) when Accept: application/json, or redirects (?status=booking-success / table-unavailable / invalid) |
/contact |
POST |
name, email, subject, message |
Inserts row in contact_us & redirects (?status=contact-success) |
/newsletter |
POST |
email |
Inserts row in newsletter & redirects (?status=newsletter-success) |
EmailJS is integrated to deliver real-time confirmation emails from the guest's browser.
Stored in js/email-config.js and src/main/resources/static/js/email-config.js:
window.EMAILJS_CONFIG = {
publicKey: "oMUTFQVOur_fOnw_t",
serviceId: "service_da1y4nn",
forms: {
newsletter: {
publicKey: "oMUTFQVOur_fOnw_t",
serviceId: "service_da1y4nn",
templateId: "template_0by6ed7"
},
booking: {
publicKey: "oMUTFQVOur_fOnw_t",
serviceId: "service_da1y4nn",
templateId: "template_7uffzct"
},
contact: {
publicKey: "OVv3HY-kOjQfzS0GV",
serviceId: "service_lf56m2o",
templateId: "template_e6tjmba"
}
}
};- Newsletter Form:
{{to_email}},{{email}},{{subscriber_email}},{{to_name}},{{from_name}},{{message}},{{date}},{{time}} - Booking Form:
{{name}},{{to_name}},{{guest_name}},{{email}},{{to_email}},{{date}},{{booking_date}},{{people}},{{table_id}},{{table_number}},{{table_zone}},{{table_info}},{{request}},{{from_name}} - Contact Form:
{{name}},{{to_name}},{{email}},{{to_email}},{{subject}},{{message}},{{date}},{{time}}
- SQL Injection Prevention: Parameterized Spring
JdbcTemplateand SQLite queries everywhere. - Transactional Concurrency Guard:
FOR UPDATErow locks protect physical dining tables against double-booking races. - Non-Root Container Runtime: Docker runtime stage runs as unprivileged
appuseron minimaleclipse-temurin:21-jre-alpine. - Encrypted Cloud Connections: Supabase JDBC datasource enforces
sslmode=require. - Accessible Motion & Keyboard Support: Full
prefers-reduced-motionopt-outs across WebGL, Canvas 2D, GSAP, and SVG transitions, plus keyboard-navigable table elements (Tab/Enter/Space).
- Zero External JS CDN Bottlenecks: Locally bundled GSAP and EmailJS eliminate render-blocking CDN variance.
- Hardware Shader & Particle Capping: Canvas resolution scales smoothly up to
1.5xdevicePixelRatioand halts off-screen/hidden loops automatically. - Layered Docker Caching: Multi-stage
Dockerfilecaches Maven dependency downloads separately from application compilation.
OmRestaurant bridges tactile visual table selection with reliable transactional reservations—delivering effortless dining discovery for guests and zero-conflict scheduling for restaurant teams.
- Responsive 8-page restaurant layout
- Hardware-accelerated WebGL ambient glow shader & hero bokeh particles
- Locally bundled GSAP animations, scroll/tab reveals & accessible toasts
- Cloud database support on Supabase PostgreSQL
- Client-side EmailJS integration for bookings, inquiries, and newsletters
- Dual-runtime support (Spring Boot 4 & Python dev server)
- Interactive 2D floor-plan table picker with real-time availability API
- Docker / Docker Compose setup & GitHub Actions CI/CD pipeline
- Online takeout & delivery ordering workflow
- Payment gateway integration (Stripe / Razorpay)
- SMS confirmation notifications via Twilio
- Administrative dashboard with reservation calendar and analytics
This project is licensed under the MIT License.
- GSAP & ScrollToPlugin: Bundled under the GreenSock Standard License. See gsap.com/standard-license.
- EmailJS Browser SDK: Distributed under the Apache-2.0 License. See emailjs.com.
- Additional third-party details are documented in
THIRD-PARTY-NOTICES.md.
