Metadata-Version: 2.4
Name: fastapi-kris
Version: 1.0.0
Summary: The Create Next App equivalent for FastAPI — scaffold production-ready FastAPI projects in seconds.
Author: fastapi-kris contributors
License: MIT
Project-URL: Homepage, https://github.com/fastapi-kris/fastapi-kris
Project-URL: Repository, https://github.com/fastapi-kris/fastapi-kris
Project-URL: Bug Tracker, https://github.com/fastapi-kris/fastapi-kris/issues
Project-URL: Documentation, https://github.com/fastapi-kris/fastapi-kris#readme
Keywords: fastapi,cli,scaffold,boilerplate,generator,python
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12.0
Requires-Dist: rich>=13.7.0
Requires-Dist: InquirerPy>=0.3.4
Requires-Dist: Jinja2>=3.1.4
Requires-Dist: click>=8.1.7
Dynamic: license-file

# fastapi-kris

> The **Create Next App** equivalent for FastAPI — scaffold production-ready projects in seconds.

[![PyPI](https://img.shields.io/pypi/v/fastapi-kris)](https://pypi.org/project/fastapi-kris/)
[![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

---

## Features

- 🚀 **Beautiful interactive CLI** — keyboard navigation, colors, progress bars
- 🏗️ **Three architectures** — Basic, Layered, Microservice
- 🗄️ **Database support** — PostgreSQL, MySQL, SQLite, None
- 🔐 **Authentication** — JWT, OAuth2, None
- 🐳 **Docker ready** — Dockerfile, docker-compose, .dockerignore
- 🧪 **Test suite** — Pytest with async support
- 📄 **Environment files** — `.env` + `.env.example` pre-populated
- ⚡ **Zero config** — the generated project runs immediately

---

## Installation

```bash
pip install fastapi-kris
```

---

## Usage

### Interactive mode

```bash
fapi new my-first-api
```

### Skip all prompts (use defaults)

```bash
fapi new my-first-api --yes
fapi new my-first-api -y
```

**Default configuration:**

| Setting | Default |
|---------|---------|
| Architecture | Microservice |
| Database | PostgreSQL |
| ORM | SQLAlchemy |
| Authentication | JWT |
| Docker | Yes |
| Testing | Pytest |
| Env file | Yes |

### Other commands

```bash
fapi --help          # Show help
fapi new --help      # Show help for `new` command
fapi version         # Show CLI version
```

---

## Architectures

### Basic

Simple, single-layer structure. Ideal for small APIs and beginners.

```
my-api/
├── main.py
├── config.py
├── routers/
│   ├── health.py
│   └── sample.py
├── core/          # (if auth selected)
├── tests/
├── requirements.txt
├── .env
└── README.md
```

### Layered

Clean separation of concerns following the Repository / Service / Router pattern.

```
my-api/
├── main.py
├── config.py
├── app/
│   ├── routers/
│   ├── services/
│   ├── repositories/
│   ├── models/
│   ├── schemas/
│   ├── database/
│   ├── dependencies/
│   ├── utils/
│   ├── core/
│   └── exceptions/
├── tests/
├── requirements.txt
├── .env
└── README.md
```

### Microservice

Production-grade microservice architecture with an API Gateway, three services, shared utilities, and Docker Compose wiring.

```
my-api/
├── gateway/
├── services/
│   ├── auth-service/
│   ├── user-service/
│   └── product-service/
├── shared/
├── docker-compose.yml
├── .env
└── README.md
```

---

## Example Session

```
🚀 FastAPI-Kris

Project:
my-first-api

Project Description:
> My first FastAPI application

Project Architecture
❯ Basic
  Layered
  Microservice

Database
❯ PostgreSQL
  MySQL
  SQLite
  None

...

Generating project...

████████████████████

✔ Project my-first-api generated successfully!
```

---

## Getting Started After Generation

```bash
cd my-first-api
pip install -r requirements.txt
cp .env.example .env   # update values
uvicorn main:app --reload
```

Open: http://localhost:8000/docs

---

## Contributing

See [DEVELOPER_GUIDE.md](DEVELOPER_GUIDE.md) for setup instructions.

---

## License

MIT
