Skip to content

GIroSTarK/EcoRent

Repository files navigation

EcoRent

EcoRent is a monorepo for a portable power station rental platform. The project combines:

  • apps/web: React + TypeScript frontend
  • apps/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.

Project screenshot

Repository structure

.
|- apps/
|  |- backend/   # Express API
|  |- web/       # React client
|- packages/     # Shared packages for the monorepo
|- package.json  # Root scripts
|- pnpm-workspace.yaml
`- turbo.json

Prerequisites

  • Node.js 24.x
  • pnpm 10.x

If you do not have pnpm installed yet:

npm install -g pnpm

Setup

Install dependencies once from the repository root:

pnpm install

Create local environment files:

cp apps/web/.env.example apps/web/.env
cp apps/backend/.env.example apps/backend/.env

Environment variables

Frontend

apps/web/.env

  • VITE_API_URL: backend base URL, defaults to http://localhost:3000

Backend

apps/backend/.env

  • NODE_ENV: use development for local work
  • PORT: API port, default 3000
  • JWT_SECRET: JWT signing secret
  • MONGO_URI: MongoDB connection string
  • CORS_ORIGINS: allowed frontend origins
  • RATE_LIMIT_MAX: request limit
  • MOCK_S3: keep true for local development
  • AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, S3_BUCKET: required when MOCK_S3=false

Running the project

Run both applications from the repository root:

pnpm dev

Run a single app if needed:

pnpm dev:web
pnpm dev:backend

Default local URLs:

  • Frontend: http://localhost:5173
  • Backend: http://localhost:3000

Useful scripts

From the repository root:

pnpm build
pnpm lint
pnpm lint:fix
pnpm typecheck
pnpm test:backend
pnpm test:api
pnpm test:e2e

What they do:

  • pnpm test:backend: backend unit tests
  • pnpm test:api: backend integration tests with Newman
  • pnpm 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages