# Features ## Overview This bootstrap creates a production-ready monorepo with modern tooling and best practices based on the [coding-agent-rules](https://git.prettyhefty.com/Bill/coding-agent-rules). ## Core Features ### ๐Ÿ—๏ธ Project Structure - **Monorepo Layout** - Clean separation of backend, frontend, deployment, and scripts - **Modular Organization** - Clear directory structure following industry standards - **Scalable Architecture** - Easy to extend and maintain ### ๐Ÿ Backend (FastAPI) - **Python 3.11+** - Modern Python with latest features - **FastAPI Framework** - High-performance async web framework - **Pydantic v2** - Data validation and settings management - **uv Package Manager** - Fast, reliable dependency management - **Type Safety** - Full mypy type checking with strict mode - **Code Quality** - ruff for linting and formatting - 100% test coverage requirement - pytest with async support - **API Documentation** - Auto-generated OpenAPI/Swagger docs - **Error Handling** - Centralized error handling utilities - **Configuration Management** - Environment-based settings with Pydantic ### โš›๏ธ Frontend (React) - **React 18** - Latest React with concurrent features - **TypeScript** - Full type safety with strict mode - **Modern Tooling** - ESLint for linting - Prettier for formatting - Jest for testing - React Testing Library - **Code Quality** - 90%+ test coverage requirement - **API Integration** - Axios with interceptors and centralized configuration - **Component Structure** - Organized by feature and common components - **State Management** - Ready for Redux/Context API - **Responsive Design** - Mobile-first approach ### ๐Ÿณ Docker & Deployment - **Docker Compose** - Complete local development environment - **Multi-Service Setup** - Backend container - Frontend container - PostgreSQL database - **Hot Reload** - Automatic reload on code changes - **Volume Mounting** - Live code updates without rebuilding - **Environment Variables** - Proper configuration management - **Production Ready** - Dockerfiles optimized for production builds ### ๐Ÿ”ง Development Scripts #### Developer Scripts (`scripts/dev/`) - **start-backend.sh** - Start FastAPI development server - **start-frontend.sh** - Start React development server - **start-database.sh** - Start PostgreSQL container - **reset-database.sh** - Reset database (with confirmation) #### Utility Scripts (`scripts/utils/`) - **lint-backend.sh** - Run backend linting and type checking - **lint-frontend.sh** - Run frontend linting - **format-all.sh** - Format all code (backend + frontend) #### CI Scripts (`scripts/ci/`) - **backend-test.sh** - Complete backend CI pipeline - **frontend-test.sh** - Complete frontend CI pipeline ### ๐Ÿš€ CI/CD - **Gitea Actions** - Ready-to-use CI workflows - **Automated Testing** - Run tests on every push/PR - **Code Quality Checks** - Linting and type checking in CI - **Coverage Reports** - Track test coverage over time - **Path-Based Triggers** - Only run relevant tests ### ๐Ÿ“š Documentation #### API Documentation - OpenAPI/Swagger auto-generated docs - ReDoc alternative documentation - API changelog for tracking changes - Example requests and responses #### Architecture Documentation - System architecture diagrams - Component interaction flows - Database schema documentation - Deployment architecture #### User Guide - Getting started guide - Development workflow - Testing guide - Troubleshooting tips ### ๐Ÿงช Testing #### Backend Testing - **pytest** - Modern Python testing framework - **pytest-asyncio** - Async test support - **pytest-cov** - Coverage reporting - **Unit Tests** - Test individual components - **Integration Tests** - Test API endpoints - **100% Coverage** - Required for all backend code - **Test Fixtures** - Reusable test components #### Frontend Testing - **Jest** - JavaScript testing framework - **React Testing Library** - Component testing - **Coverage Thresholds** - 90%+ required - **Component Tests** - Test UI components - **Service Tests** - Test API services - **Integration Tests** - Test user flows ### ๐Ÿ”’ Security - **Environment Variables** - Secrets not in code - **CORS Configuration** - Proper cross-origin setup - **Input Validation** - Pydantic schemas for validation - **Type Safety** - TypeScript and mypy prevent type errors - **SQL Injection Prevention** - ORM-based queries - **Authentication Ready** - Structure for auth implementation ### ๐Ÿ“ฆ Package Management #### Backend - **uv** - Fast, modern Python package manager - **pyproject.toml** - Standard Python project configuration - **Lock File Support** - Reproducible builds - **Dev Dependencies** - Separate dev and prod dependencies #### Frontend - **npm** - Standard Node.js package manager - **package.json** - Project configuration - **package-lock.json** - Dependency locking - **Dev Dependencies** - Separate dev and prod dependencies ### ๐ŸŽจ Code Quality #### Backend - **ruff** - Fast Python linter and formatter - Replaces flake8, isort, black - Extremely fast (10-100x faster) - Auto-fix capabilities - **mypy** - Static type checker - Strict mode enabled - Catches type errors before runtime #### Frontend - **ESLint** - JavaScript/TypeScript linter - React-specific rules - TypeScript support - Auto-fix capabilities - **Prettier** - Code formatter - Consistent code style - Integrates with ESLint ### ๐Ÿ”„ Development Workflow - **Hot Reload** - Instant feedback on code changes - **Fast Startup** - Quick development environment setup - **Easy Testing** - Simple commands to run tests - **Code Formatting** - One command to format everything - **Git Integration** - Pre-configured .gitignore - **Documentation** - Comprehensive guides and examples ### ๐Ÿ“Š Monitoring & Logging - **Structured Logging** - JSON logs in production - **Correlation IDs** - Track requests across services - **Health Checks** - Monitor service health - **Error Tracking** - Centralized error handling ### ๐ŸŽฏ Best Practices - **DRY Principle** - Don't Repeat Yourself - **SOLID Principles** - Clean code architecture - **Test-Driven Development** - Write tests first - **Continuous Integration** - Automated testing - **Code Reviews** - Pull request workflows - **Documentation** - Keep docs up to date ## What's Included ### Configuration Files - โœ… `pyproject.toml` - Python project configuration - โœ… `package.json` - Node.js project configuration - โœ… `tsconfig.json` - TypeScript configuration - โœ… `.eslintrc.json` - ESLint configuration - โœ… `.prettierrc.json` - Prettier configuration - โœ… `compose.yml` - Docker Compose configuration - โœ… `.gitignore` - Git ignore rules - โœ… `.env.example` - Environment variable templates ### Source Files - โœ… FastAPI application entry point - โœ… Core configuration module - โœ… Error handling utilities - โœ… React application component - โœ… API service client - โœ… Example tests (backend and frontend) - โœ… Test configuration ### Docker Files - โœ… Backend Dockerfile - โœ… Frontend Dockerfile - โœ… Docker Compose with all services - โœ… PostgreSQL database setup ### Scripts - โœ… 9 development and CI scripts - โœ… All scripts executable and tested - โœ… Error handling and validation ### Documentation - โœ… Main README - โœ… Usage guide - โœ… Quick start guide - โœ… API documentation - โœ… Architecture documentation - โœ… User guide - โœ… API changelog ### CI/CD - โœ… Backend CI workflow - โœ… Frontend CI workflow - โœ… Automated testing - โœ… Coverage reporting ## What's NOT Included (By Design) These are intentionally left for you to implement based on your needs: - โŒ Database migrations (Alembic) - โŒ Authentication/Authorization - โŒ Specific business logic - โŒ Production deployment configs - โŒ Monitoring/Observability tools - โŒ Message queues - โŒ Caching layer - โŒ CDN configuration ## Extensibility The bootstrap is designed to be extended with: - **Database ORM** - Add SQLAlchemy or similar - **Authentication** - Add JWT, OAuth, etc. - **State Management** - Add Redux, Zustand, etc. - **UI Framework** - Add Material-UI, Chakra, etc. - **API Gateway** - Add Kong, Traefik, etc. - **Message Queue** - Add RabbitMQ, Redis, etc. - **Caching** - Add Redis, Memcached, etc. - **Search** - Add Elasticsearch, etc. ## Technology Versions - Python: 3.11+ - Node.js: 20 LTS - React: 18.2+ - FastAPI: 0.104+ - TypeScript: 5.3+ - PostgreSQL: 16+ - Docker Compose: 3.8+ ## Compliance Follows standards from: - [coding-agent-rules](https://git.prettyhefty.com/Bill/coding-agent-rules) - PEP 8 (Python style guide) - Airbnb JavaScript Style Guide - React best practices - Docker best practices - 12-Factor App methodology