This guide walks you through everything you need to get a fully functional Eco-It development environment running on your local machine. By the end you will have the Express backend listening on port 3000, the Vite dev server on port 5173, a live connection to MongoDB, and all third-party integrations (Cloudinary, OpenRouter, Google OAuth) ready to use.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vanegasjoseignacio2-cyber/Eco-It/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Make sure the following tools are installed and available on your
Verify your versions before continuing:
PATH before proceeding:| Requirement | Minimum version | Notes |
|---|---|---|
| Node.js | 18.x | LTS recommended; required by both workspaces |
| pnpm | 10.x | The repo is pinned to pnpm — do not use npm or yarn |
| MongoDB | 6.x | Local instance or a free MongoDB Atlas cluster |
| Cloudinary account | — | Free tier is sufficient for development |
| OpenRouter API key | — | Register at openrouter.ai to access Gemini models |
| Google OAuth credentials | — | Create a project in Google Cloud Console and enable the OAuth 2.0 API |
Clone the Repository
Clone the Eco-It monorepo from GitHub and move into the project root:The repository root contains two workspace packages (
backend/ and frontend/) alongside the root package.json and pnpm-workspace.yaml that ties them together.Install Dependencies
Run a single install command from the repository root. pnpm resolves dependencies for both the This also installs the root-level
backend and frontend workspaces in one pass:concurrently package that powers the unified pnpm dev script. You do not need to cd into each workspace separately.Configure Environment Variables
Eco-It requires two Frontend —
.env files — one for the backend and one for the frontend.Backend — backend/.envCreate the file and populate every variable shown below:frontend/.envThe Vite app only needs a single variable that points to the backend:Run in Development
Start both the backend and frontend with a single command from the repository root:Under the hood this runs Open http://localhost:5173 in your browser to access the Eco-It frontend.
concurrently "pnpm dev:backend" "pnpm dev:frontend", which maps to:- Backend —
nodemon index.jsinsidebackend/, hot-reloading on file changes, listening on http://localhost:3000 - Frontend —
viteinsidefrontend/, with HMR enabled, accessible at http://localhost:5173
Build for Production
To generate an optimized production bundle of the React frontend, run from the repository root:This executes This runs
vite build inside the frontend/ workspace and outputs static assets to frontend/dist/. The directory is ready to be deployed to any static hosting provider (Netlify, Vercel, S3, etc.).For the backend, start it in production mode with:node index.js (without nodemon) and reads the environment variables from backend/.env or from your hosting provider’s secrets manager.