node>= 18.x.xpnpm>= 10.30.3
Install the dependencies:
pnpm installCopy .env file from .env.example:
cp .env.example .envFor production, change .env database URL to Turso and fill the token:
TURSO_DB_URL=libsql://example-db.turso.io
TURSO_AUTH_TOKEN=example-token-123Migrate the database:
pnpm run db:migrateUse Drizzle Studio to check database:
pnpm run db:studioMake a new OAuth Consent Screen project at Google Cloud Console and add the credentials to your .env:
GOOGLE_CLIENT_ID=your-client-id-123
GOOGLE_CLIENT_SECRET=your-client-secret-123Add the Google Redirect URI from the .env to Google Cloud Console's client's Authorized Redirect URIs:
http://dev.slin.ky:3000/api/auth/google/callback
For production, change the redirect URI:
GOOGLE_REDIRECT_URI=http://<YOUR.PRODUCTION.DOMAIN>/api/auth/google/callbackEnable Safe Browsing API in API & Services at Google Cloud Console and get the API Key:
GOOGLE_SAFE_BROWSING_API_KEY=your-api-keyGet the Turnstile site key and secret key from the Cloudflare Dashboard and put them into the .env:
TURNSTILE_SITE_KEY=your-site-key
TURNSTILE_SECRET_KEY=your-secret-keySetup a Vercel Blob and make use of Vercel CLI:
pnpm add -g vercel
vercel link
vercel storage create
vercel env pullAfter pulling the env, copy them from .env.local to .env:
BLOB_READ_WRITE_TOKEN=your-read-write-token
VERCEL_OIDC_TOKEN=your-vercel-oidc-tokenFor production, change the base URL to your production base URL:
BASE_URL=<YOUR.PRODUCTION.DOMAIN>Edit your hosts file:
sudo nano /etc/hosts Add this line:
127.0.0.1 dev.slin.kyStart dev server on http://dev.slin.ky:3000:
pnpm devBuild for production:
pnpm buildPreview production build:
pnpm preview