Welcome to the BookGenie backend repository! This repository contains the backend code for the BookGenie application, developed using Django. Follow the instructions below to set up and run the backend on your local machine.
- Prerequisites
- Installation
- Configuration
- Running the Server
- Testing
- API Endpoints
- Contributing
- License
Before you begin, ensure you have the following installed:
- Python 3.8 or higher
- Pip (Python package installer)
- Virtualenv (optional, but recommended)
-
Clone the Repository:
git clone https://github.com/yourusername/bookgenie-backend.git cd bookgenie-backend
-
Create and Activate a Virtual Environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
In settings.py, update the ALLOWED_HOSTS setting to include your local network IP address:
- Start the Django development server with the following command:
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'your_network_ip']
Replace your_network_ip with your local network IP address.
- Start the Django Development Server:
python manage.py runserver 0.0.0.0:8000
We welcome contributions to enhance BookGenie! To help you get started, please follow these steps:
-
Fork the Repository:
- Click the "Fork" button at the top-right of the repository page on GitHub to create your own copy.
-
Create a Feature Branch:
- Clone your forked repository to your local machine if you haven’t already:
git clone https://github.com/yourusername/bookgenie-backend.git cd bookgenie-backend
- Create a new branch for your feature or bug fix:
git checkout -b feature/YourFeature
- Clone your forked repository to your local machine if you haven’t already:
-
Commit Your Changes:
- Make the necessary changes to the codebase.
- Add and commit your changes with a meaningful message:
git add . git commit -m 'Add new feature: YourFeature'
-
Push to the Branch:
- Push your changes to your forked repository on GitHub:
git push origin feature/YourFeature
- Push your changes to your forked repository on GitHub:
-
Create a Pull Request:
- Navigate to the original repository on GitHub.
- Click on the "Pull Requests" tab and then "New Pull Request."
- Select your branch from the dropdown menu and compare it with the base branch (usually
main
ormaster
). - Provide a clear description of your changes and submit the pull request for review.
Thank you for contributing to BookGenie! We appreciate your efforts to help us improve and grow.