Skip to content

Configuration

Snaapi is configured through environment variables and Deno tasks. This reference covers all available settings.

Database

Connection settings for PostgreSQL:

Variable Description Default
DATABASE_URL PostgreSQL connection string
DATABASE_URL="postgres://user:password@localhost:5432/snaapi"

Authentication

Core authentication settings powered by Better Auth:

Variable Description Default
BETTER_AUTH_SECRET Secret key for signing tokens
BETTER_AUTH_URL Base URL of your application
SNAAPI_SESSION_SECRET Session encryption secret
ENABLE_EMAIL_PASSWORD_LOGIN Enable email/password authentication true
REQUIRE_EMAIL_VERIFICATION Require email verification before login false
SNAAPI_DEFAULT_ROLE Default role assigned to new users on signup user
BETTER_AUTH_SECRET="your-secret-key"
BETTER_AUTH_URL="http://localhost:5173"
ENABLE_EMAIL_PASSWORD_LOGIN=true

Social Auth Providers

Enable social login by setting both the client ID and client secret for each provider:

Variable Description
AUTH_GOOGLE_CLIENT_ID Google OAuth client ID
AUTH_GOOGLE_CLIENT_SECRET Google OAuth secret
AUTH_GITHUB_CLIENT_ID GitHub OAuth client ID
AUTH_GITHUB_CLIENT_SECRET GitHub OAuth secret
AUTH_GOOGLE_CLIENT_ID="your-google-client-id"
AUTH_GOOGLE_CLIENT_SECRET="your-google-client-secret"
AUTH_GITHUB_CLIENT_ID="your-github-client-id"
AUTH_GITHUB_CLIENT_SECRET="your-github-client-secret"

OpenTelemetry

Observability and tracing configuration:

Variable Description Default
OTEL_DENO Enable OpenTelemetry integration true
OTEL_SERVICE_NAME Service name reported to OTEL collector
OTEL_DENO=true
OTEL_SERVICE_NAME="snaapi-production"

Application Settings

General application configuration:

Variable Description Default
APP_ENV Environment mode (development, production) development
SNAAPI_LOG_LEVEL Log verbosity (debug, info, warn, error) debug
SNAAPI_AUTO_MIGRATE Run database migrations on startup true
SNAAPI_ENABLE_WORKER Enable background job worker true
SNAAPI_INSTALL_TOKEN Token for initial setup/install
SNAAPI_DOCS_PUBLIC Make documentation pages publicly accessible true
SNAAPI_OPENAPI_PUBLIC Make OpenAPI spec publicly accessible true

LLM Providers

Set API keys to enable the AI Assistant feature (at least one required):

Variable Description
ANTHROPIC_API_KEY Anthropic (Claude) API key
OPENAI_API_KEY OpenAI API key
GOOGLE_GENERATIVE_AI_API_KEY Google Gemini API key

Deno Tasks Reference

Available tasks defined in deno.json:

Development

Task Description
deno task dev Start Vite dev server with OTEL enabled
deno task server Start Docker services and run with watch mode
deno task docker:up Start Docker Compose services
deno task docker:down Stop Docker Compose services

Testing

Task Description
deno task test Run test suite
deno task test:watch Run tests in watch mode with dot reporter
deno task test:integration Run integration tests only
deno task coverage Run tests with coverage collection
deno task coverage:check Generate lcov and check coverage threshold (70%)
deno task coverage:html Generate HTML coverage report
deno task coverage:lcov Generate lcov coverage report

Quality

Task Description
deno task check Format check, lint, and typecheck
deno task check:types Typecheck with --deny-import
deno task ok Full quality gate (lint + types + coverage)

Build & Deploy

Task Description
deno task build Build with Vite for production
deno task start Serve the built application
deno task compile Compile to standalone binary (dist/snaapi)

Database

Task Description
deno task migrate Run Better Auth database migrations
deno task generate Generate Better Auth schema

Other

Task Description
deno task update Update Fresh framework