This is the backend for the Restaurant Booking Website. It provides API endpoints for managing restaurant bookings, restaurant management, reservation management, user authentication, and other core functionalities. The backend is built using Python Django, Django Rest Framework with a PostgreSQL database and Cloudinary for media storage. The application is deployed on Heroku with continuous deployment enabled.
- User Authentication: User registration, login, and authentication.
- Booking Management: Create, view, update, and cancel bookings.
- Restaurant Management: Manage restaurant details.
- Media Handling: Store and retrieve images using Cloudinary.
- Scalable Deployment: Deployed on Heroku with continuous deployment.
- Framework: Python Django with Django Rest Framework
- Database: PostgreSQL
- Media Storage: Cloudinary
- Deployment: Heroku
- CI/CD: Continuous deployment using GitHub Actions
- Python 3.9+
- PostgreSQL
- Cloudinary account
- Google Maps API Key
-
Clone the Repository:
git clone https://github.com/ozlemhafalir/restaurant-booking-backend cd restaurant-booking-backend
-
Create and Activate Virtual Environment:
python -m venv env source env/bin/activate
-
Install Dependencies:
pip install -r requirements.txt
-
Set Environment Variables: Copy
.env.template
file in the project root to.env
and update with correct local configuration:cp .env.template .env
Example local configuration:
DATABASE_URL= HOST=127.0.0.1 CLOUDINARY_URL=
-
Apply Migrations:
python manage.py migrate
-
Run the Server:
python manage.py runserver
The backend is deployed on Heroku. Continuous deployment is set up to trigger whenever changes are pushed to the main branch.
- Run Unit Tests:
python manage.py test