Skip to content

Latest commit

 

History

70 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BookShelf Pro

Python Version Django Version PostgreSQL Docker License

Django-based book catalog and personal library platform powered by the Open Library API.

Users can browse books by genre, search by title, author or ISBN, add books to their personal library, track reading status, and leave reviews.


Features

  • Book catalog with pagination and grid / list view toggle
  • Search by title, author, or ISBN with on-demand Open Library import
  • Personal library
  • Book rating
  • Book reviews
  • User profiles
  • Filter sidebar
  • Social authentication via Google and Facebook
  • Email verification and reCAPTCHA v2

Stack

  • Python 3.13 / Django 6.0
  • Docker
  • NGINX
  • PostgreSQL 16
  • SCSS / JavaScript
  • django-allauth, django-recaptcha
  • httpx

Project Structure

BookShelf-Pro
├── backend
│   ├── config          # settings, urls, wsgi
│   ├── apps            # all django apps
│   │   ├── books       # catalog, search, Open Library integration
│   │   │   └── services
│   │   │      ├── activity.py, catalog.py, client.py
│   │   │      ├── detail.py, importers.py, rating.py
│   │   │      └── subject_map.py
│   │   ├── library      # personal library, UserBook, status management
│   │   ├── users        # user model, profile, RecentActivity
│   │   └── main
│   ├── templates
│   ├── fixtures         # data for categories
│   ├── static 
│   ├── utils 
│   ├── tests
│   ├── .env             # for dev 
│   └── Dockerfile 
├── requirements.txt
├── .env                 # for compose
├── docker-compose.yml
└── README.md

Manual installation

Clone the repository and set up the environment:

git clone https://github.com/kapusta123b/BookShelf-Pro.git
cd BookShelf-Pro
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

Install dependencies:

pip install -r --no-cache-dir requirements.txt

Install PostgreSQL, create a user and a database, https://www.postgresql.org/download/, and then replace the values ​​in the backend/.env file with your own.

SECRET_KEY=your_secret_key
DEBUG=True # True only for dev, else False
ALLOWED_HOSTS=127.0.0.1,localhost
CSRF_TRUSTED_ORIGINS=http://127.0.0.1,http://localhost
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASS=your_db_password
DB_HOST=localhost
DB_PORT=5432

Apply migrations and run development server:

cd backend
python manage.py migrate # important !
python manage.py loaddata backend/fixtures/books/subjects.json
python manage.py runserver

Create admin user ( optional ):

python manage.py createsuperuser

Site is available at http://localhost:8000 Admin panel available at http://localhost:8000/admin/


Installation with Docker

Install Docker: https://docs.docker.com/engine/install/

Clone the repository:

git clone https://github.com/kapusta123b/VotingSite.git
cd VotingSite

Edit environment variables:

nano .env

Update Nginx server name:

nano conf.d/nginx.conf

Build and start containers:

docker compose up -d --build

Apply migrations:

docker exec web python manage.py migrate

Load categories data:

docker exec web python manage.py loaddata backend/fixtures/books/subjects.json

Create admin user ( optional ):

docker exec web python manage.py createsuperuser

Notes

Before deployment, update:

  • .env
  • Nginx server_name
  • OAuth credentials

Do not commit real secrets or production credentials to the repository.

Social Authentication

Create OAuth apps in Google Cloud Console and Facebook Developers, then add providers in Django Admin under Social Accounts → Social Applications.

Callback URLs:

http://your_domain/accounts/google/login/callback/
http://your_domain/accounts/facebook/login/callback/

License

MIT

About

Django-based book catalog and personal library powered by the Open Library API

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages