CLI toolkit - Create FastAPI and dbt applications quickly
Project description
⚡ FastForge
FastForge is a powerful, Symfony-style CLI scaffolder designed to bootstrap and accelerate the development of FastAPI applications. It provides a robust, production-ready directory structure, fully integrated with uv for lightning-fast package management, alongside essential utilities like rate limiting, scheduling, WebSocket management, and JWT middleware.
🚀 Installation
Since FastForge manages virtual environments and dependencies via uv, you should install it globally using uv tool:
uv tool install git+https://github.com/SavanTech25/fast_stack_forge.git
🛠️ Usage
1. Initialize a Project
To bootstrap a new project, use the init command. You can specify your preferred database engine (sqlite, postgresql, mysql, or mongodb).
fast-stack-forge init my_project --db mongodb
This will create a structured FastAPI project that utilizes pyproject.toml and a Makefile for streamlined development.
2. Run the Scaffolded Project
Navigate into your generated project and install dependencies:
cd my_project
make install
source .venv/bin/activate
Start the development server:
make run
3. Generate Entities (Models, Schemas, Controllers, Routers)
FastForge features a make:entity command that automatically generates your boilerplate code for a given entity. Make sure you run this from the root of your newly created project!
fast-stack-forge make:entity User name:string age:int email:string:hash is_active:bool
Field Syntax: name:type[:modifier]
- Types:
string,int,float,bool,text,date,datetime - Modifiers:
encrypt,hash,nullable,fk=ModelName
4. FastForge ETL (dbt Integration)
FastForge now includes native scaffolding for analytical engineering via dbt!
To initialize a complete dbt project package inside your src/ directory:
fast-stack-forge init:etl my_dbt_project --archi medallion --connector local
--archi: Choosedefault(stg, int, mart),medallion(bronze, silver, gold), orstar(raw, dim, fact).--connector: Chooselocal(DuckDB),snowflake,bigquery, orpostgres.
To quickly scaffold a dbt model inside your project without boilerplate:
fast-stack-forge make:dbt fact_user --view --incremental --layer silver
--view: Sets materialization toview.--incremental: Configures incremental logic automatically.
5. Generate AI Services
FastForge includes a powerful make:service command that instantly scaffolds production-ready AI services (RAG, Agents, OCR) connected directly to your FastAPI routes.
fast-stack-forge make:service DocumentOCR --type ocr --provider azure
Options:
--type: Chooserag(Retrieval-Augmented Generation),agent(Tool-calling Agent),agentic(Workflow State Graph), orocr(Vision Extraction).--provider: Chooseopenai,anthropic,mistral,gemini, orazure.--vector-store: (Forragtype only). Choosechroma(Local),qdrant(Cloud/Docker), orsupabase(PostgreSQL/pgvector). Defaults tochroma.
Example: Building a fully-functional RAG service with Qdrant and OpenAI
fast-stack-forge make:service HelpdeskBot --type rag --provider openai --vector-store qdrant
This generates the HelpdeskBotService integrated with langchain-openai, langchain-qdrant, and automatically exposes a POST /helpdeskbot endpoint with JWT authentication in your FastAPI app!
6. Generate Data Sync Scripts (ELT)
To support the standard dbt architecture (where your operational database needs to be replicated to your analytical database), you can use the make:sync command.
fast-stack-forge make:sync MongoToPg --source mongodb --dest postgres
This scaffolds a pure-Python sync script utilizing pymongo, pandas, and sqlalchemy. The generated script handles flattening NoSQL documents and automatically syncing them to PostgreSQL, with built-in APScheduler boilerplate for continuous execution.
🏗️ Architecture
When you initialize a project with FastForge, it generates a clean, modular structure.
Generated Directory Structure
graph TD
A[my_project] --> B(Makefile)
A --> C(pyproject.toml)
A --> D(README.md)
A --> E[app]
A --> F[src]
E --> G[main.py]
F --> H[my_project]
H --> I[entity/]
H --> J[schema/]
H --> K[controller/]
H --> L[router/]
H --> M[service/]
H --> N[data/]
H --> O[middleware/]
H --> P[utils/]
O -.->|Contains| O1[middleware.py JWTBearer]
P -.->|Contains| P1[connection_manager.py]
P -.->|Contains| P2[limiter.py]
P -.->|Contains| P3[scheduling.py]
P -.->|Contains| P4[crud_router.py]
N -.->|Contains| N1[database.py]
G -.->|Imports| N1
G -.->|Imports| P2
G -.->|Imports| P3
Explanation of Components
app/main.py: The main FastAPI entry point. It handles lifecycle events (connecting to the database, starting schedulers) and attaches rate limiters.src/{project_name}/: Your primary application package, automatically recognized bypyproject.tomlanduv.entity/: Database models (SQLAlchemy or motor/MongoDB depending on yourinitchoice).schema/: Pydantic models for validation and serialization.controller/: Business logic and database interaction functions.router/: API route definitions, connected to your controllers.data/: Database configuration and connection setup.middleware/: Contains pre-configuredJWTBearermiddleware for instant authentication handling.utils/:limiter.py: Pre-configuredslowapirate limiting.scheduling.py: Asynchronous background task scheduler viaapscheduler.connection_manager.py: Generic WebSocket manager.crud_router.py: A generic factory for building standard CRUD routes effortlessly.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fast_stack_forge-1.0.1.tar.gz.
File metadata
- Download URL: fast_stack_forge-1.0.1.tar.gz
- Upload date:
- Size: 34.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b60db13478934041776b9e2c861b50f290a022677e4721e07e7cc16fdb6af7a2
|
|
| MD5 |
f1d1d0af6e7ab3ca634452093fd5bb1b
|
|
| BLAKE2b-256 |
ec886f5bbcb37df1da8e293048ebd5972126abb9ac3f69b02dee2028de86beca
|
Provenance
The following attestation bundles were made for fast_stack_forge-1.0.1.tar.gz:
Publisher:
publish-pypi.yml on SavanTech25/fast-stack-forge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fast_stack_forge-1.0.1.tar.gz -
Subject digest:
b60db13478934041776b9e2c861b50f290a022677e4721e07e7cc16fdb6af7a2 - Sigstore transparency entry: 1495316393
- Sigstore integration time:
-
Permalink:
SavanTech25/fast-stack-forge@36503fc9e27ba5f8b8742a91b97f1a1af9662bfb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SavanTech25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@36503fc9e27ba5f8b8742a91b97f1a1af9662bfb -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file fast_stack_forge-1.0.1-py3-none-any.whl.
File metadata
- Download URL: fast_stack_forge-1.0.1-py3-none-any.whl
- Upload date:
- Size: 49.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de3b9ca32ed2e27eb8fe101c905bbed9d8df507c6f28097a02568d9cfc07da9d
|
|
| MD5 |
f79e19e06669141702beb9619a9f47b0
|
|
| BLAKE2b-256 |
6729637997d0aedc92c0579e1861ad3e9c67b6f385213b9eadb74a26075a9b63
|
Provenance
The following attestation bundles were made for fast_stack_forge-1.0.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on SavanTech25/fast-stack-forge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fast_stack_forge-1.0.1-py3-none-any.whl -
Subject digest:
de3b9ca32ed2e27eb8fe101c905bbed9d8df507c6f28097a02568d9cfc07da9d - Sigstore transparency entry: 1495316497
- Sigstore integration time:
-
Permalink:
SavanTech25/fast-stack-forge@36503fc9e27ba5f8b8742a91b97f1a1af9662bfb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SavanTech25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@36503fc9e27ba5f8b8742a91b97f1a1af9662bfb -
Trigger Event:
workflow_dispatch
-
Statement type: