Skip to main content

Stack-based scaffolding tool for application projects

Project description

FraCode

CI codecov Python Version License

FraCode is a stack-based scaffolding tool.

It generates application projects that use official ecosystem libraries directly, starting with a standalone FastAPI stack today and leaving room for other languages and frameworks over time.

What FraCode Is

FraCode is not trying to replace FastAPI.

FraCode is meant to help you start faster by generating:

  • a clean project layout
  • stack-aware scaffolds
  • file generators for common app pieces
  • lightweight development commands
  • code you can fully own after generation

The guiding rule is simple:

  • zero import fracode in generated application code
  • zero FraCode runtime dependency in generated projects
  • official framework and library imports only

FraCode builds the house, then gets out of the way.

Available Stacks

Current built-in stack:

  • python/fastapi - standalone FastAPI application with typed settings, SQLAlchemy, Alembic, Docker, and pytest

List stacks with:

fra stacks

Quick Start

Prerequisites:

  • Python 3.12+
  • Poetry for the default generated-project workflow
pip install fracode

fra new my-app --stack python/fastapi
cd my-app

poetry install
fra serve

Then open http://127.0.0.1:8000/docs.

The generated FastAPI app is standard application code, so you are not locked into Poetry. If you prefer, you can manage dependencies yourself with pip and a virtual environment.

You can also run the generated app directly:

python dev.py

What The FastAPI Stack Generates

The default FastAPI scaffold produces a normal project structure like:

  • app/main.py - FastAPI entrypoint
  • app/api/routes.py - route registration and healthcheck
  • app/core/config.py - typed settings
  • app/core/errors.py - project-owned exception handlers
  • app/core/logging.py - project-owned logging setup
  • app/db/ - SQLAlchemy base and session helpers
  • app/schemas/ - Pydantic schemas
  • migrations/ and alembic.ini - migration support
  • Dockerfile and docker-compose.yml - container setup
  • tests/ - starter test suite
  • dev.py - local dev runner

This is application code, not a FraCode runtime wrapper.

CLI

Core commands:

  • fra new <name> creates a new project from a stack
  • fra stacks lists available language/framework stacks
  • fra serve runs a generated app by detecting app/main.py or main.py
  • fra make:controller <Name> generates a stack-aware controller and schema
  • fra make:model <Name> generates a stack-aware model

Examples:

fra new blog --stack python/fastapi
fra make:controller User --api
fra make:model User

For the FastAPI stack, controller generation also wires the new controller into app/api/routes.py and creates a matching schema module in app/schemas/.

Development

poetry install --with dev
pytest
ruff check fracode/ tests/
ruff format --check fracode/ tests/
mypy fracode/

Multi-Stack Direction

FraCode is built around stack discovery instead of one framework-specific runtime.

The intended shape is:

  • templates/stacks/<language>/<framework>/...
  • each stack defines its own metadata and generators
  • the CLI discovers stacks dynamically
  • generated apps stay native to their own ecosystem

That means FraCode can grow toward things like:

  • python/flask
  • typescript/express
  • go/chi

without forcing those ecosystems through one shared abstraction layer.

Roadmap

FraCode currently ships with one built-in production-ready stack:

  • python/fastapi

Planned directions for future stacks include:

  • python/flask
  • typescript/express
  • go/chi

The goal is to add new stacks without introducing a shared runtime dependency into generated apps.

Contributing

Contributions are welcome:

  • new stack support
  • better project templates
  • generator ergonomics
  • documentation
  • stronger day-zero scaffolds for real app work

License

FraCode is open-source software licensed under the MIT license.

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

fracode-0.1.6.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fracode-0.1.6-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file fracode-0.1.6.tar.gz.

File metadata

  • Download URL: fracode-0.1.6.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/25.4.0

File hashes

Hashes for fracode-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e2087574209be91741def541f47c37bae4b6f173046da1f0600dde2ba38aca4d
MD5 7ac46569f7ddc9cf09694e3e3f42ed31
BLAKE2b-256 2c3bae237e595662b5c3123305eed7aa56d6e97c9502f00c9e3ae3361e6a508c

See more details on using hashes here.

File details

Details for the file fracode-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: fracode-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/25.4.0

File hashes

Hashes for fracode-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f8db9b6e46f607f0baf3809fb97b1b9fb65fb346b67174c08013ab877de5f3ea
MD5 dbfe31d8f338358c84ed2e00ef70f551
BLAKE2b-256 d588c1330e5bd112a41d6b6e1aeb17fe914034936e6d2b85ab445f93b644bd1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page