Craft Your Startup Boilerplate Documentation
Welcome to the Craft Your Startup Boilerplate documentation hub! This guide will help you navigate and use the boilerplate to build your FastAPI + React applications efficiently. Below, you'll find a complete overview of the project setup, configuration, and usage.
Table of Contents
- Introduction
- Prerequisites
- Installation Guide
- Configuration
- Running the Application
- Environment Setup
- Database and Migrations
- Deployment
- FAQ
Introduction
The Craft Your Startup Boilerplate is designed to provide a robust foundation for building modern web applications using FastAPI on the back-end and React on the front-end. With a streamlined setup and various built-in tools like Poetry, Docker, and Taskfile, this boilerplate is perfect for getting your project up and running quickly while maintaining scalability.
Prerequisites
Before proceeding, ensure that you have the following tools installed:
- Python 3.11+ (We recommend pyenv for version management)
- Poetry for dependency management
- Docker for database setup and management
- Taskfile for task automation
- Visual Studio Code (VS Code) as the recommended IDE
Installation Guide
To get started with the project setup, follow the detailed Installation Guide. It walks you through:
- Setting up Python with pyenv
- Installing dependencies with Poetry
- Configuring environment variables
- Starting the back-end server
Configuration
You will need to configure environment variables to manage different environments (local, production). The project includes a local.env.example
file, which can be copied to create your own environment configuration files (local.env
, prod.env
). Check the installation guide for further details on environment setup.
Running the Application
Once the environment is set up, the application can be run in different modes:
-
Local Development:
Usetask run-local
to run the back-end with the local database. -
Production Mode:
Usetask run-prod
to run the back-end with a production database.
The back-end server runs using FastAPI and can be accessed on http://localhost:8012
.
Environment Setup
Make sure to create .env
files for local and production environments based on local.env.example
.
These files will include important configurations like database credentials, API keys, and OAuth settings.
Database and Migrations
This boilerplate uses PostgreSQL as the database, managed through Docker. Migrations are handled by Alembic. To set up the database and apply migrations locally, run:
You can also manually apply migrations using:
For more information on database management, refer to the Installation Guide.
Deployment
For deploying your project to production, you can:
- Configure your
prod.env
with appropriate environment variables. - Run the project using
task run-prod
.
Docker can also be used to manage your production database and any other services you might need.
FAQ
Check the FAQ section for common issues and troubleshooting tips. If you run into problems during installation or setup, make sure to consult the Installation Guide or reach out for support.
Happy building with Craft Your Startup Boilerplate! If you have any issues or suggestions, feel free to contact us. 🚀