Skip to content

MarceloAdan73/Django-Library

Repository files navigation

πŸ“š Digital Library Management System

CI

Django Python Tailwind CSS PostgreSQL Render

πŸš€ Visit the deployed application

πŸ‘‰ https://biblioteca-django-5dbk.onrender.com

⚠️ Admin Access: Run python startup.py - credentials auto-generated and saved to .admin_credentials Or click "Demo Login" button for instant access

✨ What's New

  • Demo Mode - One-click login without credentials

  • 8 Sample Books - Always available, even with empty database

  • English Interface - Full English translation

  • Secure Credentials - Auto-generated passwords, never hardcoded

  • Vista de la Biblioteca Digital


πŸ“– Overview

A modern, full-featured digital library management system built with Django and cutting-edge web technologies. This application provides a comprehensive solution for managing books, authors, categories, and user interactions with a beautiful, responsive interface that works seamlessly across all devices.

✨ Key Features

πŸ“š Core Library Management

  • Complete Book Catalog - Advanced CRUD operations with rich metadata
  • Author Management - Detailed author profiles with biographies and photos
  • Smart Categorization - Color-coded category system for intuitive organization
  • Advanced Search - Multi-criteria search across titles, authors, and categories

πŸ” User Management System

  • Demo Login - One-click access without credentials
  • Secure Authentication - Robust login/logout system with session management
  • Book Reservation System - Complete loan management with due dates
  • Review & Rating System - User-generated content with moderation
  • Personal Dashboard - Customized user experience with personal libraries

🌐 Advanced Integrations

  • Google Books API Integration - Automatic book data import with high-quality covers
  • Responsive Design - Mobile-first approach with Tailwind CSS
  • Dark/Light Mode - Toggleable theme system with persistent preferences
  • Real-time UI - Alpine.js powered interactive components

πŸ›‘οΈ Administrative Features

  • Django Admin Interface - Full administrative control panel
  • User Management - Granular permission and role management
  • Database Operations - Advanced data management and analytics
  • System Monitoring - Comprehensive logging and performance tracking

πŸ—οΈ Technology Stack

Backend Technologies

Technology Purpose Version
Django Web Framework & ORM 5.2.8
Python Programming Language 3.10+
PostgreSQL Production Database 16
SQLite Development Database 3.x
Gunicorn Production WSGI Server 21.2.0

Frontend Technologies

Technology Purpose Version
Tailwind CSS Utility-First CSS Framework 3.3.x
Alpine.js Lightweight JavaScript Framework 3.x
Font Awesome Professional Icon Library 6.0.0
Google Fonts Modern Typography (Inter) Latest

Deployment & External Services

Technology Purpose
Render Cloud Deployment Platform
Google Books API External Book Data Source

πŸ“ Project Architecture

biblioteca-django/
β”œβ”€β”€ biblioteca_project/          # Django project configuration
β”‚   β”œβ”€β”€ settings.py             # Project settings and configuration
β”‚   β”œβ”€β”€ urls.py                 # Main URL routing
β”‚   └── wsgi.py                 # WSGI application entry point
β”œβ”€β”€ biblioteca/                 # Main application module
β”‚   β”œβ”€β”€ models.py              # Database models and relationships
β”‚   β”œβ”€β”€ views.py               # Business logic and view controllers
β”‚   β”œβ”€β”€ urls.py                # Application URL routing
β”‚   β”œβ”€β”€ admin.py               # Django admin customization
β”‚   └── google_books.py        # Google Books API integration
β”œβ”€β”€ templates/                  # HTML template system
β”‚   β”œβ”€β”€ base.html              # Main layout template
β”‚   β”œβ”€β”€ biblioteca/            # Application-specific templates
β”‚   β”‚   β”œβ”€β”€ index.html         # Homepage
β”‚   β”‚   β”œβ”€β”€ libro_list.html    # Book catalog
β”‚   β”‚   β”œβ”€β”€ libro_detail.html  # Book details
β”‚   β”‚   β”œβ”€β”€ register.html      # User registration
β”‚   β”‚   └── importar_libros.html # Book import interface
β”‚   └── registration/          # Authentication templates
β”‚       β”œβ”€β”€ login.html         # Login page
β”‚       └── logged_out.html    # Logout confirmation
β”œβ”€β”€ media/                     # User-uploaded files
β”‚   β”œβ”€β”€ portadas/              # Book cover images
β”‚   └── autores/               # Author photos
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ build.sh                   # Deployment build script
β”œβ”€β”€ startup.py                 # Application initialization
└── README.md                  # Project documentation

πŸ—ƒοΈ Database Models

Core Data Models

πŸ“š Book Model

  • Title, ISBN, description, and metadata
  • Many-to-many relationships with authors and categories
  • Stock management and availability status
  • Cover image handling and storage

✍️ Author Model

  • Comprehensive author profiles
  • Biographical information and nationality
  • Professional photos and metadata

🏷️ Category Model

  • Hierarchical categorization system
  • Color-coded visual identification
  • Descriptive metadata and organization

πŸ“‹ Loan & Review System

  • Complete loan tracking with dates and status
  • User rating system (1-5 stars)
  • Comment moderation and management

🌐 API Integration

Google Books API Implementation

The application features deep integration with Google Books API:

Advanced book search and import functionality

from biblioteca.google_books import GoogleBooksAPI

