L'Éclat Gastronomy is a full-stack restaurant menu and ordering experience built with Node.js, Express, and EJS. It delivers a polished, mobile-friendly menu UI, a persistent cart, and an admin dashboard for managing dishes and viewing incoming orders.
Live Demo: https://restaurant-app-eta-three.vercel.app/
- Elegant, responsive dark UI with gold accents (optimized for mobile → desktop)
- Client-side cart with
localStoragepersistence and live subtotal/tax/total updates - Server-rendered pages (EJS) plus JSON APIs for menu, orders, and dish management
- Admin dashboard (slug-protected) for managing dishes and reviewing orders
- Configurable tax rate via environment variables
- Runtime: Node.js (ESM)
- Server: Express
- Views: EJS
- Styling: Vanilla CSS
- Deployment: Vercel (Serverless)
- Node.js (LTS recommended)
npm install
npm run devThen open:
Create a .env file (see .env example):
PORT(default:3000)NODE_ENV(set toproductionfor serverless deployments)TAX_RATE(decimal, e.g.0.15for 15%)ADMIN_SLUGS(comma-separated list of allowed admin slugs, e.g.admin,superadmin)
Admin pages are accessible only when the :slug matches one of the values in ADMIN_SLUGS.
- Manage dishes:
/admin/dishes/:slug - View orders:
/admin/orders/:slug
This is a lightweight access-control mechanism designed for demos/internal usage. For real production use, add proper authentication.
GET /api/menu— full menu JSONGET /api/menu/:category— menu items by category (appetizers,mains,desserts,drinks)
POST /api/orders— submit an order (items,customerName,customerEmail)
POST /api/dishes— create a dishPUT /api/dishes/:id— update a dish (supports moving categories)DELETE /api/dishes/:id— delete a dish
GET /api/admin/:slug/orders— list all ordersGET /api/admin/:slug/orders/:id— get a single order
- Menu data is loaded from
menuData.jsonand written back when dishes are created/updated/deleted. - Orders are stored in memory (
ordersarray) and reset when the server restarts. - On serverless platforms, filesystem writes and in-memory state may not persist across invocations. For a production system, move menu + orders to a database.
.
├── app.js # Express app + routes (pages + JSON APIs)
├── menuManager.js # Menu persistence helpers (load/save/getNextId)
├── menuData.json # Persistent menu storage (runtime editable)
├── menuData.js # Legacy/static menu export (not used by server)
├── package.json # Dependencies and scripts
├── vercel.json # Vercel Serverless configuration
├── public/
│ ├── images/
│ └── stylesheet/
│ └── styles.css
└── views/
├── index.ejs # Customer menu + cart + checkout
├── dishes.ejs # Admin: dish CRUD UI
├── orders.ejs # Admin: orders dashboard UI
└── partials/
├── header.ejs
└── footer.ejs
ISC