Skip to main content

Local Runtime Matrix

This page turns the current repository configs into a practical local-runtime reference.

Config files to prepare

Project typeFiles to check
Portalintt-portal/.env, intt-portal/src/environments/environment.staging.ts
Mobileintt-mobile/lib/shared/config.dart, VS Code launch configs, --dart-define values
API services.env.example copied to .env
Queue services.env.sample copied to .env

Common backend env groups

Most NestJS services expect these groups:

  • PORT
  • MariaDB: DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_DATABASE
  • JWT: TOKEN_EXPIRED_PER_SECONDS, JWT_ISSUER, JWT_ALGORITHM
  • Redis: REDIS_HOST, REDIS_PORT, REDIS_PASS
  • RabbitMQ: RABBITMQ_HOST, RABBITMQ_PORT, RABBITMQ_USER, RABBITMQ_PASS

Additional env groups appear in specific services:

  • replica DB: DB_REPLICA_*
  • socket integration: CAMELIA_SOCKET_BASE_URI
  • GSB external integrations: ALU_*, FIBERHOME_*, ZTE_*, HUAWEI_*, NIG_URL, TMFORCE_URL, APIM_URL, APIM_KEY, APIM_SECRET
  • portal keys: PUBLIC_KEY, PRIVATE_KEY, SECRET_KEY, CLIENT_SECRET_STG, CLIENT_ID_STG, VOC_TOKEN, OIP_*
  • mobile runtime selection: APP_ENV, IS_ONLINE

Default local ports

These are the fallback ports from src/main.ts when PORT is not set:

ServiceDefault portDocs endpoint
mvp1-authentication-service3001/auth/docs
mvp1-setting-service3002/setting/docs
mvp2-data-service3003/data/docs
mvp3-gsb-service3000/gsb/docs
mvp3-ticket-service3004/ticket/docs
mvp3-ngoss-service3004/ngoss/docs
mvp3-nocpro-service3004/nocpro/docs
mvp3-tmf-service3004/tmf/docs
mvp6-vital-service3004/vital/docs
mvp3-nocgrid-service3009/nocgrid/docs

Important note:

  • several services share default port 3004
  • if you run ticket, ngoss, nocpro, tmf, or vital together, set custom PORT values in their local .env files

Queue workers and queues

Queue workers connect to RabbitMQ on port 5672 and subscribe to these queues:

ServiceQueue or queues
mvp3-caution-report-queue-serviceintt_caution_report_queue
mvp3-ctt-queue-serviceintt_ctt_queue
mvp3-gsb-queue-serviceintt_gsb_queue
mvp3-kci-queue-serviceintt_kci_queue
mvp6-tass-queue-serviceintt_tass_queue
mvp6-vital-queue-serviceintt_vital_queue
mvp3-changedp-queue-serviceintt_alu_queue, intt_zte_queue, intt_fiberhome_queue, intt_huawei_queue

Infra dependencies by layer

LayerMain dependencies
Portalbrowser, .env, staging API access
MobileFlutter SDK, device or emulator, config.dart, API access
Core APIsMariaDB, Redis, JWT config
Integration-heavy APIsMariaDB, Redis, RabbitMQ, external APIs or sockets
Queue workersRabbitMQ, DB access, vendor or integration credentials

Network access note

TM VPN access may be required before local development can reach:

  • staging API endpoints
  • internal database hosts
  • Redis or RabbitMQ hosts outside your machine
  • vendor or internal integration endpoints

Which services to run for which module

These are the best current working assumptions from repo names, module folders, queue bindings, and environment templates.

WorkstreamMinimum likely stack
Login and shell accessmvp1-authentication-service is the only required minimum backend
Dashboard and reportsauth plus mvp2-data-service when the feature needs data-service APIs
Ticket, NTT, CTT, CR pagesauth plus mvp3-ticket-service when the feature needs ticket APIs
GSB portal flowauth plus mvp3-gsb-service
GSB async command executionauth, mvp3-gsb-service, mvp3-gsb-queue-service, mvp3-changedp-queue-service, RabbitMQ
NGOSS flowauth plus mvp3-ngoss-service
NOC Grid flowauth plus mvp3-nocgrid-service
NOCPro flowauth plus mvp3-nocpro-service
TMF flowauth plus mvp3-tmf-service
Vital flowauth plus mvp6-vital-service, and mvp6-vital-queue-service if async processing is involved
Mobile field flowauth plus whichever domain API the mobile module is calling

Frontend team workflow note

The frontend team currently does not usually clone and run all backend repos locally.

Typical frontend workflow is:

  1. clone only intt-portal
  2. run pnpm run start:stg
  3. inspect staging Swagger docs for endpoint details
  4. build against staging-backed APIs
  5. send QA to https://intt-stg.tm.com.my/

Local startup checklist

  1. Prepare .env or .env.sample or .env.example for the services you need.
  2. Confirm MariaDB, Redis, and RabbitMQ are reachable.
  3. Resolve PORT conflicts before starting multiple 3004 services.
  4. Start authentication service first.
  5. Start the domain API you are working on.
  6. Start queue workers only if the feature needs async processing.
  7. Start intt-portal with pnpm run start:stg or run intt-mobile with the correct APP_ENV.