How fathma/distributed-payment-platform works
PayFlow is currently a NestJS service scaffold: the user-visible workflow is limited to health and readiness checks, not order creation or payment processing. Each service boots its own module; readiness controllers call health services that probe their configured dependencies. The README describes PostgreSQL, Redis, Kafka, and observability infrastructure, but the supplied excerpts do not show business routes, event processing, or monitoring wiring. The graph therefore reflects the implemented health workflow and its evidenced probes, not the planned payment lifecycle.
Main entry points: index.ts Configuration · src/health.service.ts Order health checks · src/health.service.ts Payment health checks · src/health.service.ts Gateway health checks
Components 22
NestJS services
- Gateway bootstrap
apps/api-gateway/src/main.ts - Gateway module
apps/api-gateway/src/app.module.ts - Gateway health routes
apps/api-gateway/src/health.controller.ts - Gateway health checks
apps/api-gateway/src/health.service.ts - Order bootstrap
apps/order-service/src/main.ts - Order module
apps/order-service/src/app.module.ts - Order health routes
apps/order-service/src/health.controller.ts - Order health checks
apps/order-service/src/health.service.ts - Payment bootstrap
apps/payment-service/src/main.ts - Payment module
apps/payment-service/src/app.module.ts - Payment health routes
apps/payment-service/src/health.controller.ts - Payment health checks
apps/payment-service/src/health.service.ts - Worker bootstrap
apps/payment-worker/src/main.ts - Worker module
apps/payment-worker/src/app.module.ts - Worker health routes
apps/payment-worker/src/health.controller.ts - Worker health checks
apps/payment-worker/src/health.service.ts
Shared runtime
- Configuration
packages/config/src/index.ts
Runtime dependencies
- Redis
- Order PostgreSQL
- Payment PostgreSQL
- Kafka cluster
Other components
- Health caller
Connections 34
- Gateway bootstrap → Gateway module: starts
apps/api-gateway/src/main.ts - Gateway bootstrap → Configuration: loads config
apps/api-gateway/src/main.ts - Gateway module → Gateway health routes: registers
apps/api-gateway/src/app.module.ts - Gateway module → Gateway health checks: registers
apps/api-gateway/src/app.module.ts - Health caller → Gateway health routes: requests health
apps/api-gateway/src/health.controller.ts - Gateway health routes → Gateway health checks: checks readiness
apps/api-gateway/src/health.controller.ts - Gateway health checks → Configuration: loads config
apps/api-gateway/src/health.service.ts - Gateway health checks → Redis: pings
apps/api-gateway/src/health.service.ts - Order bootstrap → Order module: starts
apps/order-service/src/main.ts - Order bootstrap → Configuration: loads config
apps/order-service/src/main.ts - Order module → Order health routes: registers
apps/order-service/src/app.module.ts - Order module → Order health checks: registers
apps/order-service/src/app.module.ts - Health caller → Order health routes: requests health
apps/order-service/src/health.controller.ts - Order health routes → Order health checks: checks readiness
apps/order-service/src/health.controller.ts - Order health checks → Configuration: loads config
apps/order-service/src/health.service.ts - Order health checks → Order PostgreSQL: probes
apps/order-service/src/health.service.ts - Order health checks → Kafka cluster: checks cluster
apps/order-service/src/health.service.ts - Payment bootstrap → Payment module: starts
apps/payment-service/src/main.ts - Payment bootstrap → Configuration: loads config
apps/payment-service/src/main.ts - Payment module → Payment health routes: registers
apps/payment-service/src/app.module.ts - Payment module → Payment health checks: registers
apps/payment-service/src/app.module.ts - Health caller → Payment health routes: requests health
apps/payment-service/src/health.controller.ts - Payment health routes → Payment health checks: checks readiness
apps/payment-service/src/health.controller.ts - Payment health checks → Configuration: loads config
apps/payment-service/src/health.service.ts - Payment health checks → Payment PostgreSQL: probes
apps/payment-service/src/health.service.ts - Payment health checks → Kafka cluster: checks cluster
apps/payment-service/src/health.service.ts - Worker bootstrap → Worker module: starts
apps/payment-worker/src/main.ts - Worker bootstrap → Configuration: loads config
apps/payment-worker/src/main.ts - Worker module → Worker health routes: registers
apps/payment-worker/src/app.module.ts - Worker module → Worker health checks: registers
apps/payment-worker/src/app.module.ts - Health caller → Worker health routes: requests health
apps/payment-worker/src/health.controller.ts - Worker health routes → Worker health checks: checks readiness
apps/payment-worker/src/health.controller.ts - Worker health checks → Configuration: loads config
apps/payment-worker/src/health.service.ts - Worker health checks → Kafka cluster: checks cluster
apps/payment-worker/src/health.service.ts