The Node.js backend reads all runtime configuration from environment variables using theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Sufianeh7/AmigoInvisible/llms.txt
Use this file to discover all available pages before exploring further.
dotenv package, which is loaded at the very top of index.js via require('dotenv').config(). The Angular frontend does not use any environment variables — every configuration value it needs (such as the backend API URL) is set directly in the source code at build time.
Variable Reference
MongoDB connection string used by Mongoose to connect to your database. This must point to a MongoDB Atlas cluster or a local MongoDB instance.Example:
The Gmail address used as the SMTP sender when dispatching Secret Santa assignment emails via Nodemailer.Example:
A Gmail App Password — this is not your regular Google account password. It must be generated separately from your Google Account security settings. See the Gmail App Password section below for instructions.Example:
The HTTP port the Express server listens on when running locally. In Vercel’s serverless environment this variable is ignored — Vercel handles all routing and port binding automatically.Example:
Controls whether the Express HTTP server listener is started. When set to
production, the app.listen() call in index.js is skipped entirely, because Vercel exports the app object directly as a serverless function handler. Leave this unset for local development so the server starts normally.Example:Local .env File
For local development, create a.env file inside the Node/ directory. The dotenv package reads this file automatically when the server starts.
Node/.env
MongoDB Setup
You have two options for running MongoDB: MongoDB Atlas (recommended) — Atlas is a fully managed cloud database with a free tier that is more than sufficient for personal Secret Santa groups. Sign up at mongodb.com/atlas, create a free cluster, and generate a connection string from the Connect dialog. The connection string follows this format:MONGO_URI to:
Gmail App Password
Gmail’s SMTP server rejects standard account passwords when used by third-party apps. You must generate a dedicated App Password instead. To do this:- Go to your Google Account at myaccount.google.com.
- Navigate to Security.
- Under How you sign in to Google, open 2-Step Verification (it must be enabled before App Passwords are available).
- Scroll to the bottom and select App Passwords.
- Choose a name for the app (e.g.
Amigo Invisible) and click Create. - Copy the 16-character password that appears and paste it as the value of
EMAIL_PASSin your.envfile.