title | description | layout |
---|---|---|
First Steps |
Getting started with your new T3 App |
../../../layouts/docs.astro |
You just scaffolded a new T3 App and are ready to go. Here is the bare minimum to get your app working.
If your app includes Prisma, make sure to run npx prisma db push
from the root directory of your app. This command will sync your Prisma schema with your database and will generate the TypeScript types for the Prisma client based on your schema. Note that you need to restart the TypeScript server after doing this so that it can detect the generated types.
If your app includes NextAuth, we get you started with the DiscordProvider
. This is one of the simplest providers that NextAuth offers, but it still requires a bit of initial setup on your part.
Of course if you prefer to use a different auth provider, you can also use one of the many providers that Next-Auth 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
.env
asDISCORD_CLIENT_ID
. - Click "Reset Secret", copy the new secret, and add it to your
.env
asDISCORD_CLIENT_SECRET
. - Click "Add Redirect" and type in
https://localhost:3000/api/auth/callback/discord
. - Save Changes. You should now be able to log in. Note that you need to restart the dev server for changes in environment variables to be reflected in your app.