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

pip install fracode

fra new my-app --language python --framework fastapi
cd my-app

poetry install
fra serve

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

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 --language python --framework 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.

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.5.tar.gz (15.2 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.5-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fracode-0.1.5.tar.gz
  • Upload date:
  • Size: 15.2 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.5.tar.gz
Algorithm Hash digest
SHA256 bd92433cd9aa8de45a95d34b50886eb04a705109cae4ce6b28e82f78911e9550
MD5 c45b39dc54524f60c0db74b724098d1a
BLAKE2b-256 3e87b4f1fe1ecd8d23b4926d793c64d7de9cf2372e98b268e1066d633e33da3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fracode-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 25.0 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 992022e1213c4463be9713f5c45fb695a98c013b745ae128a669a8aebfec1003
MD5 c770db598b9f7316b0ac5cdac65b9c38
BLAKE2b-256 f82ce6168ad4d64933ce229d711bac73ec964e7f416c98cef37383435ef87798

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