AirGuide reads all runtime configuration from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/luiss811/Backend-Airguide/llms.txt
Use this file to discover all available pages before exploring further.
.env file at the project root. Before starting any service you must create this file and supply values for each variable. The sections below explain what every variable does so you can configure the backend correctly for your environment.
Complete .env template
Copy the template below into a new.env file at the root of the repository and replace the placeholder values with your own.
Variable reference
Database
Database
DATABASE_URL
The PostgreSQL connection string used by Prisma to connect to your database. The format is:.db.prisma.io. For a local database, use localhost:5432 and omit sslmode=require.This variable is read directly by Prisma at both migration time and runtime — every service that queries the database uses this value.Application
Application
API_URL
The public base URL of the API Gateway, including the /api path prefix. The frontend uses this value to construct request URLs.- Development:
http://localhost:3001/api - Production: the public URL of your deployed gateway, e.g.
https://api.yourdomain.com/api
API_KEY / GOOGLE_ROUTES_API_KEY
A Google API key used by the Navigation Service to call the Google Routes API for live walking directions. You can generate one in the Google Cloud Console. Enable the Routes API for the key.The navigation service reads this value from GOOGLE_ROUTES_API_KEY at runtime. Set both variables to the same key value to ensure compatibility:NODE_ENV
Controls runtime behavior across all services. Accepted values are development and production.- In
development, services log verbose output and Prisma runs in dev mode. - In
production, optimized builds run fromdist/and error details are suppressed from API responses.
JWT
JWT
JWT_SECRET
The secret key used to sign and verify JSON Web Tokens. All six services share this value — a token signed by the Auth Service is verified by the Gateway and any downstream service that needs it.Use a long, random string (at least 32 characters). You can generate one with:JWT_EXPIRES_IN
How long an issued JWT remains valid. Uses the ms format: 1d (one day), 8h (eight hours), 30m (thirty minutes). After expiry the client must re-authenticate.CORS
CORS
CORS_ORIGIN
The origin that the API Gateway allows for cross-origin requests. Set this to the URL of your frontend application.- Development:
http://localhost:5173(Vite default) - Production: your deployed frontend domain, e.g.
https://app.yourdomain.com
src/gateway/index.ts.Email (SMTP)
Email (SMTP)
SMTP_HOST
Hostname of your SMTP server. The default template uses smtp.gmail.com for Gmail.SMTP_PORT
Port used by the SMTP server. Common values:| Port | Protocol |
|---|---|
587 | STARTTLS (recommended) |
465 | SSL/TLS |
25 | Unencrypted (not recommended) |
SMTP_SECURE
Set to "true" when using port 465 (direct TLS). Set to "false" when using port 587 with STARTTLS. The Auth Service passes this value to Nodemailer’s secure option.SMTP_USER
The email address used to authenticate with the SMTP server. For Gmail this is your full Gmail address.SMTP_PASS
The password for authenticating with the SMTP server. For Gmail accounts with two-factor authentication enabled, use an App Password rather than your account password.SMTP_FROM
The sender display name and address that appears in OTP emails. Use the format Name <address@domain.com>, for example: