This project is a full-stack book recommendation engine that leverages semantic search to help users find books based on natural language queries. It combines a modern React frontend with a robust FastAPI backend, utilizing vector embeddings for intelligent search results.
- Framework: React (Vite)
- Styling: Tailwind CSS
- Routing: React Router
- State/Auth: Supabase Client
- Framework: FastAPI
- Vector Database: Qdrant (for semantic search)
- Database: Supabase (PostgreSQL for metadata and user data)
- ML Models: HuggingFace transformers (
all-MiniLM-L6-v2) for text embeddings - Caching: Custom Redis-based caching implementation
- Orchestration: Apache Airflow (DAGs for data pipelines)
- Semantic Search: Find books by describing plot, mood, or context rather than just keywords.
- User Authentication: Secure sign-up and login via Supabase.
- Book Management: Authenticated users can add new books to the database.
- Responsive Design: Modern interface built with Tailwind CSS.
backend/: Contains the FastAPI application, Airflow DAGs, and Docker configuration.frontend/: Contains the React application.models/: Directory for ML models.notebooks/: Jupyter notebooks for data exploration and testing.
- Python 3.11+
- Node.js & npm
- Docker (optional, for containerization)
- Redis server (running locally or remotely)
- Apache Airflow (for pipeline orchestration)
- Supabase account
- Qdrant account
- Navigate to the
backenddirectory. - Create a virtual environment and activate it.
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables in a
.envfile (refer to.env.example).- Ensure
REDIS_HOSTandREDIS_PORTare set correctly.
- Ensure
- Run the server:
uvicorn src.api:app --reload
- Ensure your Airflow environment is active.
- Point Airflow to the
backend/dagsdirectory. - Available DAGs:
update_embeddings_dag: Updates vector embeddings for new books.validation_dag: Validates system integrity and data consistency.
- Navigate to the
frontenddirectory. - Install dependencies:
npm install
- Configure environment variables (if required).
- Start the development server:
npm run dev
Once the backend is running, you can access the interactive API documentation at http://localhost:8000/docs.