-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy path.env.example
More file actions
119 lines (100 loc) · 5.52 KB
/
Copy path.env.example
File metadata and controls
119 lines (100 loc) · 5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# =============================================================================
# AI Template — Multi-tenant SaaS Boilerplate
# Copy to .env and fill in. Every FEATURE_* flag toggles a module.
# =============================================================================
# ─── Core ─────────────────────────────────────────────────────────────────
APP_ENV=development # development | staging | production
APP_NAME=AI Template
APP_BASE_URL=http://localhost:8000
FRONTEND_BASE_URL=http://localhost:3000
ADMIN_BASE_URL=http://localhost:3001
NGINX_PORT=8080
# ─── Database ─────────────────────────────────────────────────────────────
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=dogeapi
POSTGRES_PASSWORD=dogeapi
POSTGRES_DB=dogeapi
DATABASE_URL=postgresql+asyncpg://dogeapi:dogeapi@localhost:5432/dogeapi
DATABASE_URL_SYNC=postgresql+psycopg://dogeapi:dogeapi@localhost:5432/dogeapi
# ─── Redis ────────────────────────────────────────────────────────────────
REDIS_URL=redis://localhost:6379/0
# ─── JWT / authx ──────────────────────────────────────────────────────────
JWT_SECRET_KEY=change-me-in-production-please-use-a-long-random-string
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=15
JWT_REFRESH_TOKEN_EXPIRE_DAYS=20
JWT_COOKIE_SECURE=false # set true in production over HTTPS
JWT_COOKIE_SAMESITE=lax
# ─── CORS ─────────────────────────────────────────────────────────────────
CORS_ORIGINS=http://localhost:3000,http://localhost:3001
# =============================================================================
# Feature flags — every feature is OFF by default unless noted
# =============================================================================
# Always-on core features (toggleable for testing only)
FEATURE_API_KEYS=true
FEATURE_AUDIT_LOG=true
FEATURE_RATE_LIMITING=true
# Auth providers (default: email + password only)
FEATURE_OAUTH=false
FEATURE_MAGIC_LINK=false
# Email delivery (false = invites/verification return token-link in response)
FEATURE_EMAIL_DELIVERY=false
# Optional integrations
FEATURE_AI_CHAT=false
FEATURE_LOGFIRE=false
FEATURE_STRIPE=false
# ─── Email (FEATURE_EMAIL_DELIVERY=true) ──────────────────────────────────
EMAIL_PROVIDER=smtp # smtp | resend
EMAIL_FROM=AI Template <noreply@dogeapi.local>
RESEND_API_KEY=
SMTP_HOST=localhost
SMTP_PORT=1025
SMTP_USER=
SMTP_PASSWORD=
SMTP_USE_TLS=false
# ─── OAuth (FEATURE_OAUTH=true) ───────────────────────────────────────────
OAUTH_GOOGLE_CLIENT_ID=
OAUTH_GOOGLE_CLIENT_SECRET=
OAUTH_GITHUB_CLIENT_ID=
OAUTH_GITHUB_CLIENT_SECRET=
# ─── Magic-link (FEATURE_MAGIC_LINK=true) ─────────────────────────────────
MAGIC_LINK_TTL_MINUTES=15
# ─── Stripe (FEATURE_STRIPE=true) ─────────────────────────────────────────
STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_PRICE_FREE=price_free
STRIPE_PRICE_PRO=price_pro
STRIPE_PRICE_ENTERPRISE=price_enterprise
# ─── AI (FEATURE_AI_CHAT=true) ────────────────────────────────────────────
# Defaults point at the public LLM Gateway (https://llmgateway.io). Sign up,
# create an API key at https://llmgateway.io, paste it below.
LLM_GATEWAY_URL=https://api.llmgateway.io/v1
LLM_GATEWAY_API_KEY=
AI_DEFAULT_MODEL=gpt-5-mini
AI_MONTHLY_TOKEN_QUOTA=1000000
# ─── Logfire (FEATURE_LOGFIRE=true) ───────────────────────────────────────
LOGFIRE_TOKEN=
LOGFIRE_ENVIRONMENT=development
# ─── Rate limits (FEATURE_RATE_LIMITING=true) ─────────────────────────────
RATE_LIMIT_PER_IP_PER_MINUTE=60
RATE_LIMIT_PER_USER_PER_MINUTE=120
RATE_LIMIT_PER_ORG_PER_MINUTE=600
RATE_LIMIT_PER_API_KEY_PER_MINUTE=300
# =============================================================================
# Frontend / Admin (Next.js NEXT_PUBLIC_* exposed to browser)
# =============================================================================
NEXT_PUBLIC_API_BASE_URL=http://localhost:8000
# Docker-only: Next.js server rewrites use this service URL inside Compose.
INTERNAL_API_BASE_URL=http://backend:8000
NEXT_PUBLIC_APP_NAME=AI Template
NEXT_PUBLIC_FEATURE_OAUTH=false
NEXT_PUBLIC_FEATURE_MAGIC_LINK=false
NEXT_PUBLIC_FEATURE_AI_CHAT=false
NEXT_PUBLIC_FEATURE_STRIPE=false
NEXT_PUBLIC_FEATURE_API_KEYS=true
NEXT_PUBLIC_FEATURE_AUDIT_LOG=true
# ─── First super-admin bootstrap (optional; used by CLI/Compose) ──────────
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=password123@
ADMIN_FULL_NAME=ai-admin