The "Little Lemon" is a comprehensive web application for restaurant management, providing a real-time menu, table bookings, and more.
- Real-time Menu Management
- Table Reservation API
- User Authentication and Authorization
- Unit Tests
- MySQL Database Backend
- RESTful API
# Activate the virtual environment
pipenv shell
Install dependencies
pipenv install
Run your MySQL server with the following connection settings:
MY_SQL_DB_NAME='littlelemon_db'
MY_SQL_DB_HOST='127.0.0.1'
MY_SQL_DB_PORT='3306'
You can run it with sqlite as well, change in .env file:
DB_CHOICE='mysql' to DB_CHOICE='sqlite' so it will run with sqlite
Then made migrations:
python manage.py makemigrations
python manage.py migrate
Create superuser:
python manage.py createsuperuser
Run server:
python manage.py runserver
This application provides a RESTful API with the following endpoints.
-
List Menu Items:
GET /menu-items
-
View Single Menu Item:
GET /menu-items/<int:pk>
-
Update Item of the Day:
POST /item-of-the-day/update/<int:pk>
- List Categories:
GET /categories
- Perform Operations on Cart:
POST /cart/menu-items
-
Create or List Orders:
POST /orders
-
View Single Order:
GET /orders/<int:pk>
-
Assign Order to Delivery Crew:
POST /orders/assign
-
Mark Order as Delivered:
POST /orders/mark-delivered/<int:pk>
-
List, Create, or Delete Managers:
GET, POST, DELETE /groups/manager/users
-
List, Create, or Delete Delivery Crew Members:
GET, POST, DELETE /groups/delivery-crew/users
Unit tests are available in LittleLemonAPI/tests.py.
Contributions are welcome. Feel free to open a pull request or issue on GitHub.