Skip to content

mgul1/BiblioDrift

Β 
Β 

Repository files navigation

🌌 BiblioDrift β€” Drift Through Stories, Not Screens

Live App NSoC 2026 GSSOC 2026

"Find yourself in the pages."
A calm, immersive, AI-powered book discovery experience.


🌿 The Idea

Most platforms make reading feel like:

  • ❌ Endless scrolling
  • ❌ Algorithm overload
  • ❌ No emotional connection

BiblioDrift is different.

It feels like:

πŸ“š Walking into a quiet bookstore
β˜• Picking a book based on mood
🌧️ Letting the atmosphere guide you


🌟 Core Philosophy

  • 🧘 Zero UI Noise β†’ No clutter, no distractions
  • 🎭 Vibe-First Discovery β†’ Search by feeling, not metadata
  • πŸ“– Tactile Interaction β†’ Books behave like real objects
  • πŸ€– AI as a Bookseller β†’ Not recommendations, but conversations

✨ Experience Highlights

πŸ“š Interactive Library

  • 3D books you can pull, flip, and explore
  • Shelf-based organization (Want / Reading / Favorites)

🧠 AI-Powered Discovery

  • Mood-based recommendations (e.g., β€œrainy mystery”)
  • Dynamic AI-generated blurbs
  • Conversational assistant β†’ Elara, the Bookseller

🌌 Immersive UX

  • Glassmorphism interface
  • Ambient sounds (rain, fireplace)
  • Emotion-based tagging system

⚑ Performance & UX

  • Skeleton loaders (smooth loading)
  • LocalStorage persistence
  • Seamless interactions

πŸ› οΈ Tech Stack

Layer Technology
Frontend HTML5, CSS3 (3D), Vanilla JS
API Google Books API
Backend Flask, SQLAlchemy, JWT cookies
AI LLM-powered notes, chat, and mood analysis
Storage LocalStorage

πŸ€– AI-Only Recommendation System

BiblioDrift follows a strict rule:

  • ❌ No hardcoded lists
  • ❌ No manual curation
  • βœ… 100% AI-generated discovery

AI considers:

  • Mood
  • Emotional tone
  • Intent
  • Vibe

πŸš€ Features Roadmap

  • πŸ€– AI-powered recommendations (core)
  • 🧠 Conversational librarian (Elara)
  • 🌧️ Mood-based discovery engine
  • 🎧 Ambient environments
  • πŸ“Š Emotion analytics (future)

🧠 System Architecture

Frontend = Librarian
Backend = Curator

graph TD
    A[Frontend UI] -->|Mood Query| B[Flask Backend]
    B -->|Prompt Engineering| C[LLM / AI Service]
    C -->|Generated Insight| B
    B -->|JSON Response| A
    A -->|Book Data| D[Google Books API]
    A -->|Persistence| E[LocalStorage]
Loading

πŸ€– Project Structure

BIBLIODRIFT/
β”‚
β”œβ”€β”€ backend/                     #  Python backend logic
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ ai_service.py
β”‚   β”œβ”€β”€ cache_service.py
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ error_responses.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ security_utils.py
β”‚   β”œβ”€β”€ validators.py
β”‚   β”‚
β”‚   β”œβ”€β”€ mood_analysis/          # mood-based recommendation logic
β”‚   └── purchase_links/         # purchase link generation
|   β”œβ”€β”€ price_tracker/   
β”‚
β”œβ”€β”€ frontend/                   #  UI (client-side)
β”‚   β”œβ”€β”€ pages/                  # HTML files
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   β”œβ”€β”€ auth.html
β”‚   β”‚   β”œβ”€β”€ chat.html
β”‚   β”‚   β”œβ”€β”€ library.html
β”‚   β”‚   β”œβ”€β”€ profile.html
β”‚   β”‚   └── 404.html
β”‚   β”‚
β”‚   β”œβ”€β”€ js/                     # JavaScript
β”‚   β”‚   β”œβ”€β”€ app.js
β”‚   β”‚   β”œβ”€β”€ chat.js
β”‚   β”‚   β”œβ”€β”€ config.js
β”‚   β”‚   β”œβ”€β”€ footer.js
β”‚   β”‚   └── library-3d.js
β”‚   β”‚
β”‚   β”œβ”€β”€ css/                    # Styles
β”‚   β”‚   β”œβ”€β”€ style.css
β”‚   β”‚   β”œβ”€β”€ style_main.css
β”‚   β”‚   └── style-responsive.css
β”‚   β”‚
β”‚   β”œβ”€β”€ assets/                 # Images, sounds
β”‚   β”‚   β”œβ”€β”€ images/
β”‚   β”‚   └── sounds/
β”‚   β”‚
β”‚   └── script/                 # extra JS (header scroll etc.)
β”‚
β”œβ”€β”€ config/                     # βš™οΈ Configuration
β”‚   β”œβ”€β”€ .env.development
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ .env.testing
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── runtime.txt
β”‚
β”œβ”€β”€ docs/                       # πŸ“š Documentation
β”‚   β”œβ”€β”€ contributing.md
β”‚   β”œβ”€β”€ Open-Source-Event-Guidelines.md
β”‚   β”œβ”€β”€ TUTORIAL.md
β”‚   └── page.png
β”‚
β”œβ”€β”€ tests/                      # πŸ§ͺ Test files
β”‚   β”œβ”€β”€ test_api.py
β”‚   β”œβ”€β”€ test_llm.py
β”‚   └── test_validation.py
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ netlify/                    # deployment config
β”œβ”€β”€ script/ (if any left)       
β”œβ”€β”€ venv/                       
└── .vscode/

