Book Recommender is a modular, production-ready open-source project for intelligent, secure, and extensible book recommendations. Built for clarity, security, and professional review, it follows Clean Code, SOLID, and GitGuardian security standards.
Finding relevant books is hard. Most recommenders are generic, slow, or insecure. This project delivers fast, personalized, and secure recommendations using modern LLMs and the Google Books API.
Modular Structure:
book_recommender_using_langchain/
├── src/
│ └── book_recommender/ # Core logic (modular, SOLID)
├── config/ # Configuration, secrets, logging
├── scripts/ # Automation, utilities
├── tests/ # Unit & integration tests
├── docs/ # API, architecture, ADRs
├── .env.example # Environment variable template
├── .gitignore # Security-focused ignores
├── SECURITY.md # Security policy
├── CHANGELOG.md # Release notes
├── README.md # This file
└── ...
See docs/ARCHITECTURE.md for details.
- Python 3.10+
- Langchain, Gradio, Google Books API
- Structured logging, dotenv, pytest, ruff, black
- Clone the repository
git clone <your-repo-url> cd Book_Recommender_Using_Langchain
- Configure environment
cp .env.example .env # Edit .env and add your GOOGLE_BOOKS_API_KEY - Install dependencies
pip install -r requirements.txt
- Run the application
python book_recommender.py
Visit http://localhost:7860 to use the UI.
- No hardcoded secrets; use
.envandconfig/ - Sensitive files and environments are gitignored
- See SECURITY.md for responsible disclosure
- Tests in
tests/(unit & integration) - Example:
pytest pytest --cov=src/book_recommender
- Coverage goal: 80%+
- See CONTRIBUTING.md for test writing guidelines
- Lint:
ruff check src/ tests/ - Format:
black src/ tests/ - Pre-commit:
pre-commit run --all-files - All code is type-annotated and documented
- Recommended: GitHub Actions (see
.github/workflows/) - Run tests, lint, and security checks on every PR
- ARCHITECTURE.md: System design
- API.md: API reference
- CONTRIBUTING.md: How to contribute
- CHANGELOG.md: Release history
- Recruiter- and reviewer-friendly: Clean, modular, and well-documented
- Secure by default: No secrets in code, safe input handling
- Easy to extend: Add new recommenders, UIs, or data sources
- Production-ready: Logging, error handling, and test coverage
MIT
For questions or contributions, see CONTRIBUTING.md.