Virtual Library is a Django-based web application designed to manage a digital library. It allows users to browse, review, and manage a collection of books, authors, and publishers.
- User authentication and registration.
- CRUD operations for managing books, authors, publishers, and book reviews.
- Advanced search and filtering capabilities.
- Integration with external APIs for fetching book and author details.
- Secure and scalable architecture.
- Django & Django Rest Framework
- PostgreSQL
- Docker & Docker Compose
- Pytest for testing
- GitHub Actions for CI/CD
- Swagger for API documentation
To set up the Virtual Library on your local machine, follow these steps:
- Python 3.9
- Docker and Docker Compose
- Git (for cloning the repository)
-
Clone the repository:
git clone /~https://github.com/yourusername/virtual-library.git cd virtual-library
-
Set up a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies
pip install -r requirements.txt
-
Run the Docker container for the PostgreSQL database
docker-compose up -d
-
Apply the database migrations:
python manage.py migrate
-
Load fixture into your database:
python manage.py loaddata users python manage.py loaddata authors python manage.py loaddata publishers python manage.py loaddata categories python manage.py loaddata books python manage.py loaddata book_reviews
-
Start the Django development server:
python manage.py runserver
-
The application should now be running at http://localhost:8000/
Run the tests using Pytest:
pytest
- Swagger UI for the API documentation at http://localhost:8000/swagger/
- Swagger Redoc for the API documentation at http://localhost:8000/redoc/
Contributions to Virtual Library are welcome. Please follow these steps to contribute:
- Fork the repository.
- Create a new feature branch (git checkout -b feature/your-feature).
- Make your changes and commit (git commit -am 'Add some feature').
- Push to the branch (git push origin feature/your-feature).
- Open a pull request.
Distributed under the MIT License. See LICENSE for more information.