EcoRent is a monorepo for a portable power station rental platform. The project combines:
apps/web: React + TypeScript frontendapps/backend: Express + TypeScript API
The platform allows users to rent charging stations for short-term use and lets station owners list their devices to earn additional income.
.
|- apps/
| |- backend/ # Express API
| |- web/ # React client
|- packages/ # Shared packages for the monorepo
|- package.json # Root scripts
|- pnpm-workspace.yaml
`- turbo.json
- Node.js 24.x
- pnpm 10.x
If you do not have pnpm installed yet:
npm install -g pnpmInstall dependencies once from the repository root:
pnpm installCreate local environment files:
cp apps/web/.env.example apps/web/.env
cp apps/backend/.env.example apps/backend/.envapps/web/.env
VITE_API_URL: backend base URL, defaults tohttp://localhost:3000
apps/backend/.env
NODE_ENV: usedevelopmentfor local workPORT: API port, default3000JWT_SECRET: JWT signing secretMONGO_URI: MongoDB connection stringCORS_ORIGINS: allowed frontend originsRATE_LIMIT_MAX: request limitMOCK_S3: keeptruefor local developmentAWS_REGION,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,S3_BUCKET: required whenMOCK_S3=false
Run both applications from the repository root:
pnpm devRun a single app if needed:
pnpm dev:web
pnpm dev:backendDefault local URLs:
- Frontend:
http://localhost:5173 - Backend:
http://localhost:3000
From the repository root:
pnpm build
pnpm lint
pnpm lint:fix
pnpm typecheck
pnpm test:backend
pnpm test:api
pnpm test:e2eWhat they do:
pnpm test:backend: backend unit testspnpm test:api: backend integration tests with Newmanpnpm test:e2e: frontend end-to-end tests with Playwright
pnpm test:e2e expects the backend to be available and the frontend app to be runnable.
