Skip to main content
The Daily Tracker API is configured using environment variables. This page provides a complete reference of all available variables.

Required Variables

These variables must be set for the application to start successfully.
DATABASE_URL
string
required
PostgreSQL connection URL. Supports both JDBC format and Prisma format.Examples:
  • JDBC: jdbc:postgresql://localhost:5432/daily_scrum
  • Prisma: postgresql://user:pass@localhost:5432/daily_scrum?schema=public
The application will parse either format correctly.
JWT_SECRET
string
required
Secret key used to sign JWT access tokens. Must be at least 32 characters long.Example: your_jwt_secret_key_min_32_chars
Keep this secret secure. Anyone with access to this key can generate valid authentication tokens.
FRONTEND_URL
string
required
URL of the frontend application. Used for CORS configuration and OAuth2 redirects.Examples:
  • Development: http://localhost:5173
  • Production: https://dailytracker.com.br
GOOGLE_CLIENT_ID
string
required
OAuth2 Client ID from Google Cloud Console. Required for Google Sign-In functionality.Get this from the Google Cloud Console under “APIs & Services” > “Credentials”.
GOOGLE_CLIENT_SECRET
string
required
OAuth2 Client Secret from Google Cloud Console. Works together with GOOGLE_CLIENT_ID.
Keep this secret secure. Never commit it to version control.
AES_SECRET
string
required
Secret key used for AES encryption of sensitive data (like Gemini API keys stored in the database).
Keep this secret secure and never change it after deployment, as existing encrypted data will become unreadable.

Optional Variables

These variables have default values and can be customized as needed.
PORT
integer
default:"3000"
Port number where the server will listen for HTTP requests.Example: PORT=8080

Configuration Summary

# Local development configuration
export DATABASE_URL="postgresql://user:pass@localhost:5432/daily_scrum?schema=public"
export JWT_SECRET="your_jwt_secret_key_with_at_least_32_characters"
export FRONTEND_URL="http://localhost:5173"
export GOOGLE_CLIENT_ID="your_google_client_id"
export GOOGLE_CLIENT_SECRET="your_google_client_secret"
export AES_SECRET="your_aes_secret_key"
export PORT=3000

Application Configuration

Beyond environment variables, the application has additional configuration in application.yaml:

JWT Token Expiration

  • Access Token: 24 hours (86400000 ms)
  • Refresh Token: 30 days (2592000000 ms)

Database Connection Pool

  • Maximum Pool Size: 5 connections
  • Minimum Idle: 1 connection
  • Connection Timeout: 20 seconds
  • Idle Timeout: 5 minutes

Hibernate Configuration

  • DDL Auto: validate (does not create or modify tables)
  • Dialect: PostgreSQL
  • Naming Strategy: Standard (preserves PascalCase table names)

Flyway Configuration

  • Baseline on Migrate: Enabled
  • Baseline Version: 0
  • Migration Location: classpath:db/migration
The application uses Flyway for database migrations. See the Database Setup guide for more details.

Security Best Practices

Use cryptographically secure random strings for all secret variables:
# Generate a secure random string (32 bytes in base64)
openssl rand -base64 32
  • Add .env files to .gitignore
  • Use environment variable management tools in production
  • Rotate secrets regularly
Development, staging, and production should each have their own unique secrets to prevent cross-environment security issues.

Database Setup

Configure PostgreSQL and run migrations

Deployment

Deploy with Docker and Render

Build docs developers (and LLMs) love