πŸ€– AI Recommendation Policy

BiblioDrift follows a strict AI-only recommendation model.

  • All recommendations must be generated dynamically using AI/LLMs.
  • Manual curation, editor picks, static mood lists, or hardcoded book mappings are not allowed.
  • AI outputs should be based on abstract signals such as:
    • Vibes
    • Mood descriptors
    • Emotional tone
    • Reader intent

This ensures discovery stays organic, scalable, and aligned with BiblioDrift’s philosophy of vibe-first exploration.

πŸ“¦ Installation & Setup

Frontend (Current MVP)

  1. Clone the repository: bash git clone https://github.com/devanshi14malhotra/bibliodrift.git

  2. Open index.html in your browser.

    • That's it! No build steps required for the vanilla frontend.

Backend

The Flask backend powers authentication, library sync, AI blurbs, chat, mood analysis, and other API flows.

🚒 Deployment Notes

  • Netlify should serve the static frontend from the generated dist/ bundle.
  • The Flask backend, database, Redis, and AI services are not hosted by Netlify.
  • To make the API work in production, deploy the backend separately and point the frontend MOOD_API_BASE to that host.

Screenshots

Discovery & Virtual Library

Home Page

Virtual Library Sign In Page

Capturing the tactile, vibe-first essence of BiblioDrift.


🧠 AI Service Integration

To keep the frontend and backend synced, use the following mapping:

Feature Frontend Call (app.js) API Endpoint (app.py) Logic Provider (ai_service.py)
Book Vibe POST /api/v1/generate-note handle_generate_note() generate_book_note()

API Integration

  • Endpoint: POST /api/v1/generate-note
  • Logic: Processed by ai_service.py

πŸ“‘ API Request & Response Examples

Endpoint: Generate Book Note

Method: POST URL: /api/v1/generate-note Description: Generates an AI-powered "bookseller note" based on the book's vibe, mood, and metadata.


Request

Headers

json { "Content-Type": "application/json" }

Body

json { "title": "The Night Circus", "author": "Erin Morgenstern", "mood": "mysterious, magical, slow-burn romance" }


Response

Success (200 OK)

json { "status": "success", "note": "A dreamlike duel unfolds in a wandering circus of shadows and light. Perfect for readers who crave atmospheric magic and quiet intensity." }

Error (400 Bad Request)

json { "status": "error", "message": "Missing required fields: title or mood" }


API Flow Explanation

  1. Frontend sends a POST request from app.js to /api/v1/generate-note.
  2. The Flask backend (app.py) receives the request via handle_generate_note().
  3. Input data (title, author, mood) is validated.
  4. The request is passed to generate_book_note() in ai_service.py.
  5. The AI model generates a contextual "bookseller note".
  6. The backend returns the generated note as a JSON response.
  7. Frontend displays the note in the book popup UI.

🀝 Contributing

We welcome contributions to make BiblioDrift cozier!

  1. Fork the repo.
  2. Create a feature branch such as feature/cozy-mode.
  3. Make your changes and test them locally.
  4. Push your branch and open a Pull Request.

See CONTRIBUTING.md for the fuller workflow and contribution rules.

πŸ“„ License

MIT License.


Built by Devanshi Malhotra and contributors, with β˜• and code.

If you like this project, please consider giving the repository a ⭐ STAR ⭐.

About

Feels like wandering through a warm, quiet bookstore...

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 47.2%
  • JavaScript 24.3%
  • CSS 21.6%
  • HTML 6.8%
  • Other 0.1%