This guide walks you through cloning HealtyHelp, wiring up all required services, and reaching a fully working local instance with an admin account ready to use.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanSebasSV/healtyhelp/llms.txt
Use this file to discover all available pages before exploring further.
The Express server enforces two rate-limit tiers in production: 500 requests per 15 minutes for all
/api/* routes, and a stricter 20 requests per 15 minutes specifically on /api/auth/login. In development mode the login limit is relaxed to 200 requests per 15 minutes. Keep this in mind when running automated tests or scripts against the local server.Prerequisites
Make sure the following are available on your machine before you begin:
| Requirement | Notes |
|---|---|
| Node.js 18+ | Required by both client and server. Check with node -v. |
| MongoDB | MongoDB Atlas free tier works out of the box, or run a local mongod instance. |
| Groq API key | Register at console.groq.com and create a key. Used to power NutriBot with LLaMA 3.3 70B. |
| Google OAuth credentials (optional) | Required only if you want Google Sign-In. Create an OAuth 2.0 client in the Google Cloud Console. |
| Cloudinary account (optional) | Required only if you want image upload and moderation for recipe reviews. Register at cloudinary.com. |
| Resend account (optional) | Required for password-reset emails and admin invitation emails. Register at resend.com and create an API key. |
Install Server Dependencies
server/package.json.Install Client Dependencies
Configure Server Environment Variables
Create a Variable reference:
.env file in the server/ directory. The table below covers every variable the server reads:| Variable | Required | Description |
|---|---|---|
MONGO_URI | ✅ | MongoDB connection string. Atlas or local (mongodb://localhost:27017/healtyhelp). |
JWT_SECRET | ✅ | Secret key used to sign and verify JWTs. Use a random string of at least 32 characters. |
JWT_EXPIRE | ✅ | Token lifetime passed to jsonwebtoken (e.g. 7d, 24h). |
GROQ_API_KEY | ✅ | API key from console.groq.com. Enables NutriBot. |
FRONTEND_URL | ✅ | Origin allowed by the CORS policy. Must match exactly where the Vite dev server runs. |
BACKEND_URL | ✅ | Full URL of the Express server. Used by Passport as the Google OAuth callback base. |
PORT | ✅ | Port the Express server listens on. Defaults to 5000 if unset. |
GOOGLE_CLIENT_ID | Optional | Google OAuth 2.0 client ID. Required for Google Sign-In. |
GOOGLE_CLIENT_SECRET | Optional | Google OAuth 2.0 client secret. Required for Google Sign-In. |
CLOUDINARY_CLOUD_NAME | Optional | Cloudinary cloud name for image uploads. |
CLOUDINARY_API_KEY | Optional | Cloudinary API key. |
CLOUDINARY_API_SECRET | Optional | Cloudinary API secret. |
RESEND_API_KEY | Optional | API key from resend.com. Required for password-reset and admin invitation emails. |
EMAIL_FROM | Optional | Sender address used in all outgoing emails (e.g. noreply@yourdomain.com). |
CONTACT_EMAIL | Optional | Destination address for contact-form submissions. Falls back to healtyhelp@gmail.com if unset. |
SUPER_ADMIN_EMAIL | Optional | Email for the initial super-admin account (used by initSuperAdmin.js). |
SUPER_ADMIN_PASSWORD | Optional | Password for the initial super-admin account. Change immediately after first login. |
SUPER_ADMIN_NAME | Optional | Display name for the initial super-admin account. |
NODE_ENV | Optional | Set to production to enable strict rate limiting (20 login attempts/15 min). |
Configure Client Environment Variables
Create a
.env file in the client/ directory:VITE_API_URL is the base URL that Axios uses for every API request. It must point to the running Express server. The variable is prefixed with VITE_ so that Vite exposes it to the browser bundle at build time via import.meta.env.VITE_API_URL.Start the Server
From the This runs The server also seeds the Terms & Conditions collection on first run if it is empty.
server/ directory:nodemon server.js, which watches for file changes and auto-restarts. On startup you should see:Start the Client
In a separate terminal, from the Vite starts the development server and prints a local URL:
client/ directory:Initialize the Super-Admin Account
Before you can access the admin panel, run the bootstrap script from the Expected output:If you run the script a second time it exits safely without creating a duplicate:
server/ directory. The script loads server/.env via dotenv and must be executed with server/ as the working directory so that dotenv can locate the .env file. It reads SUPER_ADMIN_EMAIL, SUPER_ADMIN_NAME, and SUPER_ADMIN_PASSWORD from your .env and creates a user with role: 'admin' and isSuperAdmin: true:Open the App and Log In
Navigate to http://localhost:5173 in your browser.
- Regular users can register via
/registroor sign in with Google. - Admin login: go to
/loginand use the super-admin credentials you set inserver/.env. - After login, the admin panel is available at
/admin.
What’s Next?
Architecture
Understand how the React frontend, Express API, MongoDB models, and third-party integrations are structured.
API Reference
Explore the complete set of REST endpoints for auth, recipes, consumos, chat, and admin operations.