A modern, feature-rich digital library platform where users can discover, share, and manage books. Built with Django and Tailwind CSS.
- Book Upload & Management - Upload PDFs with automatic cover generation
- Smart Search - Search by title, author, tags, or uploader
- User Profiles - Custom profiles with avatars and social links
- Rating System - 1-5 star ratings with averages
- Favorites & Playlists - Bookmark books and create reading lists
- Comments & Reviews - Community engagement system
- Responsive Design - Mobile-first with dark/light themes
- Interactive UI - Carousels, hover effects, smooth animations
- Real-time Search - AJAX-powered search suggestions
- File Handling - PDF validation and automatic thumbnail generation
- Python 3.8+
- SQLite (default) or PostgreSQL
# Clone and setup
git clone <repository-url>
cd Library
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Setup database
python manage.py migrate
python manage.py createsuperuser
# Run development server
python manage.py runserverVisit http://localhost:8000 and start exploring!
Library/
βββ accounts/ # User authentication & profiles
βββ books/ # Core book functionality
βββ special/ # Admin tools (bulk uploads)
βββ templates/ # Base templates
βββ static/ # CSS, JS, images
βββ media/ # Uploaded files (books, covers, profiles)
βββ library/ # Project settings
- accounts - User registration, profiles, authentication
- books - Book management, search, reviews, playlists
- special - Administrative features (bulk operations)
class Books(models.Model):
title = models.CharField(max_length=200)
author = models.CharField(max_length=200)
uploader = models.ForeignKey(User)
price = models.IntegerField() # Free/paid books
visibility = models.CharField(choices=['public', 'private', 'unlisted'])
tags = models.ManyToManyField(Tag)
# Automated: slug, upload_date, cover_page generationclass ProfileModel(models.Model):
user = models.OneToOneField(User)
avatar = models.ImageField(upload_to="profiles/")
balance = models.IntegerField(default=0)
social_link = models.URLField(blank=True)- BookRating - User ratings (1-5 stars)
- BookFavorite - Favorite books tracking
- Comment - User reviews and discussions
- Playlist - Custom book collections
- Report - Content moderation system
- Upload PDF books (25MB max, PDF only)
- Automatic cover generation from PDF first page
- Public/Private/Unlisted visibility options
- Free and paid book options
# Multi-field search
Books.objects.filter(
Q(title__icontains=query) |
Q(author__icontains=query) |
Q(tags__name__icontains=query) |
Q(uploader__username__icontains=query)
)- Rate books (1-5 stars with averages)
- Add to favorites
- Create and manage playlists
- Comment and review books
- Follow other users
Create a .env file:
DEBUG=True
SECRET_KEY=your-secret-key-here
ALLOWED_HOSTS=localhost,127.0.0.1DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}- Tailwind CSS with custom components
- Dark/light theme toggle
- Mobile-optimized navigation
- Accessible form controls
- Featured books carousel with auto-play
- Real-time search suggestions
- Toast notifications
- Hover effects and smooth transitions
base.html- Main layout with navigationindex.html- Homepage with featured content- App-specific templates in each app's
templates/directory
class Meta:
permissions = [
("can_bulk_upload", "Can bulk upload books"),
]- Bulk book uploads (
/special/bulk-upload/) - Bulk tag management (
/special/bulk-tags/) - Featured books management
# Collect static files
python manage.py collectstatic
# Database setup
python manage.py migrate
# Create superuser
python manage.py createsuperuser
# Run with production server
python manage.py runserver 0.0.0.0:8000docker-compose up -d- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- π§ Email: thesheikh255@gmail.com
- π Issues: GitHub Issues
Ready to start? Run python manage.py runserver and visit http://localhost:8000!
Happy reading! πβ¨