Skip to content

marcusjrc/next-saas-boilerplate

Repository files navigation

SaaS App Boilerplate

An saas boilerplate app built using TypeScript, PostgreSQL, NextAuth and PgTyped.

Requirements

You will need:

  1. Node v16+
  2. Docker

Developer set up instructions

  1. First, install dependencies using pnpm install
  2. Copy .env.example to .env and replace the missing variables.
  3. Next, run docker-compose to set up your local database
  4. Third, install dbmate (https://github.com/amacneil/dbmate) and run dbmate migrate to get your local database migrated and ready for use
  5. Now, run the app server using pnpm dev
  6. Open http://localhost:3000 with your browser to see the result.

Database setup, management & queries

We use two packages for managing our postgresql database.

  1. DBMate (https://github.com/amacneil/dbmate) - is used to manage our migrations files & migrating the database with them. It has various cli cmds you can leverage to migrate your local db.
  2. PGTyped (https://pgtyped.dev/docs/getting-started) - we use to create typed queries from raw SQL queries. These raw & compiled queries can be found in ./src/db/queries

About

A saas boilerplate project built in Next

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published