Silver Leaf is a complete, full-stack restaurant management and food ordering application. It features a robust backend built with Go, following the MVC pattern, and a modern, responsive frontend built with React.
The system is designed to serve three key roles: Customers who can browse the menu and place orders, Chefs who manage the kitchen and update order statuses, and Administrators who have full oversight of the platform, including user management, menu updates, and payment tracking. The entire application is containerized with Docker for easy setup and deployment.
- Role-Based Access Control: Distinct interfaces and permissions for Customers, Chefs, and Administrators.
- Interactive Menu: Customers can browse food categories, view items, and add them to their cart.
- Order Management: A complete workflow from placing an order to preparation in the kitchen and final delivery.
- Chef's Dashboard: A dedicated view for chefs to see active orders and update their status ("Yet to start", "Cooking", "Completed").
- Admin Panel: A comprehensive dashboard for administrators to manage users, orders, payments, and menu items.
- Authentication: Secure user login and signup using JWT (JSON Web Tokens).
- In-Memory Caching: Backend caching for frequently requested data (like menus) to ensure fast response times.
- Backend: Go, Gorilla/Mux (for routing), MySQL
- Frontend: React, Vite, Bootstrap, Axios
- Database: MySQL
- Containerization: Docker
Follow these instructions to get the project up and running on your local machine.
-
Clone the Repository Open your terminal and clone the project:
git clone [https://github.com/kartikgoyal137/mvc_silverleaf.git](https://github.com/kartikgoyal137/mvc_silverleaf.git) cd mvc_silverleaf -
Configure Environment Variables The project uses a
.envfile to manage sensitive information like database credentials and JWT secrets.cp .env.sample .env
Now, open
.envand fill in the required values:DBUSER= DBPASS= DBROOTPASS= TOKENKEY= DBNAME=silver_leaf DBHOST=db
-
Build and Run with Docker The included
Makefilesimplifies the Docker process. In the root directory of the project, run:make build make up
This command will build the Docker image, which compiles the Go backend, builds the React frontend, sets up the database, runs migrations, and starts the application.
Your application should now be running!
- Access the Application: Open your web browser and navigate to
http://localhost:8080/. - API Port: The backend API is also available on port
8080.
The database is pre-seeded with default accounts for the administrator and chef roles.
-
Administrator:
- Email:
[email protected] - Password:
admin1234
- Email:
-
Chef:
- Email:
[email protected] - Password:
chef1234
- Email:
You can also sign up as a new customer through the frontend application.