The Debuta backend is configured entirely through environment variables loaded from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/desarrolladorandres2026-gif/Native-tailwind/llms.txt
Use this file to discover all available pages before exploring further.
.env file at startup using dotenv. Copy .env.example to .env and fill in your own values before starting the server. The sections below document every variable, its purpose, and its expected format.
Server
The TCP port the HTTP server listens on. Both Express and Socket.io share this port. Change it if
3000 is already in use on your machine.Runtime environment. Accepted values are
development and production.- In
development, CORS is fully open — all origins are allowed for both HTTP requests and Socket.io connections. - In
production, only origins listed inALLOWED_ORIGINSare permitted. Any other origin receives a CORS error.
Database
Full MongoDB connection string. For MongoDB Atlas it follows the The server uses a linear backoff retry loop (up to 5 attempts: 3 s, 6 s, 9 s, 12 s, 15 s) when the initial connection fails, so transient DNS or network issues at startup are handled gracefully.
mongodb+srv:// format:Security
The secret key used to sign and verify all JSON Web Tokens — both for HTTP API routes and Socket.io handshakes. In production this must be a long, randomly generated string (at least 32 characters). You can generate one with:
Controls how long issued tokens remain valid. Uses the ms / jsonwebtoken duration format — for example
7d, 24h, 30m. After expiry the client must log in again to obtain a fresh token.Comma-separated list of origins that are allowed to make requests when This value is consumed by both the Express CORS middleware and the Socket.io CORS configuration. Leave it empty in development — all origins are permitted when
NODE_ENV=production. No spaces between values. Example:NODE_ENV=development.Cloudinary
Cloudinary is used for all photo storage: profile pictures, gallery photos, cover photos, and post images. Images are uploaded as buffers (via MultermemoryStorage) or as base64 strings depending on the endpoint.
Your Cloudinary cloud name. Found on the Cloudinary dashboard under Account Details.
Your Cloudinary API key. Found in the same dashboard section alongside the cloud name.
Your Cloudinary API secret. Treat this like a password — it authorises destructive operations such as image deletion.
src/helpers/cloudinary.js on startup:
The Gmail address that sends outbound emails. Example:
noreply@debuta.app.The Gmail app password for
EMAIL_USER — not the regular Gmail account password.Admin Panel
These variables configure the initial admin account that is seeded into the database on first run.Email address of the default admin account. Example:
admin@debuta.com.Username of the default admin account. Example:
admin.Social OAuth
OAuth 2.0 client ID from the Google Cloud Console. Required for Google Sign-In via the
google-auth-library. Ends in .apps.googleusercontent.com.App ID from the Meta for Developers dashboard. Required for Facebook Login.
App secret from the same Meta dashboard. Used server-side to verify Facebook access tokens. Treat this like a password.
Atlas Admin API (Optional)
These three variables are only needed for thescripts/auto-whitelist.js helper, which automatically adds the server’s current public IP to the MongoDB Atlas IP Access List. This is useful for dynamic-IP environments (local development, ephemeral cloud VMs). If left empty, the whitelist script exits silently and the server starts normally.
Public key for the MongoDB Atlas Programmatic API. Generated in the Atlas UI under Access Manager → API Keys.
Corresponding private key for the Atlas Programmatic API.
The MongoDB Atlas Project ID (also called Group ID). Found in the Atlas UI under Project Settings.