FastAPITemplate
FastAPITemplate is a full-stack application that allows you to have a template to start your FastAPI application based on GenericSuite.
Directory Structure
fastapitemplate/
├── config_dbdef/ # Configuration database definitions
├── server/ # Server application
├── ui/ # User interface
└── mcp-server/ # MCP server
Installation
git clone https://github.com/tomkat-cr/genericsuite-basecamp.git
cd genericsuite-basecamp/docs/Sample-Code/fastapitemplate
Configuration
Run the following command to copy the example environment files to the appropriate locations:
make init-app-environment
Or manually copy:
cp server/.env.example server/.env
cp ui/.env.example ui/.env
Running the application without Docker
# With a remote MongoDB database
make dev
Running the application with Docker
Start the application and its docker containers:
# With a local database database
make run
# With a remote MongoDB database
APP_STAGE=qa make run
Terminate the application and its docker containers:
make down
Soft restart (only docker compose restart):
make restart
Hard restart (down and up):
make hard-restart
Run the local database only:
make run-db-only