UI Based FastAPI Project Generator
Define your database models through a UI, select services, and get a complete production-ready containerized project with tests and endpoints!
- NiceGUI-based interface for project design
- Visual model creation and configuration
- Checkbox additional services to be integrated
- Quick-add common fields
- One-click project generation
- SQLAlchemy Models
- Pydantic Schemas
- RESTful Endpoints (CRUD + more)
- Comprehensive Test Suite (pytest)
- DAOs (Database Access Objects)
- Factory Boy Test Factories
- Docker Compose Setup
- Custom Enum support as data types
- YAML project import/export
- Convert existing databases into FastAPI projects via connection string!
- Basically lets you quickly create an API for any database.
- GitHub Workflows for automated testing and linting
- Runs pytest suite
- Executes code formatting checks
- Ensures code quality before merging
| Category | Technologies |
|---|---|
| Messaging | RabbitMQ |
| Caching | Redis |
| Task Queues | Celery, TaskIQ |
| Auth | JWT Authentication |
| Monitoring | Prometheus |
| Storage | S3 |
| Migrations | Alembic |
Much more to come!
- Python 3.12+
- UV
- Docker and Docker Compose (for running the generated project)
Install FastAPI-Forge:
pip install fastapi-forgeStart the project generation process:
fastapi-forge start- A web browser will open automatically.
- Define your database schema and service specifications.
- Once done, click
Generateto build your API.
To start the generated project and its dependencies in Docker:
make up # Builds and runs your project along with additional services- The project will run using Docker Compose, simplifying your development environment.
- Access the SwaggerUI/OpenAPI docs at:
http://localhost:8000/docs.
Customize your project generation with these options:
Quickly spin up a project using one of FastAPI-Forge’s prebuilt example templates:
fastapi-forge start --use-exampleSkip the web UI and generate your project directly from the terminal:
fastapi-forge start --no-uiLoad a custom YAML configuration (can be generated through the UI):
fastapi-forge start --from-yaml=~/path/to/config.yamlLoad an existing Postgres database schema:
fastapi-forge start --conn-string=postgres://user:pass@localhost/db_nameLoad a YAML config and skip the UI:
fastapi-forge start --from-yaml=~/Documents/project-config.yaml --no-uiThe generated project includes a Makefile to simplify common dev tasks:
make upTests are automatically generated based on your schema. Once the app is running (make up):
make testmake test-filter filter="test_name"Keep your code clean and consistent:
make lintIf you chose Alembic for migrations during project setup, these commands will help manage your database schema:
make mig-gen name="add_users_table"make mig-headmake mig-upmake mig-down
