Forge Logo

Getting Started

  • Installation
    • Requirements
    • Installation Methods
      • From PyPI (Recommended)
      • Upgrade to Latest Version
      • From Source
    • Verify Installation
    • System Dependencies
      • Database Drivers
      • Redis
      • Docker
    • Next Steps
    • Troubleshooting
      • Command Not Found
      • Python Version Issues
      • Permission Errors
  • Quick Start
    • Basic Usage
    • Step-by-Step Example
      • 1. Start the Interactive Prompt
      • 2. Choose Your Project Name
      • 3. Select Database Type
      • 4. Choose ORM
      • 5. Enable Migrations
      • 6. Select Authentication Type
      • 7. Configure Features
      • 8. Review Configuration
      • 9. Generate Project
    • Non-Interactive Mode
    • What Gets Created
    • Running Your Project
    • Quick Commands Reference
    • Next Steps
    • Common Workflows
      • Minimal Project
      • Full-Featured API
      • Microservice
  • Your First Project
    • Creating the Project
    • Project Structure Overview
    • Initial Setup
      • 1. Install Dependencies
      • 2. Configure Environment
      • 3. Setup Database
      • 4. Run Migrations
    • Running the Application
      • Development Server
      • Running with Redis and Celery
      • Using Docker
    • Exploring the API
      • 1. Check Health
      • 2. Register a User
      • 3. Login
      • 4. Access Protected Routes
    • Running Tests
    • Understanding Key Files
      • main.py
      • models/user.py
      • routers/v1/auth.py
    • Next Steps

User Guide

  • CLI Commands
    • Command Overview
    • forge init
      • Synopsis
      • Arguments
      • Options
      • Examples
        • Interactive Mode (Recommended)
        • Specify Project Name
        • Use Current Directory
        • Non-Interactive with Defaults
      • Interactive Prompts
        • 1. Project Name
        • 2. Database Type
        • 3. ORM Type
        • 4. Database Migrations
        • 5. Authentication Type
        • 6. CORS Configuration
        • 7. Development Tools
        • 8. Testing
        • 9. Redis
        • 10. Celery
        • 11. Docker
      • Configuration Summary
    • forge –version
      • Synopsis
      • Output
      • Example
    • forge –help
      • Synopsis
      • Output
    • Global Options
    • Exit Codes
    • Configuration File
    • Environment Variables
    • Command Tips
      • Automation & CI/CD
      • Reusing Configuration
      • Checking Project Configuration
    • Common Workflows
      • Quick API Project
      • Production API
      • Microservice
      • Development Project
    • Troubleshooting
      • Command Not Found
      • Permission Denied
      • Interactive Prompt Issues
    • See Also
  • Configuration Options
    • Configuration File Location
    • Configuration Structure
    • Configuration Options
      • Project Settings
        • project_name
      • Database Options
        • database.type
        • database.orm
      • Authentication Options
        • features.auth.type
      • Optional Features
        • features.redis
        • features.celery
        • features.cors
        • features.dev_tools
        • features.testing
        • features.docker
    • Modifying Configuration
      • Before Generation
      • After Generation
    • Configuration Examples
      • Minimal API (SQLite, Basic Auth)
      • Full-Featured Production API
      • Development API with Testing
    • Environment Variables
    • See Also
  • Database Setup
    • Database Selection
    • PostgreSQL
      • Installation
      • Configuration
      • Create Database
      • Python Dependencies
    • MySQL
      • Installation
      • Configuration
      • Create Database
      • Python Dependencies
    • SQLite
      • Installation
      • Configuration
      • Python Dependencies
      • Advantages
      • Limitations
    • Database Migrations
      • Initial Migration
      • Creating Migrations
      • Migration Commands
    • ORM Configuration
      • SQLModel (Recommended)
      • SQLAlchemy
    • Database Connection
      • Connection Pool
      • Dependency Injection
    • Docker Database Setup
      • PostgreSQL Service
      • MySQL Service
    • Backup and Restore
      • Celery Backup Task
      • Manual Backup
      • Restore
    • Best Practices
      • Development
      • Production
      • Security
    • Troubleshooting
      • Connection Refused
      • Authentication Failed
      • Database Does Not Exist
      • Migration Conflicts
    • See Also
  • Authentication Guide
    • Authentication Modes
      • None
      • Basic
      • Complete
    • Generated Components
      • Models
      • Schemas
      • API Endpoints
        • Basic Mode Endpoints
        • Complete Mode Additional Endpoints
    • Security Configuration
      • JWT Settings
      • Password Hashing
      • Token Generation
    • Using Authentication
      • Protecting Endpoints
      • Requiring Verified Users (Complete Mode)
      • Optional Authentication
    • Email Configuration (Complete Mode)
      • SMTP Setup
      • Gmail Setup
      • Email Templates
    • Client Integration
      • JavaScript/TypeScript
      • Python Client
    • Customization
      • Adding Custom Fields
      • Custom Authentication Logic
      • Rate Limiting
    • Security Best Practices
      • Production Checklist
      • Password Requirements
      • Token Security
    • Troubleshooting
      • “Invalid credentials” Error
      • “Token expired” Error
      • Email Not Sending (Complete Mode)
      • “User not verified” Error (Complete Mode)
    • See Also
  • Testing Guide
    • Test Suite Overview
    • Running Tests
      • Install Test Dependencies
      • Run All Tests
      • Watch Mode
    • Test Configuration
      • conftest.py
    • Generated Tests
      • Main API Tests
      • Authentication Tests
      • User Management Tests
    • Writing Custom Tests
      • Testing New Endpoints
      • Testing Database Operations
      • Testing Background Tasks (Celery)
      • Testing Email Sending (Complete Mode)
    • Custom Fixtures
      • Creating Test Data
      • Parametrized Tests
    • Code Coverage
      • Generate Coverage Report
      • Coverage Configuration
    • Continuous Integration
      • GitHub Actions
    • Best Practices
      • Test Organization
      • Test Data
      • Async Testing
      • Performance
    • Troubleshooting
      • Tests Hanging
      • Database Locked (SQLite)
      • Import Errors
      • Fixture Not Found
    • See Also
  • Deployment Guide
    • Docker Deployment
      • Generated Files
      • Quick Start
      • Dockerfile
      • Docker Compose
      • Environment Configuration
      • Production Checklist
    • Cloud Platforms
      • AWS (Elastic Beanstalk)
      • Google Cloud Platform (Cloud Run)
      • Heroku
      • DigitalOcean App Platform
    • Traditional Server Deployment
      • Using Systemd (Ubuntu/Debian)
    • Performance Optimization
      • Gunicorn with Uvicorn Workers
      • Worker Count Formula
      • Docker Resource Limits
    • Monitoring and Logging
      • Application Logging
      • Health Checks
      • Prometheus Metrics
      • Sentry Error Tracking
    • Database Management
      • Backup Strategy
      • Connection Pooling
    • Security
      • HTTPS/SSL
      • CORS Configuration
      • Rate Limiting
    • Scaling
      • Horizontal Scaling
      • Database Read Replicas
      • Caching Strategy
    • Troubleshooting
      • Container Won’t Start
      • Database Connection Issues
      • High Memory Usage
    • See Also

