Service manager for node.js ecosystem and local development, suited for microservices architecture.
- Service management
- support for monorepos and multirepos
- running standard tasks
- running npm commands
- Monitoring
- CPU usage
- RAM usage
- Logs
- Npm
- npm audit dashboard
- npm audit auto fix
- Git
- clone
- reset changes
- create merge request (gitlab only)
- clone this repo
- run
npm i - run
cp .env.example .env(optional edit file) - edit file
./config.example.json npm start- open http://localhost:5173/
The project is configured via a single JSON file. To use the file, specify
its location in the SERVICE_MANAGER_CONFIG_FILE environment variable when
starting the server.
The file has the following format:
{
"services_directory": "../_services",
"git_interval": 5,
"services": [
{
"name": "STANDARD_SERVICE",
"npmRunLifecycle": "dev",
"gitUrl": "gitlab.com/organization/repository",
"port": 3000,
"appUrlSuffix": "api-docs",
"color": "teal-9",
"packageManager": "npm",
"genericTasks": [
"COPY_ENV"
],
"tasks": [
{
"name": "COPY_ENV_PROD",
"command": "cp .env.prod .env",
"color": "red-1",
"runIfNotCloned": false,
"icon": "priority_high"
}
],
"defaultGitBranch": "develop"
},
{
"name": "MONOREPO_ROOT",
"gitUrl": "gitlab.com/organization/monorepo",
"defaultGitBranch": "main",
"packageManager": "npm",
"npmRunLifecycle": "start",
"subservices": [
{
"name": "SUB_SERVICE_1",
"path": "apps/sub-service-1",
"port": 4200,
"npmRunLifecycle": "dev",
"color": "blue-7",
"genericTasks": [
"COPY_ENV"
]
},
{
"name": "SUB_SERVICE_2",
"path": "packages/sub-service-2",
"port": 4201,
"npmRunLifecycle": "dev",
"color": "orange-6"
}
]
}
],
"generic_tasks": [
{
"name": "COPY_ENV",
"command": "cp .env.example .env",
"color": "red-1",
"runIfNotCloned": false,
"runIfRunStatusIs": [ "STOPPED" ],
"icon": "file_copy"
},
{
"name": "PRINT_NAME",
"command": "echo \"Hello, I am %{service}\"",
"color": "red-1",
"runIfNotCloned": false,
"icon": "person"
}
]
}Services consist of the following configuration options
name- the name shown in the frontendnpmRunLifecycle- the run lifecycle to use withSTART_SERVICEtaskgitUrl- URL to the git repositoryport- port the service usesappUrlSuffix- added to app URL in frontendcolor- service's color in FE, see https://quasar.dev/style/color-palettepackageManager- package manager used by the service (npm,pnpm, oryarn)genericTasks- names of generic tasks to use, these are defined in the generic tasks section (optional)tasks- list of tasks defined for the service (optional)defaultGitBranch- branch to checkout with GIT_CHECKOUT command when no branch is provided via an attributesubservices- list of subservices in a monorepo (optional)path- relative path to the subservice within the monorepo root (required for subservices)
STOPPED- service is stopped and not runningPENDING- service is pending afterSTART_SERVICEtask activation, waiting for connection toportdefined at configRUNNING- service is running, Service Manager successfully connected toportdefined in config
Tasks consist of the following configuration options
name- name of the taskcommand- task commandcolor- currently unused (optional), see https://quasar.dev/style/color-paletterunIfNotCloned- whether the task can be run when the repository isn't clonedrunIfRunStatusIs- list of run states when the task can be performed (optional, if not specified, all run states are assumed), the possible states areRUNNING,PENDING,STOPPEDicon- icon displayed next to the task name (icon names are from the "Material Symbols and Icons" set)
GIT_CLONE- clones repo toservices_directorydirectoryREMOVE_SERVERI- deletes service from filesystem,⚠️ un-pushed changes wil be lost⚠️ INSTALL- runsnpm iorpnpm ioryarn installSTART_SERVICE- runsnpm run ${npmRunLifecycle}, see service configurationSTOP_SERVER- kills process created bySTART_SERVICE
Same as regular tasks, but can be used in multiple services via the genericTasks configuration
services_directory- path to the directory where git repositories will be storedgit_interval- how often (in seconds)git fetchis called for each repository after it is cloned (used to indicate new commits in the upstream) (0 = never)
You can specify multiple special sequences that will be replaced based on the operating system and service. These sequences include
%{rm}- delete command for the operating system%{npmCommand}- NPM command for the operating system%{pnpmCommand}- PNPM command for the operating system%{yarnCommand}- YARN command for the operating system%{packageManagerCommand}- Package manager command for the operating system (uses packaged manager defined in service config or default NPM)%{service}- service name%{ROOT_DIR}- monorepo root directory path
if something goes wrong
- refresh page
- kill (CTRL+C) and rerun
npm start, its kills all nested processes




