NOTE: We now recommend using our updated stack.
Comes with user authentication included
& many more tasty treats
We are hiring! Contact us here
You must have node, yarn, postgres and redis installed and setup locally
Clone the repo
Delete the app folder if you're working on a purely web project.
rm -rf packages/appInstall dependencies.
yarn installCreate local postgres database
createdb boilerplateCreate a .env file and update the DATABASE_URL with your local postgres database url.
cp packages/api/.env.example packages/api/.env# Replace <user>,<password> and <db-name> with your corresponding username, password, and database name of your postgresql database.
DATABASE_URL=postgresql://<user>:<password>@localhost:5432/<db-name>Migrate the database.
cd packages/api && yarn db:migrateWe use Husky to run a couple of checks each commit (prettier, eslint & commitlint), make sure to add a
.huskyrc file to your home directory:
touch ~/.huskyrcand copy this into the file this in:
export PATH="/usr/local/bin:$PATH"then run this in the root of the project:
npx husky installWe use AWS S3 for image/file hosting, so you'll need to set up a few things for this to work, process can be found here.
cd packages/api && yarn devcd packages/web && yarn devcd packages/app && yarn startAn example is deployed here
We are using Railway for the API package and Vercel for the WEB package
For railway we have setup preview deploys and that gives a dynamic url that the web can use. The url includes the PR number so on the web we need to grab the PR number from git and dynamically change the API_URL when building the Next.js app. Vercel doesn't include PR numbers in the env variables so we use a package to do that for us.