mycroforge/docs
2024-06-09 20:35:54 +02:00
..
todo-example Improved db feature and adding documentation 2024-06-09 20:35:54 +02:00
README.md Improved db feature and adding documentation 2024-06-09 20:35:54 +02:00

General introduction

What is MycroForge?

MycroForge is an opinionated CLI tool that is meant to facilitate the development of FastAPI & SQLAlchemy based backends. It provides a command line interface that allows users to generate a skeleton project and other common items like database entities, migrations, routers and even basic CRUD functionality. The main purpose of this tool is to generate boilerplate code and to provide a unified interface for performing recurrent development activities.

Generating a project

To generate a project you can run the following command.

m4g init <name>

Description:
  Initialize a new project

Usage:
  m4g init <name> [options]

Arguments:
  <name>  The name of your project

Options:
  --without <api|db|git>  Features to exclude
  -?, -h, --help          Show help and usage information

Running this command will generate

📦<project_name>
 ┣ 📂.git
 ┣ 📂.venv
 ┣ 📂api
 ┃ ┗ 📂routers
 ┃ ┃ ┗ 📜hello.py
 ┣ 📂db
 ┃ ┣ 📂engine
 ┃ ┃ ┗ 📜async_session.py
 ┃ ┣ 📂entities
 ┃ ┃ ┗ 📜entity_base.py
 ┃ ┣ 📂versions
 ┃ ┣ 📜README
 ┃ ┣ 📜env.py
 ┃ ┣ 📜script.py.mako
 ┃ ┗ 📜settings.py
 ┣ 📜.gitignore
 ┣ 📜alembic.ini
 ┣ 📜db.docker-compose.yml
 ┣ 📜m4g.json
 ┣ 📜main.py
 ┗ 📜requirements.txt