Skip to main content

Documentation Index

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

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

Shipfastai reads all configuration from a .env file at the root of your product directory. Copy .env.example to .env and fill in your values before starting the application. Variables marked as required must be set or the backend will refuse to start.
VariableRequiredExampleDescription
APP_NAMENoShipfastaiDisplay name used in logs and emails. Defaults to Shipfastai.
APP_ENVNodevelopmentRuntime environment. Use production for deployed apps.
DEBUGNotrueEnables verbose error responses. Set to false in production.
FRONTEND_URLNohttp://localhost:3000Base URL of your Next.js frontend. Used to build email links.
BACKEND_URLNohttp://localhost:8000Base URL of your FastAPI backend. Used to build OAuth redirect URIs.
CORS_ORIGINSNohttp://localhost:3000Comma-separated list of allowed origins for CORS.
LOG_LEVELNoINFOLogging level: DEBUG, INFO, WARNING, ERROR.
LOG_FORMATNotextLog format: text or json.
VariableRequiredExampleDescription
DATABASE_URLYespostgresql://postgres:postgres@localhost:5432/ShipfastaiFull PostgreSQL connection string.
DATABASE_POOL_SIZENo5Number of persistent connections kept open. Defaults to 5.
DATABASE_MAX_OVERFLOWNo10Extra connections allowed beyond DATABASE_POOL_SIZE. Defaults to 10.
VariableRequiredExampleDescription
JWT_SECRETYesyour-super-secret-keySecret key used to sign JWT tokens. Use a long random string in production.
JWT_ALGORITHMNoHS256Signing algorithm for JWT. Defaults to HS256.
JWT_ACCESS_TOKEN_EXPIRE_MINUTESNo30Lifetime of an access token in minutes. Defaults to 30.
JWT_REFRESH_TOKEN_EXPIRE_DAYSNo7Lifetime of a refresh token in days. Defaults to 7.
VERIFICATION_TOKEN_EXPIRE_HOURSNo24How long an email verification link stays valid. Defaults to 24.
PASSWORD_RESET_TOKEN_EXPIRE_HOURSNo1How long a password reset link stays valid. Defaults to 1.
VariableRequiredExampleDescription
STRIPE_SECRET_KEYYessk_test_xxxYour Stripe secret key. Use sk_test_ keys during development.
STRIPE_PUBLISHABLE_KEYYespk_test_xxxYour Stripe publishable key. Sent to the frontend.
STRIPE_WEBHOOK_SECRETYeswhsec_xxxSigning secret for verifying incoming Stripe webhook events.
STRIPE_PRICE_ID_MONTHLYNoprice_xxxStripe price ID for your monthly subscription plan.
STRIPE_PRICE_ID_YEARLYNoprice_xxxStripe price ID for your yearly subscription plan.
VariableRequiredExampleDescription
RESEND_API_KEYNore_xxxAPI key from Resend. If omitted, email sending is disabled and a warning is logged.
FROM_EMAILNonoreply@yourdomain.comSender address for all transactional emails.
VariableRequiredExampleDescription
GOOGLE_CLIENT_IDNo1234567890.apps.googleusercontent.comGoogle OAuth client ID. Leave empty to disable Google login.
GOOGLE_CLIENT_SECRETNoGOCSPX-xxxGoogle OAuth client secret.
GITHUB_CLIENT_IDNoOv23liXXXXXXGitHub OAuth App client ID. Leave empty to disable GitHub login.
GITHUB_CLIENT_SECRETNoabc123xxxGitHub OAuth App client secret.
VariableRequiredExampleDescription
REDIS_URLNoredis://localhost:6379Connection URL for Redis. Used for caching and rate limiting. Docker Compose starts Redis automatically.
VariableRequiredExampleDescription
RATE_LIMIT_REQUESTSNo100Maximum number of requests allowed per window. Defaults to 100.
RATE_LIMIT_WINDOWNo60Duration of the rate limit window in seconds. Defaults to 60.
These variables are prefixed with NEXT_PUBLIC_ and are bundled into the browser at build time.
VariableRequiredExampleDescription
NEXT_PUBLIC_API_URLNohttp://localhost:8000Base URL of the backend API, used by the frontend to make requests.
NEXT_PUBLIC_STRIPE_PRICE_ID_MONTHLYNoprice_xxxStripe monthly price ID exposed to the frontend for checkout.
NEXT_PUBLIC_STRIPE_PRICE_ID_YEARLYNoprice_xxxStripe yearly price ID exposed to the frontend for checkout.

Complete .env.example

The following is the full .env.example from the basic product tier. Copy it to .env and replace placeholder values with your own.
.env
# ============================================================
# Shipfastai Environment Configuration
# ============================================================
# Copy this file to .env and fill in your values
# ============================================================

# Application
APP_NAME=Shipfastai
APP_ENV=development
DEBUG=true
FRONTEND_URL=http://localhost:3000
BACKEND_URL=http://localhost:8000

# Database
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/Shipfastai
DATABASE_POOL_SIZE=5
DATABASE_MAX_OVERFLOW=10

# JWT Authentication
JWT_SECRET=your-super-secret-jwt-key-change-in-production
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7

# Token expiry
VERIFICATION_TOKEN_EXPIRE_HOURS=24
PASSWORD_RESET_TOKEN_EXPIRE_HOURS=1

# OAuth - Google
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# OAuth - GitHub
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

# Stripe
STRIPE_SECRET_KEY=sk_test_xxx
STRIPE_PUBLISHABLE_KEY=pk_test_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx
STRIPE_PRICE_ID_MONTHLY=price_xxx
STRIPE_PRICE_ID_YEARLY=price_xxx

# Email (Resend)
RESEND_API_KEY=
FROM_EMAIL=noreply@yourdomain.com

# Redis (optional, for caching)
REDIS_URL=redis://localhost:6379

# Sentry (optional, for error tracking)
SENTRY_DSN=

# Rate Limiting
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=60

# CORS
CORS_ORIGINS=http://localhost:3000

# Logging
LOG_LEVEL=INFO
LOG_FORMAT=text

# Frontend env vars (Next.js)
NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_STRIPE_PRICE_ID_MONTHLY=price_xxx
NEXT_PUBLIC_STRIPE_PRICE_ID_YEARLY=price_xxx