forked from Teclia-Academy/Teclia-Academy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
168 lines (123 loc) · 5.68 KB
/
Copy path.env.example
File metadata and controls
168 lines (123 loc) · 5.68 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Backend environment variables example
# Copy this file to Backend/.env (or to Backend/.env.local) and fill values.
# Port the backend listens on (default 3001)
PORT=3001
# Database configuration
# - If set, the app will attempt to connect to Postgres using this URL.
# - Format: postgres://user:password@host:port/database
# - If unset, the backend will use a local SQLite file (default behavior).
DATABASE_URL=
# If you prefer controlling SQLite file location, set DATABASE_PATH or DATABASE_DIR
# Example: DATABASE_PATH=./data/teclia.db
DATABASE_PATH=
DATABASE_DIR=
# JWT secret used to sign tokens. In production, set a strong random value.
JWT_SECRET=replace_with_a_secure_random_value
# Supabase configuration (optional, required for Supabase storage)
SUPABASE_URL=
SUPABASE_SERVICE_KEY=
# Optional: public anon key if the frontend interacts directly with Supabase (not required server-side)
SUPABASE_ANON_KEY=
SUPABASE_BUCKET=uploads
# SendGrid API key (used for password reset emails). Leave empty if you don't use email sending locally.
SENDGRID_API_KEY=
# Frontend configuration — API base URL used by the frontend to reach the backend
# Example: http://localhost:3001
FRONTEND_API_URL=http://localhost:3001
# Storage settings
# If using a storage provider other than Supabase, include connection details here.
# Notes:
# - Do NOT commit real secrets to source control. Use this example as a template only.# ============================================================================
# TECLIA ACADEMIA - ENVIRONMENT VARIABLES TEMPLATE
# ============================================================================
# Copy this file to .env and fill in your own values
# NEVER commit .env to version control!
#
# Documentation: See ENVIRONMENT_SETUP.md for detailed instructions
# ============================================================================
# ============================================================================
# BACKEND CONFIGURATION
# ============================================================================
# Server port
PORT=3001
# Node environment
NODE_ENV=development
# JWT Secret for authentication tokens (CHANGE THIS IN PRODUCTION!)
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
# ============================================================================
# DATABASE CONFIGURATION
# ============================================================================
# PostgreSQL Connection (if using PostgreSQL)
DATABASE_URL=postgresql://user:password@localhost:5432/teclia_db
# SQLite Path (if using SQLite for development)
SQLITE_DB_PATH=./data/teclia.db
# Database Type: 'postgres' or 'sqlite'
DB_TYPE=sqlite
# ============================================================================
# SUPABASE CONFIGURATION
# ============================================================================
# Supabase Project URL
SUPABASE_URL=https://your-project.supabase.co
# Supabase Anonymous Key
SUPABASE_ANON_KEY=your_supabase_anon_key
# Supabase Service Role Key (Backend only - KEEP PRIVATE!)
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# ============================================================================
# EMAIL CONFIGURATION
# ============================================================================
# SendGrid API Key for email notifications
SENDGRID_API_KEY=your_sendgrid_api_key
# Email sender address
EMAIL_FROM=noreply@teclia-academy.com
# Password reset email template ID (SendGrid)
PASSWORD_RESET_TEMPLATE_ID=d-your_template_id
# ============================================================================
# FILE UPLOADS
# ============================================================================
# Enable local filesystem uploads. When set to true, the app will use
# local files instead of Supabase storage.
# This has priority over Supabase storage.
LOCAL_UPLOADS=true
# Maximum upload size in MB
UPLOAD_MAX_SIZE_MB=10
# Allowed MIME types for uploaded files (comma-separated)
UPLOAD_ALLOWED_TYPES=image/jpeg,image/png,application/pdf
# Legacy values kept for compatibility
MAX_UPLOAD_SIZE=50
ALLOWED_AVATAR_TYPES=image/jpeg,image/png,image/webp
UPLOAD_DIR=./uploads
# ============================================================================
# FRONTEND CONFIGURATION
# ============================================================================
# Frontend base URL for CORS and redirects
VITE_API_BASE_URL=http://localhost:3001/api
# Frontend application name
VITE_APP_NAME=Teclia Academy
# ============================================================================
# SECURITY & CORS
# ============================================================================
# Allowed origins for CORS (comma-separated)
CORS_ORIGIN=http://localhost:5173,http://localhost:3000
# Session timeout in milliseconds
SESSION_TIMEOUT=3600000
# ============================================================================
# DEVELOPMENT & DEBUGGING
# ============================================================================
# Enable debug logging
DEBUG=teclia:*
# Enable detailed error messages (disable in production)
VERBOSE_ERRORS=true
# ============================================================================
# DEPLOYMENT & CI/CD
# ============================================================================
# GitHub Token for CI/CD workflows
GITHUB_TOKEN=your_github_token
# Deployment environment
DEPLOYMENT_ENV=development
# ============================================================================
# OPTIONAL: Third-party services
# ============================================================================
# Sentry DSN for error tracking (optional)
SENTRY_DSN=https://your-sentry-dsn@sentry.io/project-id
# Analytics ID (optional)
ANALYTICS_ID=your_analytics_id