Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
python-version: "3.12"
- name: Install the project
run: uv sync --all-extras --dev
- name: Lint with Ruff
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
python-version: "3.12"
- name: Install the project
run: uv sync --all-extras --dev
- name: Generate example project
Expand Down
66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# 🚀 FastAPI-Forge
UI Based FastAPI Project Generator
# FastAPI-Forge
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!*
*Define your database models through a UI, select services, and get a complete production-ready containerized project with tests and endpoints!*


## 🔥 Features
## Features


### 🖌️ UI Power
- 🖥️ [NiceGUI](https://github.com/zauberzeug/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
### UI Power
- [NiceGUI](https://github.com/zauberzeug/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

### Auto-Generated Components
- 🗄️ [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy) Models
- 📦 [Pydantic](https://github.com/pydantic/pydantic) Schemas
- 🌐 RESTful Endpoints (CRUD + more)
- 🧪 Comprehensive Test Suite (pytest)
- 🏗️ DAOs (Database Access Objects)
- 🏭 [Factory Boy](https://github.com/FactoryBoy/factory_boy) Test Factories
- 🐳 [Docker Compose](https://github.com/docker/compose) Setup
### Auto-Generated Components
- [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy) Models
- [Pydantic](https://github.com/pydantic/pydantic) Schemas
- RESTful Endpoints (CRUD + more)
- Comprehensive Test Suite (pytest)
- DAOs (Database Access Objects)
- [Factory Boy](https://github.com/FactoryBoy/factory_boy) Test Factories
- [Docker Compose](https://github.com/docker/compose) Setup

### 🎛️ Advanced Features
- 🎚️ Custom Enum support as data types
- 📥 YAML project import/export
- 🐘 Convert existing databases into FastAPI projects via connection string!
### Advanced Features
- 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.

### 🔄 CI/CD Automation
- ⚙️ GitHub Workflows for automated testing and linting
- 🧪 Runs pytest suite
- Executes code formatting checks
- Ensures code quality before merging
### CI/CD Automation
- GitHub Workflows for automated testing and linting
- Runs pytest suite
- Executes code formatting checks
- Ensures code quality before merging

## 🧩 Optional Integrations
## Optional Integrations

| Category | Technologies |
|----------------|---------------------------------------|
Expand All @@ -56,13 +56,13 @@



## Requirements
## Requirements
- Python 3.12+
- UV
- Docker and Docker Compose (for running the generated project)


## 🚀 Quick Start
## Quick Start
Install FastAPI-Forge:

```bash
Expand Down Expand Up @@ -90,7 +90,7 @@ make up # Builds and runs your project along with additional services
- Access the SwaggerUI/OpenAPI docs at: `http://localhost:8000/docs`.


## ⚙️ Command Options
## Command Options
Customize your project generation with these options:

### `--use-example`
Expand Down Expand Up @@ -128,7 +128,7 @@ fastapi-forge start --from-yaml=~/Documents/project-config.yaml --no-ui
```


## 🧰 Using the Makefile
## Using the Makefile
The generated project includes a `Makefile` to simplify common dev tasks:

### Start the Application
Expand Down Expand Up @@ -157,7 +157,7 @@ make lint

---

## 📦 Database Migrations with Alembic
## Database Migrations with Alembic
If you chose Alembic for migrations during project setup, these commands will help manage your database schema:

### Generate a New Migration
Expand Down
7 changes: 3 additions & 4 deletions fastapi_forge/core/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ async def build_fastapi_project(
build_time = perf_counter() - start_time
logger.info(f"Project build completed in {build_time:.2f} seconds")

click.secho("\n🎉 Project generated successfully !", fg="green", bold=True)
click.echo("\n🚀 Next steps to get started:\n")
click.secho("\nProject generated successfully !", fg="green", bold=True)
click.echo("\nNext steps to get started:\n")

steps = [
("Navigate to your project directory", "cd your_project_name"),
Expand All @@ -94,8 +94,7 @@ async def build_fastapi_project(
click.echo(f"{i}. {desc}:")
click.secho(f" {cmd}", fg="cyan")

click.echo("\n💡 Pro tip: Run 'make help' to see all available commands")
click.secho("\n✨ Happy coding with your new FastAPI project!", fg="magenta")
click.echo("\nPro tip: Run 'make help' to see all available commands")

except Exception as error:
logger.error(f"Project build failed: {error}")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ requires-python = ">=3.12"
dynamic = ["version"]
dependencies = [
"click",
"nicegui",
"nicegui>=3.0.0",
"cookiecutter",
"pytest",
"ruff",
Expand Down
Loading