api = GoogleBooksAPI() results = api.buscar_libros("advanced search query", max_results=10) imported_books = api.importar_libro_desde_api(book_data)

Key Features:

βœ… Automatic ISBN validation and duplicate prevention

βœ… High-resolution cover image downloading

βœ… Author and category auto-creation

βœ… Robust error handling and retry mechanisms

🎨 User Interface & Experience Design System πŸ“± Responsive Grid Layout - Adapts perfectly to desktop, tablet, and mobile

🎨 Glassmorphism Effects - Modern translucent design elements

⚑ Micro-interactions - Smooth animations and state transitions

β™Ώ Accessibility First - WCAG 2.1 compliant with keyboard navigation

Component Library πŸ“– Interactive Book Cards - Hover effects and quick actions

🧭 Sticky Navigation - Persistent header with mobile hamburger menu

πŸ“ Smart Forms - Real-time validation and user feedback

πŸ’¬ Modal Systems - Contextual information and actions

πŸ”§ Configuration & Setup Environment Configuration

Production-ready settings with environment variables

SECRET_KEY = os.environ.get('SECRET_KEY', 'development-fallback') DEBUG = os.environ.get('DEBUG', 'False').lower() == 'true' ALLOWED_HOSTS = ['.onrender.com', 'localhost', '127.0.0.1']

Production Deployment Render Platform Configuration:

πŸ”„ Automatic builds from GitHub repository

πŸ—„οΈ PostgreSQL database provisioning

πŸ”’ SSL certificate management

βš™οΈ Environment variable management

πŸš€ Deployment Process Automated Build Pipeline

build.sh - Complete deployment script

#!/bin/bash python -m pip install --upgrade pip pip install -r requirements.txt python manage.py collectstatic --noinput python manage.py migrate

Startup Process

Start Command in Render

python manage.py migrate && python startup.py && gunicorn biblioteca_project.wsgi:application

πŸ“Š Performance & Metrics Codebase Statistics Metric Value Python Business Logic ~500+ lines HTML Templates ~300+ lines Tailwind CSS Styling ~200+ lines Database Models 5 sophisticated models View Controllers 8 comprehensive controllers URL Routes 10+ carefully designed routes Sample Books 24+ demonstration catalog System Performance πŸ–ΌοΈ 91.7% cover image availability rate

⚑ Sub-second page load times

πŸ“± 100% mobile responsiveness

πŸ”„ Zero-downtime deployment capability

πŸ† Technical Achievements Backend Excellence βœ… Full Django ORM with optimized queries

βœ… RESTful API design patterns implementation

βœ… Secure authentication and authorization

βœ… Comprehensive error handling and logging

Frontend Innovation βœ… Modern component-based architecture

βœ… Progressive enhancement strategies

βœ… Cross-browser compatibility

βœ… Performance-optimized asset delivery

DevOps & Deployment βœ… Automated CI/CD pipeline

βœ… Production-ready configuration

βœ… Scalable database architecture

βœ… Comprehensive monitoring setup

🀝 AI Collaboration Disclosure Development Methodology This project was developed using an AI-assisted approach that significantly enhanced productivity and code quality. The collaboration included:

πŸ—οΈ Architecture & Planning AI-assisted system design and database modeling

Technology stack selection and configuration

API integration strategy and implementation

πŸ’» Code Development AI-generated boilerplate and complex feature implementations

Algorithm optimization and performance improvements

Security best practices and vulnerability prevention

πŸ”§ Problem Solving Real-time debugging assistance and error resolution

Performance optimization recommendations

Code review and quality assurance

πŸ“š Documentation & Deployment Comprehensive documentation generation

Deployment configuration and optimization

Production readiness validation

This AI-human collaboration enabled the rapid development of a professional-grade application while maintaining high standards of code quality, security, and maintainability.

πŸ› οΈ Development Guide Local Development Setup

  1. Environment Preparation

git clone https://github.com/MarceloAdan73/biblioteca-django.git cd biblioteca-django python -m venv venv source venv/bin/activate # Linux/Mac

OR

venv\Scripts\activate # Windows

  1. Dependencies Installation bash pip install -r requirements.txt

  2. Database Setup python manage.py migrate python startup.py # Creates admin + loads 8 sample books

  3. Development Server python manage.py runserver

Production Deployment Environment Variables SECRET_KEY=your-production-secret-key DEBUG=False PYTHON_VERSION=3.10.0

Database Configuration πŸ—„οΈ Automatic PostgreSQL setup on Render

πŸ”„ Database migrations executed on deploy

πŸ’Ύ Persistent data storage

πŸ“„ License This project is open source and available under the MIT License.

πŸ‘¨β€πŸ’» Author Marcelo Adan

GitHub: @MarceloAdan73

Project Repository: biblioteca-django

Live Application: biblioteca-django-5dbk.onrender.com

πŸ™ Acknowledgments Django Software Foundation - For the incredible web framework

Tailwind CSS Team - For the utility-first CSS framework

Google Books API - For comprehensive book data

Render Platform - For seamless deployment experience

AI Assistance Technologies - For enhanced development capabilities

⭐ If you find this project helpful, please consider giving it a star! Built with ❀️ using modern web technologies and AI collaboration

About

Digital library system developed with Django, Tailwind CSS and Alpine.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages