This is a T3 Stack project bootstrapped with create-t3-app
.
We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.
If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our Discord and ask for help.
To learn more about the T3 Stack, take a look at the following resources:
- Documentation
- Learn the T3 Stack — Check out these awesome tutorials
You can check out the create-t3-app GitHub repository — your feedback and contributions are welcome!
Follow our deployment guides for Vercel, Netlify and Docker for more information.
- Create T3 app with pnpm:
pnpm create t3-app@latest
- Init Prisma:
pnpm prisma init
- Create Prisma schema:
pnpm prisma migrate dev --name init
- Create Prisma client:
pnpm prisma generate
- Push Prisma schema to database:
pnpm prisma db push
- Other libraries we use:
- Headless UI:
pnpm add @headlessui/react
- React Hook Form:
pnpm add react-hook-form
- Lodash:
pnpm add lodash @types/lodash
- Headless UI:
- To get
'@/components'
etc, working, add to "compilerOptions" in tsconfig.json:
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
- You need to add Models to the
schema.prisma
file for each of your tables. - Each time you update the models:
- You need to run
pnpm prisma db push
to update the database locally and test the changes. - Then, to save the changes in the database, you need to run
pnpm prisma migrate dev --name <name of migration>
. - And then you can save the changes in git.
- You need to run
- You need to add Providers to the
pages/api/auth/[...nextauth].ts
file for each of your authentication providers. - Generate
NEXTAUTH_SECRET
and runningopenssl rand -base64 32
and set it in your .env file.
- You need to add Queries and Mutations to the
pages/api/trpc/[...trpc].ts
file for each of your API endpoints.
- Go to vercel.com and select the project from Github.
- Add the following environment variables:
NEXTAUTH_URL
- The URL of your app, e.g.https://my-app.vercel.app
NEXTAUTH_SECRET
- The secret you generated for NextAuth.jsDATABASE_URL
- The URL of your production AND preview database, e.g.postgresql://postgres:postgres@localhost:5432/my-app
- Go to vercel.com/dyegolara//settings > General > Build & Development Settings > Project Settings
- Override the
Build Command
withprisma generate && prisma migrate deploy && next build
- Override the