Skip to main content

Ticket Service

Purpose

mvp3-ticket-service is the backend service for ticket module workflows.

Local runtime facts

  • default local port: 3004
  • swagger docs: /ticket/docs
  • metrics endpoint: /ticket/metrics
  • env files present: .env, .env.example

Owned modules

  • attachment
  • audit-log
  • caution-report
  • ctt
  • dashboard
  • excel
  • field-team-location
  • inventory
  • kci
  • mail
  • mcmc
  • neps
  • notifications
  • ntt
  • redis
  • report
  • socket
  • tmforce
  • verification

Dependencies

  • MariaDB
  • MariaDB replica
  • Redis
  • RabbitMQ credentials are part of the template
  • CAMELIA_SOCKET_BASE_URI
  • mail, socket, inventory, and reporting modules are wired in app module
  • shared storage volume appears in docker-compose.yml

Required config groups

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

Upstream and downstream

  • upstream callers: portal ticket, CTT, CR, KCI, dashboard, and reporting flows
  • downstream systems: MariaDB, replica DB, Redis, sockets, mail, inventory, report generation

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