A sophisticated, Bugatti-inspired book review platform built with Django
Features β’ Installation β’ Usage β’ Documentation
Bookr is an elegant, minimalist book review platform that brings together literature enthusiasts in a sophisticated digital space. Inspired by the timeless design philosophy of luxury brands like Bugatti, Bookr features a pure black and white aesthetic with premium typography and intuitive user experience.
"Beauty through simplicity, elegance through restraint"
Bookr embodies:
- Minimalist Design - Pure black and white color scheme
- Premium Typography - Playfair Display & Inter fonts
- Sophisticated UX - Clean navigation and intuitive interactions
- Responsive Layout - Beautiful on all devices
- Performance First - Fast, efficient, and accessible
-
Book Catalog Management
- Comprehensive book database with ISBN tracking
- Publisher and contributor management
- Publication date tracking
- Book cover image support
- Sample file downloads
-
Review System
- User-generated reviews with 5-star ratings
- Edit and delete capabilities for review authors
- Average rating calculations
- Review timestamps and edit history
-
Search & Discovery
- Full-text search across book titles
- Contributor name search
- Advanced filtering options
- Recently viewed books tracking (session-based)
-
User Authentication
- Secure login/logout system
- User profiles with activity tracking
- Permission-based access control
- Staff vs. regular user distinctions
-
Bugatti-Inspired Aesthetics
- Pure black (#000000) background
- White (#FFFFFF) typography and elements
- Playfair Display serif headings
- Inter sans-serif body text
- Generous whitespace and minimal borders
-
Interactive Elements
- Smooth hover animations
- Card elevation effects
- Subtle opacity transitions
- Clean form styling
-
Book Cover Display
- Elegant image rendering
- Graceful fallback for missing covers
- Responsive image sizing
- Optimized loading
-
RESTful API (Django REST Framework)
- Book listings endpoint
- Contributor data access
- JSON serialization
- API documentation ready
-
Custom Management Commands
- CSV data import (
loadcsv) - Database population utilities
- Automated data migration
- CSV data import (
-
Custom Template Tags & Filters
- Reusable UI components
- Data formatting helpers
- Template logic abstraction
-
Media Management
- Book cover uploads
- Sample file handling
- Optimized image processing with Pillow
- Python 3.8 or higher
- pip (Python package manager)
- SQLite (included with Python)
- Virtual environment (recommended)
git clone https://github.com/CapBraco/Bookr.git
cd Bookr# Create virtual environment
python -m venv venv
# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activatepip install -r requirements.txtRequired packages:
- Django >= 3.0
- djangorestframework
- Pillow (for image processing)
# Run migrations
python manage.py migrate
# Create superuser (admin account)
python manage.py createsuperuserFollow the prompts to create your admin account.
# Load sample books, publishers, and reviews
python manage.py loadcsv --csv reviews/management/commands/WebDevWithDjangoData.csvThis will populate your database with:
- 21 books
- 10 publishers
- 20 contributors
- 18 reviews
- 3 test user accounts
python manage.py runserverVisit http://127.0.0.1:8000/ in your browser.
bookr/
βββ bookr/ # Project configuration
β βββ settings.py # Django settings
β βββ urls.py # Main URL routing
β βββ views.py # Profile views
β βββ wsgi.py # WSGI configuration
β
βββ reviews/ # Main application
β βββ models.py # Data models
β βββ views.py # View functions
β βββ urls.py # App URL routing
β βββ forms.py # Form definitions
β βββ admin.py # Admin configuration
β βββ serializers.py # API serializers
β βββ api_views.py # API endpoints
β βββ templates/ # HTML templates
β β βββ reviews/
β β βββ base.html
β β βββ index.html
β β βββ book_list.html
β β βββ book_detail.html
β β βββ search-results.html
β β βββ instance-form.html
β βββ templatetags/ # Custom template tags
β β βββ profile_tags.py
β βββ management/ # Custom commands
β β βββ commands/
β β βββ loadcsv.py
β β βββ WebDevWithDjangoData.csv
β βββ migrations/ # Database migrations
β
βββ book_management/ # Book CRUD app
β βββ models.py
β βββ views.py
β βββ forms.py
β βββ templates/
β
βββ filter_demo/ # Template filter examples
β βββ templatetags/
β βββ templates/
β
βββ bookr_admin/ # Custom admin site
β βββ admin.py
β
βββ static/ # Static files
β βββ main.css # Main stylesheet
β βββ logo.png # Site logo
β
βββ media/ # User uploads
β βββ book_covers/ # Book cover images
β βββ book_samples/ # Sample files
β
βββ templates/ # Global templates
β βββ base.html # Base template
β βββ profile.html # User profile
β βββ registration/
β βββ login.html # Login page
β
βββ db.sqlite3 # SQLite database
βββ manage.py # Django CLI
βββ requirements.txt # Python dependencies
βββ README.md # This file
| URL | Description |
|---|---|
/ |
Homepage with recently viewed books |
/books/ |
Complete book collection |
/books/<id>/ |
Individual book details |
/book-search/ |
Search books by title or contributor |
/accounts/login/ |
User login |
/accounts/profile/ |
User profile page |
/admin/ |
Django admin interface |
| Endpoint | Method | Description |
|---|---|---|
/api/all_books/ |
GET | List all books (JSON) |
/api/contributors/ |
GET | List all contributors (JSON) |
- Navigate to homepage or
/books/ - View book cards with covers and ratings
- Click on any book to see full details
- Use search bar in navigation
- Enter search term (minimum 3 characters)
- Select search field (Title or Contributor)
- View filtered results
- Log in to your account
- Navigate to a book detail page
- Click "Add Review"
- Enter rating (0-5) and review text
- Submit review
- Log in with staff privileges
- Go to book detail page
- Click "Update Media"
- Upload cover image and/or sample file
- Images are automatically resized to 300x300px
Access the admin panel at /admin/ with superuser credentials.
Admin capabilities:
- Manage books, publishers, contributors
- Moderate reviews
- Manage user accounts
- View all database records
- Bulk operations
- name (CharField, max 50)
- website (URLField)
- email (EmailField)- title (CharField, max 70)
- publication_date (DateField)
- isbn (CharField, max 20, unique)
- publisher (ForeignKey β Publisher)
- contributors (ManyToMany β Contributor)
- cover (ImageField, optional)
- sample (FileField, optional)- first_names (CharField, max 50)
- last_names (CharField, max 50)
- email (EmailField)- book (ForeignKey β Book)
- contributor (ForeignKey β Contributor)
- role (CharField: AUTHOR, CO_AUTHOR, EDITOR)- content (TextField)
- rating (IntegerField, 0-5)
- date_created (DateTimeField, auto)
- date_edited (DateTimeField, nullable)
- creator (ForeignKey β User)
- book (ForeignKey β Book)Publisher ββ< Book ββ< Review
β
βββ< BookContributor >ββ Contributor
β
βββ User (creator of reviews)
Edit static/main.css:
:root {
--pure-black: #000000; /* Background */
--pure-white: #FFFFFF; /* Text/borders */
--light-gray: #999999; /* Secondary text */
/* Modify these values */
}In templates/base.html and static/main.css:
/* Headings */
font-family: 'Playfair Display', serif;
/* Body text */
font-family: 'Inter', sans-serif;
/* Change to your preferred fonts */Grid columns in static/main.css:
.book-grid {
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
/* Change 300px to adjust card width */
gap: 3rem; /* Adjust spacing */
}Create in reviews/templatetags/:
from django import template
register = template.Library()
@register.filter
def your_custom_filter(value):
return modified_valueKey settings in bookr/settings.py:
# Debug mode (set to False in production)
DEBUG = True
# Allowed hosts
ALLOWED_HOSTS = [] # Add your domain in production
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Media files
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
# Static files
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]For production, use environment variables:
# .env file (create this)
SECRET_KEY=your-secret-key-here
DEBUG=False
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
DATABASE_URL=your-database-urlInstall python-decouple:
pip install python-decoupleUpdate settings:
from decouple import config
SECRET_KEY = config('SECRET_KEY')
DEBUG = config('DEBUG', default=False, cast=bool)# Run all tests
python manage.py test
# Run tests for specific app
python manage.py test reviews
# Run with verbosity
python manage.py test --verbosity=2
# Run specific test case
python manage.py test reviews.tests.Activity1TestThe project includes tests for:
- Form validation (
SearchForm) - View rendering (
book_search) - Template content verification
- Data retrieval and filtering
Create tests in reviews/tests.py:
from django.test import TestCase, Client
class YourTestCase(TestCase):
def setUp(self):
# Set up test data
pass
def test_your_feature(self):
# Test your feature
self.assertEqual(expected, actual)Endpoint: /api/all_books/
Method: GET
Authentication: Not required
Response:
[
{
"title": "Advanced Deep Learning with Keras",
"publication_date": "2018-10-31",
"isbn": "9781788629416",
"publisher": {
"name": "Packt Publishing",
"website": "https://www.packtpub.com",
"email": "[email protected]"
}
}
]Endpoint: /api/contributors/
Method: GET
Authentication: Not required
Response:
[
{
"first_names": "Rowel",
"last_names": "Atienza",
"email": "[email protected]",
"bookcontributor_set": [
{
"book": {
"title": "Advanced Deep Learning with Keras",
"publication_date": "2018-10-31",
"isbn": "9781788629416",
"publisher": {...}
},
"role": "AUTHOR"
}
],
"number_contributions": 1
}
]- Set
DEBUG = False - Configure
ALLOWED_HOSTS - Use environment variables for secrets
- Set up production database (PostgreSQL recommended)
- Configure static file serving
- Set up media file storage (S3, etc.)
- Enable HTTPS
- Configure email backend
- Set up logging
- Run
collectstatic - Create superuser account
# Install Heroku CLI and login
heroku login
# Create Heroku app
heroku create your-app-name
# Add PostgreSQL
heroku addons:create heroku-postgresql:hobby-dev
# Set environment variables
heroku config:set SECRET_KEY='your-secret-key'
heroku config:set DEBUG=False
# Deploy
git push heroku main
# Run migrations
heroku run python manage.py migrate
# Create superuser
heroku run python manage.py createsuperuser
# Open app
heroku open- Connect GitHub repository
- Configure build settings
- Add environment variables
- Deploy automatically on push
Use gunicorn + nginx:
# Install gunicorn
pip install gunicorn
# Run with gunicorn
gunicorn bookr.wsgi:application --bind 0.0.0.0:8000Configure nginx as reverse proxy.
- CSRF Protection - Enabled by default
- XSS Prevention - Template auto-escaping
- SQL Injection Protection - Django ORM
- Password Hashing - PBKDF2 algorithm
- Session Security - Secure cookies in production
# In production settings.py:
# Security settings
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_BROWSER_XSS_FILTER = True
SECURE_CONTENT_TYPE_NOSNIFF = True
X_FRAME_OPTIONS = 'DENY'
# HSTS
SECURE_HSTS_SECONDS = 31536000
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_HSTS_PRELOAD = TrueWe welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Make your changes
- Run tests (
python manage.py test) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow PEP 8 style guide for Python code
- Write descriptive commit messages
- Add tests for new features
- Update documentation as needed
- Keep pull requests focused on single features
# Good
def calculate_average_rating(reviews):
"""Calculate the average rating from a list of reviews."""
if not reviews:
return 0
return sum(r.rating for r in reviews) / len(reviews)
# Use type hints when helpful
from typing import List
def get_top_books(limit: int = 10) -> List[Book]:
return Book.objects.all()[:limit]This project is licensed under the MIT License - see below for details:
MIT License
Copyright (c) 2026 Bookr
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
Q: How do I reset my database?
rm db.sqlite3
python manage.py migrate
python manage.py createsuperuserQ: Book covers aren't showing?
A: Ensure MEDIA_URL is configured and media files are being served in development.
Q: How do I add more sample data?
A: Edit WebDevWithDjangoData.csv and run the loadcsv command again.
Q: Can I use a different database?
A: Yes! Update DATABASES in settings.py. PostgreSQL is recommended for production.
- β Core book catalog
- β Review system
- β User authentication
- β Search functionality
- β Elegant UI design
- β RESTful API
- User wishlists
- Book recommendations
- Social sharing features
- Email notifications
- Advanced filtering
- Reading lists/collections
- Book clubs feature
- Mobile app (React Native)
- GraphQL API
- Full-text search (Elasticsearch)
- Multi-language support
- CapBraco - Initial work - YourGitHub
See the list of contributors who participated in this project.
- Packt Publications - For educational resources
- Django Community - For the excellent framework
- Bugatti - For design inspiration
- Bootstrap - For responsive framework
- Font Awesome - For icons
- Google Fonts - For typography
- Coffee β - For keeping the development going
- The open-source community - For making this possible
Elegant landing page with recently viewed books
Complete catalog with cover images and ratings
Detailed book view with reviews
If you find this project useful, please consider giving it a star! β
Built with β€οΈ using Django
