How mb-13/book_recommendation_site works
Project Type and Purpose
• The repository is a Django-driven web application called “Book Recommendation Site” (a full-stack site).
• It features multiple functionalities such as personalized recommendations, semantic search using SBERT/SentenceTransformer, real‐time search suggestions, infinite scrolling, and user session/authentication.
• The project includes both frontend components (HTML/CSS/JS in static and templates directories) and backend logic (divided into several Django apps).
File Structure for Components
• Top-level Django project folder: “Book_Site” where settings, URL routing (urls.py), and WSGI/ASGI configurations reside.
• Several Django apps including:
• Book_Detail_Page: Handles detailed book info pages.
• Genre_Page: Manages genre-specific book listings.
• Home_Page: Likely the landing/home page with featured recommendations.
• Search_Page: Implements the semantic/embedding-based search feature.
• login_and_signup: Manages user authentication (login, register, password reset).
• Other assets:
• Static directories (global and per app) for CSS, JS, and images.
• HTML templates (global base template and app-specific templates).
• CSV data files (e.g., Book-DataV1.csv, Book-DataV2.csv, bestseller.csv) that likely feed into the database or recommendations.
• A demo folder with a demo video illustrating navigation.
• The presence of migrations indicate standard Django ORM integration with a database for persisting user data, book details, etc.
• The README also hints at external modules for natural language processing (SBERT/SentenceTransformer) and web scraping (Beautiful Soup).
Architectural Components and Their Relationships
• Frontend Client:
• Browser or client-side interface that loads HTML/CSS/JS.
• Provides pages for home, search, book details, genre browsing, and user authentication.
• Django Server:
• Main “Book_Site” project as the core engine.
• Routes incoming HTTP requests to the appropriate app via URL configurations.
• Each Django app (e.g., Home_Page, Book_Detail_Page, etc.) acts as a modular component handling specific functionalities.
• Database and ORM:
• Django ORM with migrations in every app for persisting and querying data related to books, user details, and recommendations.
• Recommendation & Search Engine:
• Uses SBERT/SentenceTransformer to generate and use book embeddings.
• Responsible for personalized recommendations and embedding-based search.
• External Data Sources:
• CSV data files for seeded book data.
• Web scraping scripts (using Beautiful Soup) to update or create the database from Goodreads.
• User Session Management:
• Handled through the login_and_signup app, ensuring data security and personalized interactions.
• Break the system into clear, separate components:
• Frontend/Client (Browser/User Interface)
• Backend Server (Django Project)
• Book_Detail_Page
• Home_Page
• Genre_Page
• Search_Page
• login_and_signup
• Database (Django ORM-backed RDBMS)
• Recommendation Engine (SBERT & SentenceTransformer component)
• Data Import/Transformation layer (CSV data sources and web scraping scripts)
• Directional interactions:
• Data flow between the Backend Server and the Database (CRUD operations via the ORM).
• Data Import layer (CSV files, Beautiful Soup scraping routines) to the Database for initial/population data.
• Use another for backend modular apps.
Final Elements to Be Present
• Clear labels for each component (e.g., “Frontend Client”, “Django Server: Book_Detail_Page”, “Database”, “Recommendation Engine”).
• Client → Django Server (HTTP requests).
• Django Server → Database (ORM queries; migration flows).
• Django Server → External Services/Modules (embedding-based search, web scraping).
• Django apps versus external libraries/services.
• Presentation vs. business logic layers.
Happy designing!