Metadata-Version: 2.4
Name: fracode
Version: 0.1.4
Summary: Stack-based scaffolding tool for application projects
License-Expression: MIT
Author: chidi e
Author-email: hello@chidiesobe.com
Requires-Python: >=3.12
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: jinja2 (>=3.1.6,<4.0.0)
Requires-Dist: typer (>=0.19.2,<0.20.0)
Requires-Dist: uvicorn (>=0.37.0,<0.38.0)
Description-Content-Type: text/markdown

# FraCode

[![CI](https://github.com/iamceeso/FraCode/actions/workflows/ci.yml/badge.svg)](https://github.com/iamceeso/FraCode/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/iamceeso/FraCode/branch/main/graph/badge.svg)](https://codecov.io/gh/iamceeso/FraCode)
[![Python Version](https://img.shields.io/badge/python-3.12%2B-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

FraCode is a stack-based application generator.

It helps you scaffold production-shaped projects quickly, starting with a plain FastAPI stack today and leaving room for other languages and frameworks over time.

The current direction is:

- generate normal app code, not opaque framework magic
- keep runtime coupling light
- make `fra new` and `fra make:*` the center of the product
- let generated apps stay readable and portable

[Full documentation](https://fracode.com)

## What FraCode Is

FraCode is not trying to replace FastAPI.

FraCode is trying to be a better way to start and grow application projects by giving you:

- a consistent project layout
- stack-aware scaffolding
- file generators for common app pieces
- a simple development CLI
- an architecture that can expand beyond Python-only templates

## Available Stacks

Right now the built-in stack is:

- `python/fastapi` - standalone FastAPI application with typed settings and pytest

You can inspect available stacks with:

```bash
fra stacks
```

## Quick Start

```bash
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`.

## Generated App Shape

The default FastAPI stack generates plain project code like:

- `main.py`
- `app/api/routes.py`
- `app/core/config.py`
- `tests/`
- `pyproject.toml`

The generated app is meant to stand on its own. FraCode helps create it, but the output stays normal FastAPI code.

A core rule for generated projects:

- zero `import fracode`
- zero FraCode runtime dependency in generated app code
- official framework/library imports only

## CLI

Core commands:

- `fra new <name>` creates a new project from a stack
- `fra stacks` lists available language/framework stacks
- `fra serve` runs the generated app
- `fra make:controller <Name>` generates a controller-style class file
- `fra make:model <Name>` generates a model file

Examples:

```bash
fra new blog --language python --framework fastapi
fra make:controller User --api
fra make:model User
```

## Multi-Language Direction

FraCode now has a stack system so other ecosystems can be added without rewriting the CLI around one framework.

The intended shape is:

- `templates/stacks/<language>/<framework>/...`
- each stack declares its own metadata
- the CLI discovers stacks dynamically
- new languages/frameworks can be added as new stack packages

That means FraCode can grow toward things like:

- `python/flask`
- `typescript/express`
- `go/fiber`

without pretending they all share one runtime abstraction.

That also means FraCode follows an eject-first philosophy: once the project is generated, you own the code completely.

## Development

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

## Contributing

Contributions are welcome, especially around:

- new stack support
- better project templates
- generator ergonomics
- documentation
- migration/auth/dev-workflow improvements for generated apps

See [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## License

FraCode is open-source software licensed under the [MIT license](LICENSE).

