Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.markup.freddiephilpot.dev/llms.txt

Use this file to discover all available pages before exploring further.

Environment Variables

Markup uses environment variables for database connectivity, authentication, and application configuration. Create a .env.local file in the project root.

Full Example

# PostgreSQL / Prisma
DATABASE_URL=postgresql://markup:password@localhost:5432/markup

# WorkOS AuthKit
WORKOS_CLIENT_ID=client_xxxxxxxxx
WORKOS_API_KEY=sk_test_xxxxxxxxx
WORKOS_COOKIE_PASSWORD=replace_with_secure_random_string
NEXT_PUBLIC_WORKOS_REDIRECT_URI=http://localhost:3000/api/auth/callback

Database Variables

DATABASE_URL

PostgreSQL connection string used by Prisma. Example:
DATABASE_URL=postgresql://username:password@localhost:5432/markup

Format

postgresql://USER:PASSWORD@HOST:PORT/DATABASE

Example Providers

Local PostgreSQL

DATABASE_URL=postgresql://postgres:password@localhost:5432/markup

Docker PostgreSQL

DATABASE_URL=postgresql://markup:markup_password@db:5432/markup

Supabase

DATABASE_URL=postgresql://postgres:[PASSWORD]@db.[PROJECT].supabase.co:5432/postgres

Neon

DATABASE_URL=postgresql://user:password@ep-example.eu-central-1.aws.neon.tech/markup?sslmode=require

WorkOS Variables

WORKOS_CLIENT_ID

Client ID for your WorkOS application. Example:
WORKOS_CLIENT_ID=client_123456789

WORKOS_API_KEY

Secret API key from the WorkOS dashboard. Example:
WORKOS_API_KEY=sk_test_123456789
Keep this value private.
Encryption secret used for session cookies. Generate a secure value:
openssl rand -base64 32
Example:
WORKOS_COOKIE_PASSWORD=long_secure_random_string

NEXT_PUBLIC_WORKOS_REDIRECT_URI

Authentication callback URL.

Local Development

NEXT_PUBLIC_WORKOS_REDIRECT_URI=http://localhost:3000/api/auth/callback

Production Example

NEXT_PUBLIC_WORKOS_REDIRECT_URI=https://yourdomain.com/api/auth/callback

Local Development Example

DATABASE_URL=postgresql://markup:password@localhost:5432/markup

WORKOS_CLIENT_ID=client_xxxxx
WORKOS_API_KEY=sk_test_xxxxx
WORKOS_COOKIE_PASSWORD=super_secure_random_string
NEXT_PUBLIC_WORKOS_REDIRECT_URI=http://localhost:3000/api/auth/callback

Docker Example

DATABASE_URL=postgresql://markup:markup_password@db:5432/markup

WORKOS_CLIENT_ID=client_xxxxx
WORKOS_API_KEY=sk_test_xxxxx
WORKOS_COOKIE_PASSWORD=super_secure_random_string
NEXT_PUBLIC_WORKOS_REDIRECT_URI=http://localhost:3000/api/auth/callback

Production Recommendations

  • Never commit .env.local
  • Use strong random secrets
  • Store secrets in your hosting provider
  • Rotate API keys periodically
  • Restrict database network access
  • Enable SSL for production PostgreSQL connections

Common Issues

Prisma Cannot Connect to Database

Check:
  • PostgreSQL is running
  • Database credentials are correct
  • Port is accessible
  • SSL settings are configured correctly

WorkOS Redirect Errors

Ensure the callback URL matches exactly:
/api/auth/callback
Also verify the redirect URI is configured in the WorkOS dashboard.

Ignoring Environment Files

Add environment files to .gitignore:
.env
.env.local
.env.production