Skip to content

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

  1. Introduction
  2. Prerequisites
  3. Installation Guide
  4. Configuration
  5. Running the Application
  6. Environment Setup
  7. Database and Migrations
  8. Deployment
  9. 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:

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:
    Use task run-local to run the back-end with the local database.

  • Production Mode:
    Use task 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:

task docker-compose

You can also manually apply migrations using:

task alembic-upgrade-local

For more information on database management, refer to the Installation Guide.

Deployment

For deploying your project to production, you can:

  1. Configure your prod.env with appropriate environment variables.
  2. 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. 🚀