# Architecture Overview The project is built with **FastAPI** as the main backend framework, connected to several supporting services. # Core Components # FastAPI – Backend Framework - Python-based, **asynchronous**, designed for high performance. - Project follows a **feature-based module structure** (e.g., `user`, `auth`, `search`). - 📌 **Why FastAPI?**: API-first approach, strong community support, scalability. --- # PostgreSQL – Relational Database - Stores core **business and transactional data**. - 📌 **Why PostgreSQL?**: ACID compliance, strong relational support, BI/reporting friendly. --- # Milvus – Vector Database - Manages **vector embeddings** from AI/ML models. - Used for **semantic search, recommendation, and similarity search**. - 📌 **Why Milvus?**: Open-source, scalable, optimized for AI-driven workloads. --- # Redis – Cache & Session Management - Provides **caching** to speed up responses and reduce database load. - Manages **user sessions** and temporary tokens. - 📌 **Why Redis?**: In-memory database with very high performance. --- # Pydantic Settings – Environment Configuration - Centralized management of configuration (DB URLs, API keys, secrets). - Supports multiple environments: **development, testing, production**. - 📌 **Why Pydantic?**: Reduces risk of misconfiguration, easy validation. --- # Docker Compose – Development Environment - Bundles services into a single development environment:FastAPI - PostgreSQL - Milvus - Redis Developers only need to run **`docker-compose up`** to start working. 📌 **Why Docker Compose?**: Ensures consistent environments across the entire team. --- # Onboarding Guidelines | Area | Guideline | |---|---| | **Code** | Follow the **feature-based module structure**. | | **Database** | Use **PostgreSQL** for relational data, **Milvus** for vector data only. | | **Cache** | Use **Redis** for session and caching. | | **Config** | All settings managed via **Pydantic Settings** (no hard-coded values). | | **Environment** | Always use **Docker Compose** instead of manual local installations. |