npm i --legacy-peer-deps
Get UploadThing
- Create Project
- Copy Secret and App ID under Legacy
Fill in these values into .env
Get Stream
- Create App
- Copy Key and Secret under App Access Keys
- Turn off Threads & Replies under Chat Messaging > Channel Types > messaging
Fill in these values into .env
Create Google Cloud Project
- Create Project
-
Select External
-
Fill in required fields
-
Add .../auth/userinfo.email and .../auth/userinfo.profile under Scopes
-
Publish Project
- Create OAuth client ID
- Select Web Application type
- Add http://localhost:3000/api/auth/callback/google under Authorized redirect URIs
- Copy Client ID and Client secret
Fill in these values into .env
POSTGRES_USER="username"
POSTGRES_HOST="host"
POSTGRES_PASSWORD="password"
POSTGRES_DATABASE="database"
UPLOADTHING_SECRET='UploadThing Secret Key'
NEXT_PUBLIC_UPLOADTHING_APP_ID='UploadThing App ID'
NEXT_PUBLIC_STREAM_KEY='Stream Key'
STREAM_SECRET='Stream Secret'
GOOGLE_CLIENT_ID='CLIENT_ID.apps.googleusercontent.com'
GOOGLE_CLIENT_SECRET='CLIENT_SECRET'
CRON_SECRET='Random String'
NEXT_PUBLIC_BASE_URL='http://localhost:3000'
npx prisma generate
npx prisma db push
crontab -e
0 2 * * * curl -X GET "http://localhost:3000/api/clear" -H "Authorization: Bearer [CRON_SECRET]"
Replace [CRON_SECRET] with yours from .env
npm run dev