Architecture

  • Architecture Overview
    • Design Philosophy
      • 1. Configuration-First
      • 2. Dynamic Generator System
    • Architecture Layers
    • Component Overview
      • 1. CLI Layer
      • 2. Configuration Layer
      • 3. Generator Layer
    • Execution Flow
      • Detailed Steps
    • Key Design Patterns
      • 1. Decorator Pattern
      • 2. Strategy Pattern
      • 3. Template Method Pattern
      • 4. Dependency Injection
      • 5. Topological Sorting
    • Generator Categories
    • Priority System
    • Extensibility
      • Adding a New Generator
    • Benefits
    • Learn More
  • Generator System
    • Overview
    • The @Generator Decorator
      • Basic Usage
      • Decorator Parameters
      • Example with All Parameters
    • Generator Definition
    • Base Generator Class
    • Creating a Generator
      • Step 1: Choose Category and Location
      • Step 2: Define the Generator
      • Step 3: Implement Generation Logic
    • Generator Orchestrator
      • Initialization
      • Discovery Phase
      • Dependency Resolution
      • Execution Phase
    • Dependency Management
      • Declaring Dependencies
      • Dependency Resolution
    • Conditional Generation
      • enabled_when Function
      • Common Conditions
      • ConfigReader API
    • Priority System
      • Priority Ranges
      • Priority Examples
    • Complete Example
    • Best Practices
    • Testing Generators
    • Learn More

