A modern, web-based interface for managing a restaurant database. This project uses Node.js, Express, and MySQL.
- Dashboard: Visual statistics for customers, restaurants, and orders.
- Order Management: Place orders and mark them as "Completed".
- Data Export: Download your data as JSON or CSV files.
- Customer Management: Add and view customers with automatic validation.
- Premium UI: Dark mode design with responsive layout.
- Node.js (v14 or higher)
- MySQL Server (XAMPP OR Standard MySQL Community Server)
- Clone/Download this project folder.
- Open a terminal in the project directory.
- Install the required dependencies:
npm install
If you have installed MySQL manually (e.g., MySQL Community Server):
-
Open your MySQL Client (Command Line or Workbench).
-
Create the Database:
CREATE DATABASE restaurant_system;
-
Import the Schema:
- Command Line:
(Enter your password when prompted).
mysql -u root -p restaurant_system < database.sql - Workbench: Open
database.sqland click the "Execute" (Lightning bolt) button.
- Command Line:
-
Configure Credentials:
- Open the
.envfile in the project folder. - Update the settings to match your local MySQL configuration:
DB_HOST=localhost DB_USER=root DB_PASSWORD=your_actual_password <-- CHANGE THIS DB_NAME=restaurant_system
- Open the
- Start Apache and MySQL in XAMPP Control Panel.
- Go to
http://localhost/phpmyadmin. - Create a new database named
restaurant_system. - Import
database.sqlinto that database. - Ensure
.envuses default settings (User:root, Password: empty).
- Start the backend server:
npm start
- You should see:
Server running on http://localhost:3000. - Open your browser and visit: http://localhost:3000
GET /api/customers- List all customersGET /api/orders- List all ordersPOST /api/orders- Create a new orderPUT /api/orders/:id/status- Update an order statusGET /api/export/json- Export data to JSONGET /api/export/csv- Export orders to CSV