This project is a Django web application with two main parts:
- Frontend (Web pages) – Customers can browse menus, learn about the restaurant, and make bookings through forms.
- Backend API (Django REST Framework) – Provides authentication, menus, and reservations via JSON endpoints.
It also includes JWT authentication, Docker support, and can be deployed on Google Cloud.
| URL | Description |
|---|---|
/ |
Homepage |
/about/ |
About page |
/menu/ |
List all menu items |
/menu/<id>/ |
Display a single menu item |
/reservations/ |
Show user’s reservations (login required) |
/book/ |
Make a new booking via form (login required) |
POST /api/auth/users/– RegisterPOST /api/auth/jwt/create/– Login (get tokens)POST /api/auth/jwt/refresh/– Refresh tokenPOST /api/auth/jwt/verify/– Verify tokenGET /api/auth/users/me/– Current user
GET /api/menus/– List menus (public)GET /api/menus/<id>/– Retrieve one menuPOST /api/menus/– Create (admin only)PUT /api/menus/<id>/– Update (admin only)DELETE /api/menus/<id>/– Delete (admin only)
GET /api/bookings/– List user’s bookings (admin sees all)POST /api/bookings/– Create/Update bookingGET /api/bookings/<id>/– Retrieve bookingPUT /api/bookings/<id>/– Update bookingDELETE /api/bookings/<id>/– Cancel booking
Booking Example:
POST /api/bookings/
Authorization: Bearer <token>
Content-Type: application/json{
"first_name": "Alice",
"reservation_date": "2025-09-10",
"reservation_slot": 2
}-
Clone repo:
git clone https://github.com/VoranReygetov/Little-Lemon-Web-Application.git cd Little-Lemon-Web-Application -
Create
.env.prod:DJANGO_SECRET_KEY=your_secret DJANGO_DEBUG=Fasle DJANGO_ALLOWED_HOSTS=* DJANGO_CSRF_TRUSTED_ORIGINS=* # Database settings (shared by MySQL + Django) DATABASE_ENGINE=mysql MYSQL_DATABASE=reservations MYSQL_USER=user MYSQL_PASSWORD=mypassword MYSQL_ROOT_PASSWORD=mypassword MYSQL_HOST=db MYSQL_PORT=3306
-
Start services:
docker-compose up --build
-
Access:
- Web app: http://localhost:8000/
- API: http://localhost:8000/api/