Data Service
Purpose
mvp2-data-service is the backend service for dashboard, reporting, and analytics functions.
Local runtime facts
- default local port:
3003 - swagger docs:
/data/docs - metrics endpoint:
/data/metrics - env template:
.env.example
Owned modules
caution-reportnepsseederticket-history
Dependencies
- MariaDB
- Redis
- RabbitMQ credentials are part of the template
- JWT configuration
Required config groups
PORTDB_*TOKEN_EXPIRED_PER_SECONDS,JWT_ISSUER,JWT_ALGORITHMREDIS_*RABBITMQ_*
Upstream and downstream
- upstream callers: portal dashboards, reports, and analytics screens
- downstream systems: MariaDB, Redis, caution-report and ticket-history data sources
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