This is the Harmoni, which houses both the frontend and backend applications as well as shared libraries using Lerna and pnpm for package management.
The project is organized into two main sections: apps/
for the frontend and backend applications, and libs/
for shared libraries.
/harmoni
│
├── apps/
│ ├── backend/ # Backend application (e.g., NestJS)
│ └── frontend/ # Frontend application (e.g., React or Electron)
│
├── libs/
│ └── shared/ # Shared libraries or utilities
│
├── pnpm-workspace.yaml # pnpm workspace configuration
├── lerna.json # Lerna configuration
└── package.json # Root package.json
This is the Harmoni, which houses both the frontend and backend applications as well as shared libraries using Lerna and pnpm for package management.
The project is organized into two main sections: apps/
for the frontend and backend applications, and libs/
for shared libraries.
-
pnpm: You must have pnpm installed globally. Install it using:
npm install -g pnpm
-
Lerna: Lerna is used for managing the monorepo. Add it to the project by running:
pnpm add -D lerna
After cloning the repository, run the following command to install all dependencies for the frontend, backend, and shared libraries:
pnpm install
-
Frontend: To start the frontend application, run:
pnpm --filter frontend run start
-
Backend: To start the backend application, run:
pnpm --filter backend run start
You can also run both applications concurrently using Lerna:
npx lerna run start
To lint the code and automatically fix issues, you can run the following:
pnpm run lint