Backend Development Documentation¶
This section contains development-specific documentation for the RAG Modulo backend.
Development Guidelines¶
- Development Prompt - Comprehensive guidelines for working with the system
- TODO Items - Development tasks and improvements
Architecture Overview¶
The backend follows a service-based architecture with:
- Service Layer: Business logic implementation
- Repository Pattern: Data access abstraction
- Provider System: LLM and vector store providers
- Router Layer: API endpoint definitions
- Schema Layer: Data validation and serialization
Key Design Principles¶
- Dependency Injection: Services are injected for testability
- Async Operations: Use async/await for I/O operations
- Type Safety: Comprehensive type hints throughout
- Error Handling: Custom exceptions with clear messages
- Testing: Unit, integration, and API tests
Development Workflow¶
- Follow TDD (Test-Driven Development) approach
- Write tests before implementation
- Use service abstractions for all business logic
- Implement proper error handling
- Document all public APIs
Code Quality Standards¶
- Line Length: 120 characters for Python code
- Type Hints: Required for all function signatures
- Docstrings: Required for all public methods
- Error Handling: Use custom exceptions appropriately
- Testing: Maintain high test coverage
Next Steps¶
- Review the main development guide
- Check the contributing guidelines
- See the workflow documentation