A Bookshelf API implemented with Django and DRF
Tip
The Render.com free plan may experience a short delay (approximately 1 minute) when starting up. Please be patient for the initial access.
- Book Endpoints:
- Comprehensive CRUD operations for managing book details, covering creation, retrieval, updating, and deletion.
- Category Management:
- Operations for managing book categories, allowing users to create, retrieve, update, and delete book categories.
- User Authentication:
- Implementation of secure user authentication using JWT (JSON Web Token) for robust access control and identity verification.
- Search and Filter:
- Implementation of advanced search and filter functionalities to elevate the book browsing experience, allowing users to find specific information efficiently.
- Account Management:
- User-friendly operations for managing user accounts, enabling users to retrieve, update, or delete their account information.
- Swagger:
- Seamless integration of Swagger UI or ReDoc for comprehensive API documentation. This ensures developers have clear and accessible documentation to understand and utilize the API effectively.
- Django:
- A high-level Python web framework that encourages rapid development and clean, pragmatic design.
- PostgreSQL:
- A powerful open-source relational database management system used for data storage.
- JWT Authentication:
- Implementing JSON Web Token authentication for secure user authentication.
- Gunicorn:
- A Python WSGI HTTP server for UNIX, used for deploying Django applications in production.
- Django ORM:
- Django's built-in Object-Relational Mapping (ORM) library for database interactions, used for managing book data.
- Django Rest Framework (DRF):
- A powerful toolkit for building Web APIs in Django, used for creating RESTful endpoints for book management.
- Clone the repository:
git clone https://github.com/aliseyedi01/Django-Bookshelf-API.git
-
Navigate to the project directory:
Django-Bookshelf-API
-
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
On Windows:
venv\Scripts\activate
On macOS and Linux:
source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
The following are the essential environment variables required to configure the application:
SECRET_KEY
DJANGO_DB_ENGINE
DJANGO_DB_NAME
DJANGO_DB_USER
DJANGO_DB_PASSWORD
DJANGO_DB_HOST
DJANGO_DB_PORT
EMAIL_BACKEND
EMAIL_HOST
EMAIL_PORT
EMAIL_USER
EMAIL_PASSWORD
EMAIL_USE_TLS
EMAIL_USE_SSL
SUPABASE_URL
SUPABASE_KEY
-
Run Django migrations:
python manage.py migrate
This will apply any pending database migrations.
-
Run the Django development server:
python manage.py runserver
The API will be accessible at http://127.0.0.1:8000/
-
Access the Swagger UI and ReDoc:
- Swagger UI: http://127.0.0.1:8000/swagger/
- ReDoc: http://127.0.0.1:8000/redoc/
Feel free to contribute to the project. Fork the repository, make changes, and submit a pull request.
This project is licensed under the MIT License.