How takio1981/korat-health-kpi works
KpiWeb is a KPI management and reporting application with an Angular frontend and an Express API backed by MySQL. Users authenticate, enter and manage KPI results, and view dashboards and reports; the API also supports reviews, exports, backups, and scheduled audit work. The graph preserves these major product areas, but some route and frontend-to-API connections are inferred from module names rather than shown in excerpts, so they are omitted. API route registration and several service relationships are evidenced by the source index or excerpts.
Main entry points: server.js API server · db.js Database pool · app.routes.ts Application routes · indicators.js Indicator routes
Components 22
Web application
- Application routes
frontend/src/app/app.routes.ts - Authentication UI
frontend/src/app/services/auth.ts - KPI dashboard
frontend/src/app/dashboard/dashboard.ts - KPI management
frontend/src/app/kpi-manage/kpi-manage.ts - Reports and charts
frontend/src/app/report/report.ts
API and access
- API server
api/server.js - API router
api/core/router.js - Authentication routes
api/routes/auth.js - Indicator routes
api/routes/indicators.js - KPI result routes
api/routes/kpi-results.js - Review and notifications
api/routes/review.js - Access control
api/core/access.js
KPI processing
- KPI summaries
api/services/summary.js - KPI hierarchy
api/services/hierarchy.js - Formula engine
api/kpi-formula.js
Operations
- KPI export
api/services/export.js - Backup service
api/services/backup.js - Scheduled jobs
api/jobs/export-scheduler.js - Notifications
api/core/notify.js - Database pool
api/db.js
Other components
- User
- MySQL database
Connections 37
- User → Application routes: uses
frontend/src/app/app.routes.ts - Application routes → Authentication UI: routes to
frontend/src/app/app.routes.ts - Application routes → KPI dashboard: routes to
frontend/src/app/app.routes.ts - Application routes → KPI management: routes to
frontend/src/app/app.routes.ts - Application routes → Reports and charts: routes to
frontend/src/app/app.routes.ts - KPI dashboard → Authentication UI: uses
frontend/src/app/dashboard/dashboard.ts - API server → API router: mounts
api/core/router.js - API server → Authentication routes: loads
api/server.js - API server → Indicator routes: loads
api/server.js - API server → KPI result routes: loads
api/server.js - API server → Review and notifications: loads
api/server.js - Authentication routes → API router: registers routes
api/routes/auth.js - Indicator routes → API router: registers routes
api/routes/indicators.js - KPI result routes → API router: registers routes
api/routes/kpi-results.js - Review and notifications → API router: registers routes
api/routes/review.js - Authentication routes → Access control: checks access
api/routes/auth.js - KPI result routes → Access control: checks access
api/routes/kpi-results.js - Indicator routes → KPI hierarchy: uses
api/routes/indicators.js - Indicator routes → KPI summaries: uses
api/routes/indicators.js - KPI result routes → KPI summaries: uses
api/routes/kpi-results.js - KPI summaries → Formula engine: evaluates formulas
api/services/summary.js - KPI summaries → KPI hierarchy: loads aggregates
api/services/summary.js - KPI hierarchy → Formula engine: rolls up KPI
- KPI export → Formula engine: evaluates formulas
api/services/export.js - KPI export → KPI hierarchy: loads aggregates
api/services/export.js - Scheduled jobs → KPI export: runs exports
api/jobs/export-scheduler.js - Scheduled jobs → Notifications: sends alerts
api/jobs/export-scheduler.js - API server → Scheduled jobs: starts jobs
api/server.js - API server → Backup service: loads service
api/server.js - Authentication routes → Database pool: queries
api/routes/auth.js - Indicator routes → Database pool: queries
api/routes/indicators.js - KPI result routes → Database pool: queries
api/routes/kpi-results.js - Review and notifications → Database pool: queries
api/routes/review.js - KPI summaries → Database pool: queries
api/services/summary.js - KPI hierarchy → Database pool: queries
api/services/hierarchy.js - KPI export → Database pool: queries
api/services/export.js - Database pool → MySQL database: connects
api/db.js