Quickstart
Start developing locally in 5 minutes
Get started with core of Cascade
Cascade relies on Prisma for database management and Postgres for data storage. This guide will help you set up a local development environment with a Postgres database.
Clone the repo:
Spin up Postgres in docker headless mode.
Copy env variables from the example:
Be sure to populate database urls; at this stage, they are the most important thing to get started locally:
Migrate Prisma & generate client:
Install dependencies & run application
Add Discord authentication
This section is borrowed from the T3 app documentation as Casdcade is basing on T3.
- Head to the Applications section in the Discord Developer Portal, and click on “New Application”
- In the settings menu, go to “OAuth2 => General”
- Copy the Client ID and paste it in
DISCORD_CLIENT_ID
in.env
. - Under Client Secret, click “Reset Secret” and copy that string to
DISCORD_CLIENT_SECRET
in.env
. Be careful as you won’t be able to see this secret again, and resetting it will cause the existing one to expire. - Click “Add Redirect” and paste in
<app url>/api/auth/callback/discord
(example for local development:http://localhost:3000/api/auth/callback/discord
) - Save your changes
- It is possible, but not recommended, to use the same Discord Application for both development and production. You could also consider Mocking the Provider during development.
Sign in into the application
Head to the login page(http://localhost:3000
) and click on the Discord button to sign in with your Discord account.
Cascade relies on roles to manage user permissions. By default, the user is assigned the USER
role. You can change the role in the database by updating the role
field in the User
table.
You need to change your user role to SUPER_ADMIN
to get access to all features