.github
└─ workflows
└─ CI with pnpm cache setup
.vscode
└─ Recommended extensions and settings for VSCode users
apps
└─ next.js
├─ Next.js 13
├─ React 18
└─ E2E Typesafe API Server & Client
packages
├─ api
| └─ tRPC v10 router definition
└─ db
└─ typesafe db-calls using Prisma
To get it running, follow the steps below:
# Install dependencies
pnpm i
# Configure environment variables.
# There is an `.env.example` in the root directory you can use for reference
cp .env.example .env
# Push the Prisma schema to your database
pnpm db-push
We do not recommend deploying a SQLite database on serverless environments since the data wouldn't be persisted. I provisioned a quick Postgresql database on Railway, but you can of course use any other database provider. Make sure the prisma schema is updated to use the correct database.
Let's deploy the Next.js application to Netlify. You can use the Netlify CLI to deploy the application.
# Install the Netlify CLI
npm install netlify-cli -g
# Login to your Netlify account
netlify login
# Deploy the Next.js application
netlify deploy
The stack originates from create-t3-turbo.