API Reference

  • ConfigReader API
    • Overview
    • Class Definition
    • Initialization
      • ConfigReader(project_path)
    • Loading Configuration
      • load_config()
    • Validation
      • validate_config()
    • Project Information
      • get_project_name()
    • Database Configuration
      • get_database_config()
      • get_database_type()
      • get_orm_type()
      • get_migration_tool()
      • has_migration()
    • Feature Detection
      • get_features()
    • Authentication
      • has_auth()
      • get_auth_type()
      • has_refresh_token()
    • CORS
      • has_cors()
    • Development Tools
      • has_dev_tools()
    • Testing
      • has_testing()
    • Docker
      • has_docker()
    • Redis
      • has_redis()
      • get_redis_features()
    • Celery
      • has_celery()
      • get_celery_features()
    • Metadata
      • get_metadata()
      • get_created_at()
      • get_forge_version()
    • Usage in Generators
    • Complete Example
    • Error Handling
    • See Also
  • Generator Decorator API
    • Overview
    • Decorator Parameters
      • category
      • priority
      • requires
      • enabled_when
    • Base Generator Class
      • BaseTemplateGenerator Methods
        • __init__(self, config: ConfigReader)
        • generate(self) -> None
        • _write_file(self, path: str, content: str) -> None
        • _ensure_directory(self, path: str) -> None
    • ConfigReader API
      • Configuration Methods
    • Generator Registry
    • Complete Example
    • Best Practices
      • 1. Single Responsibility
      • 2. Clear Dependencies
      • 3. Conditional Generation
      • 4. Configuration-Driven
      • 5. Error Handling
    • Testing Generators
    • See Also
  • Orchestrator API
    • Overview
    • Class: GeneratorOrchestrator
      • Constructor
      • Methods
        • discover_generators() -> list[dict]
        • filter_generators(generators: list[dict]) -> list[dict]
        • sort_generators(generators: list[dict]) -> list[dict]
        • execute_generators(generators: list[dict]) -> None
        • run() -> None
    • Execution Flow
    • Dependency Resolution
      • Simple Dependencies
      • Multiple Dependencies
      • Transitive Dependencies
      • Circular Dependencies (Error)
    • Conditional Execution
      • Based on Configuration
      • Complex Conditions
    • Error Handling
      • Missing Dependency
      • Generator Execution Failure
    • Usage Examples
      • Basic Usage
      • Custom Execution
      • Dry Run
      • Selective Execution
    • Integration with ProjectGenerator
    • Performance Considerations
      • Generator Count
      • Optimization Tips
    • Debugging
      • Enable Verbose Logging
      • Inspect Generator Registry
      • Test Dependency Resolution
    • See Also

Developer Guide

  • Creating Custom Generators
    • Prerequisites
    • Quick Start
      • 1. Create Generator File
      • 2. Import Generator
      • 3. Test Generator
    • Step-by-Step Tutorial
      • Example: Blog Post Feature
        • Step 1: Create Model Generator
        • Step 2: Create Schema Generator
        • Step 3: Create CRUD Generator
        • Step 4: Create Router Generator
        • Step 5: Register Router in Main
    • Advanced Patterns
      • Configuration-Driven Generation
      • Template-Based Generation
      • Multi-File Generation
    • Best Practices
      • 1. Single Responsibility
      • 2. Clear Dependencies
      • 3. Conditional Generation
      • 4. Error Handling
      • 5. Testing
    • Common Patterns
      • Adding Configuration Options
      • Modifying Existing Files
    • Troubleshooting
      • Generator Not Running
      • Circular Dependencies
      • File Not Created
    • See Also

Additional Information

  • Changelog
    • [0.1.8.5] - 2026-01-18
      • Fixed
      • Improved
    • [0.1.8.4] - 2026-01-18
      • Added
    • [0.1.8.3] - 2026-01-16
      • Fixed
    • [0.1.8.2] - 2026-01-10
      • Fixed
    • [0.1.8.1] - 2026-01-10
      • Improved
    • [0.1.8] - 2026-01-10
      • Added
      • Fixed
      • Improved
    • [0.1.7.1] - 2026-01-09
      • Improved
    • [0.1.7] - 2026-01-08
      • Fixed
      • Improved
    • [0.1.6] - 2026-01-08
      • Improved
      • Fixed
      • Technical Details
    • [0.1.5] - 2026-01-08
      • Fixed
      • Improved
      • Technical Details
    • [0.1.4] - 2025-01-08
      • Added
      • Fixed
      • Improved
      • Technical Details
    • [0.1.3] - 2025-01-07
      • Changed
      • Technical Details
    • [0.1.2] - 2025-01-06
      • Changed
    • [0.1.1] - 2025-01-06
      • Added
      • Changed
      • Fixed
    • [0.1.0] - 2025-01-05
      • Added
      • Changed
      • Removed
      • Fixed
      • Technical Details
Forge
  • Search


© Copyright 2026, ning3739.

Built with Sphinx using a theme provided by Read the Docs.