Skip to main content

Setting Service

Purpose

mvp1-setting-service is the backend service responsible for application settings and configuration-related functions.

Local runtime facts

  • default local port: 3002
  • swagger docs: /setting/docs
  • metrics endpoint: /setting/metrics
  • env template: .env.example

Owned modules

  • area-data
  • area-group
  • area-layer
  • audit-log
  • configuration-management
  • lov-management
  • mcmc
  • module-management
  • notifications-management
  • redis
  • role
  • user
  • workgroup-management

Dependencies

  • MariaDB
  • Redis
  • RabbitMQ credentials are part of the template
  • JWT configuration

Required config groups

  • PORT
  • DB_*
  • TOKEN_EXPIRED_PER_SECONDS, JWT_ISSUER, JWT_ALGORITHM
  • REDIS_*
  • RABBITMQ_*

Upstream and downstream

  • upstream callers: portal, mobile, backend services that need shared settings or user-related configuration
  • downstream systems: MariaDB and Redis

Local commands

Install:

git submodule update --init --recursive
cd share-entity
git checkout development
cd ..
pnpm install

Run locally:

pnpm run start:dev

Build and run production mode:

pnpm run build
pnpm run start:prod

Test:

pnpm run test
pnpm run test:e2e
pnpm run test:cov

Local testing

  • unit tests: pnpm run test
  • e2e tests: pnpm run test:e2e
  • coverage: pnpm run test:cov