How arthurhenrique/cookiecutter-fastapi works
Main Components
A. Template Generation Layer
• Cookiecutter Engine
• Template Configuration (cookiecutter.json)
• Project Template Structure
B. Generated Project Architecture
• FastAPI Application Layer
• Machine Learning Layer
• Service Layer
• Infrastructure Layer
[Cookiecutter CLI] → [Template Config] → [Project Generator] → [Generated Project]
• API Layer (FastAPI)
• ML Pipeline
• Data Processing
• Feature Engineering
• Model Serving
• Services
• Infrastructure
Component Details
A. API Layer (app/):
• Core components (config, events, errors)
• Prediction endpoints
B. ML Pipeline (ml/):
• Data processing pipeline
• Feature engineering components
• Model serving infrastructure
C. Services Layer:
• Prediction service
• Error handling
• Logging system
D. Infrastructure:
• Docker container
• CI/CD pipeline
• Environment configuration
Key Relationships to Highlight
• How the API routes connect to the ML services
• Data flow from input through the ML pipeline
• Demonstrate how the prediction service integrates with the API
• Infrastructure dependencies
Additional Elements
• Version information and key dependencies
• Configuration flow
• Error handling paths
How the generated project will be structured
This will help developers understand both the template system and the resulting application architecture.