An academic FastAPI project providing access to a rich collection of Tunisian proverbs and traditional wisdom.
# π 7keyet-zmen (ΨΩΨ§ΩΨ§Ψͺ Ψ²Ω
Ψ§Ω) - Tunisian Proverbs API
An academic FastAPI project providing access to a rich collection of Tunisian proverbs and traditional wisdom.
## π Project Overview
This RESTful API allows users to browse, search, and interact with over 1600 Tunisian proverbs. Built with FastAPI, it demonstrates modern API development practices including proper architecture, testing, documentation, and deployment.
## β¨ Features
- π **Browse Proverbs**: Paginated list of all proverbs
- π² **Random Proverb**: Get a random proverb for inspiration
- π **Search**: Full-text search in proverb content
- π **Filtering & Sorting**: Advanced query capabilities
- π€ **ML Classification**: Automatic categorization of proverbs into 15 themes using supervised machine learning
- π **Auto-Translation**: Automatic Arabic-to-English translation using MyMemory API
- π **Authentication**: JWT-based auth for write operations
- π **Auto-Generated Docs**: Swagger UI and ReDoc
- β
**Comprehensive Testing**: Unit and integration tests
- π³ **Docker Support**: Containerized deployment
## π οΈ Tech Stack
- **Framework**: FastAPI 0.115.0
- **Database**: SQLite (dev) / PostgreSQL (prod)
- **ORM**: SQLAlchemy 2.0
- **Validation**: Pydantic V2
- **Machine Learning**: scikit-learn 1.8.0 (TF-IDF + Naive Bayes)
- **Testing**: pytest, httpx
- **Documentation**: Swagger UI, ReDoc
## π Project Structure
```
7keyet-zmen/
βββ app/
β βββ main.py # FastAPI app entry point
β βββ config.py # Configuration management
β βββ database.py # Database setup
β βββ models/ # SQLAlchemy models
β βββ schemas/ # Pydantic schemas
β βββ services/ # Business logic
β βββ api/v1/ # API endpoints
β βββ auth/ # Authentication
β βββ ml/ # Machine Learning classifier
βββ tests/ # Test suite
βββ data/ # Data files
β βββ complete_proverbs.json # F β¦