I recommend using Vercel to deploy your app.
I recommend using Vercel Storage for your database. It's free and easy to setup. Once you have your database setup, you will need to add the connection string to your .env.local
file.
AUTH_DRIZZLE_URL="postgres://"
POSTGRES_URL="postgres://"
bun run db:generate
This will generate a migration SQL file: drizzle/migrations/0000_migration.sql
bun run db:migrate
USER_EMAIL=
USERNAME=
USER_PASSWORD=
bun run db:seed
To get a Mapbox token, you will need to register on their website. The token will be used to identify you and start serving up map tiles. The service is free until a certain level of traffic is exceeded.
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=
Because Mapbox tokens are required for the client application to make requests to Mapbox servers, you have to distribute it with your app. It is not possible to stop a visitor to your site from scraping the token. The practice outlined below can help you protect your token from being abused.
http://localhost
), public code snippet (Gist, Codepen etc.) and production (deployed to https://mycompany.com
). The public token should be rotated regularly. The production token should have strict scope and URL restrictions that only allows it to be used on a domain that you own.UPLOADTHING_SECRET=
UPLOADTHING_APP_ID=
If you don't already have a uploadthing secret key, sign up and create one from the dashboard!
The only environment variable that is mandatory is the AUTH_SECRET
. This is a random value used by the library to encrypt tokens and email verification hashes. (See Deployment to learn more). You can generate one via running:
npx auth secret
Alternatively, you can use the following openssl
command, which should be available on all Linux / Mac OS X systems.
openssl rand -base64 33
Then add it to your .env.local
file:
AUTH_SECRET=secret