Skip to content

Setup

This guide will walk you through setting up LaunchFast. We will go through the process of cloning the project, installing dependencies, setting up your database and running the local development server.

Prerequisites

Before you can get started, you will need to have the following installed on your machine.

  • Node.js (v18 or higher)
  • Git
  • VSCode (recommended, or any other code editor)
  • Project setup

    1. Create a new project with LaunchFast

      Clone the LaunchFast repository:

      Terminal window
      git clone https://github.com/LaunchFast-Boilerplates/launchfa.st-astro

      Next, install all the dependencies. Make sure you have installed npm before running the following command:

      Terminal window
      npm install

      Next, set up the environment variables. To do this, copy the .env.example file in the root of your project and rename it to .env with the following:

      Terminal window
      cp .env.example .env

      Finally, set the LaunchFast repository as the upstream origin for your project, so you can pull in updates in the future via the following commands:

      Terminal window
      rm -rf .git
      git init
      # Your writable remote
      git remote add origin git@github.com:<user>/<repo>.git
      # LaunchFast template for pulling updates only
      git remote set upstream https://github.com/LaunchFast-Boilerplates/launchfa.st-astro
      git add -A
      git commit -m "Initial commit"
      # First push: establishes branch tracking
      git push -u origin main # use 'master' if that’s your default
    2. Set up your database provider

      Open the .env file and update the DATABASE_TYPE and the relevant database provider environment variable(s) per the following instructions:

      Finally, initiate the relevant schema on the database provider if only you are using Postgres or SQLite via the following command:

      Terminal window
      npm run db:setup
    3. Set up your storage provider

      Set up the storage environment variables to use the ability to upload and serve files (like images, videos, etc.) over pre-signed URLs. LaunchFast supports all S3-compatible storage providers (Amazon S3, Cloudflare R2, and Supabase Storage) and Firebase Storage.

      Open the .env file and update the STORAGE_PROVIDER and the relevant storage provider environment variable(s) per the following instructions:

    4. Set up authentication

      Open the .env file and update the authentication environment variables per the following instructions:

    5. Set up your email provider

      Open the .env file and update the environment variables for the email provider that you intend to use per the following instructions:

    6. Start your development server

      Now your app should be ready to go. To start the local development server, navigate into your project root folder and run the following command.

      Terminal window
      npm run dev

      Open localhost:3000 in your browser to see the your app.