Skip to content

Latest commit

 

History

History

README.md

Backend Documentation

Backend-specific technical documentation for ComponentForge.

Core Documentation

  • Backend Architecture - Complete backend system architecture, module organization, and patterns
  • AI Pipeline - LangChain/LangGraph workflows, multi-agent orchestration, and LLM integration
  • Database Schema - PostgreSQL schema, models, queries, and migration strategies

Additional Resources

Technical Analysis

  • Caching Analysis - Comprehensive analysis of caching strategies (prompt, embedding, result caching)
  • Guardrails Analysis - Security guardrails assessment and implementation review

Quick Reference

Running the Backend

# Start Docker services
docker-compose up -d

# Activate virtual environment
cd backend && source venv/bin/activate

# Run development server
uvicorn src.main:app --reload

# Run tests
pytest tests/ -v

# Run migrations
alembic upgrade head

Key Technologies

  • Framework: FastAPI with async/await
  • AI: LangChain, LangGraph, LangSmith
  • Database: PostgreSQL with SQLAlchemy (async)
  • Vector DB: Qdrant for semantic search
  • Cache: Redis for sessions and rate limiting
  • Models: OpenAI GPT-4, GPT-4V, text-embedding-3-small

Architecture

The backend follows a layered architecture:

  1. API Layer (src/api/v1/) - REST endpoints
  2. Service Layer (src/services/) - Business logic
  3. Agent Layer (src/agents/) - LangGraph AI agents
  4. Data Layer (src/models/) - Database models
  5. RAG Layer (src/rag/) - Vector operations

See Also