First Steps
You just scaffolded a new T3 App and are ready to go. Here is the bare minimum to get your app working.
Database
MySQL, PostgreSQL
If you chose MySQL or PostgreSQL as your database, your T3 app will come with a
start-database.sh
.env
Prisma
If your app includes Prisma, make sure to run
npx prisma db push
Drizzle
If your app includes Drizzle, check the
.env
DATABASE_URL
pnpm db:push
Authentication
If your app includes NextAuth.js, we get you started with the
DiscordProvider
Of course, if you prefer to use a different auth provider, you can also use one of the many providers↗ that NextAuth.js offers.
- You will need a Discord account, so register one if you haven’t already.
- Navigate to https://discord.com/developers/applications↗ and click “New Application” in the top right corner. Give your application a name and agree to the Terms of Service.
- Once your application has been created, navigate to “Settings → OAuth2 → General”.
- Copy the “Client ID” and add it to your as
.env
.AUTH_DISCORD_ID
- Click “Reset Secret”, copy the new secret, and add it to your as
.env
.AUTH_DISCORD_SECRET
- Click “Add Redirect” and type in .
http://localhost:3000/api/auth/callback/discord
- For production deployment, follow the previous steps to create another Discord Application, but this time replace with the URL that you are deploying to.
http://localhost:3000
- For production deployment, follow the previous steps to create another Discord Application, but this time replace
- Save Changes.
You should now be able to log in.
Editor Setup
The following extensions are recommended for an optimal developer experience. The links below provide editor specific plugin support.
Next Steps
- If your app includes tRPC, check out and
src/pages/index.tsx
to see how tRPC queries work.src/server/api/routers/post.ts
- Have a look around the Create T3 App docs, as well as the docs of the packages that your app includes.
- Join our Discord↗ and give us a star on GitHub↗! :)