How parthasarathyhmh/workday-middleware works
This is a Workday backup and integration API built with NestJS, alongside employee/job-post endpoints, authentication, and a Zoho e-sign webhook. The backup path includes scheduled orchestration, Workday report retrieval, domain-specific processing, and MongoDB log storage/export. Evidence is uneven: some service and controller files were not excerpted, so their behavior and call relationships are not inferred beyond the module wiring shown in the source index.
Main entry points: workday-backup.module.ts Backup module · app.module.ts Nest application · services Backup domains · zoho-webhook.controller.ts Zoho webhook
Components 22
API and access
- Nest application
src/app.module.ts - Authentication
src/services/auth.service.ts - User accounts
src/services/user.service.ts - JWT tokens
src/services/jwt.service.ts - Job posts
src/controllers/jobpost.controller.ts - Employees
src/controllers/employee.controller.ts
Workday backups
- Backup module
src/workday-backup.module.ts - Backup scheduler
src/schedulers/workday-backup.scheduler.ts - Backup service
src/services/workday-backup.service.ts - Backup domains
src/services
Logs and encryption
- MongoDB logs
src/database/workday-backup-mongo.module.ts - Log schemas
src/database/schemas - Field encryption
src/database/plugins/encryption.plugin.ts - Crypto utilities
src/utils/crypto.utils.ts - Log export
src/utils/backup-logs-export.utils.ts
External integrations
- Workday event scheduler
src/schedulers/workday-events.scheduler.ts - Zoho webhook
src/controllers/zoho-webhook.controller.ts - Webhook validation
src/services/zoho-webhook-validation.service.ts - Workday service
src/services/workday-backup.service.ts - Failure email
src/mail/mail.service.ts
Other components
- API clients
- SMTP service
Connections 21
- API clients → Nest application: send requests
- Nest application → Backup module: registers
src/app.module.ts - Nest application → Job posts: registers
src/app.module.ts - Nest application → Employees: registers
src/app.module.ts - Nest application → Zoho webhook: registers
src/app.module.ts - Authentication → User accounts: looks up
src/services/auth.service.ts - Authentication → JWT tokens: issues tokens
src/services/auth.service.ts - Backup module → Backup scheduler: registers
src/workday-backup.module.ts - Backup module → Backup domains: registers
src/workday-backup.module.ts - Backup module → MongoDB logs: configures
src/workday-backup.module.ts - Backup module → Log schemas: registers
src/workday-backup.module.ts - Backup module → Backup service: registers
src/workday-backup.module.ts - Backup module → Workday event scheduler: registers
- Backup domains → Backup service: fetches report data
src/services/spend-authorizations.service.ts - Backup domains → MongoDB logs: writes and queries
src/services/spend-authorizations.service.ts - Backup domains → Field encryption: processes records
src/services/spend-authorizations.service.ts - Field encryption → Crypto utilities: encrypts values
src/database/plugins/encryption.plugin.ts - Backup domains → Log export: exports logs
- Zoho webhook → Webhook validation: validates payload
src/controllers/zoho-webhook.controller.ts - Zoho webhook → Workday service: forwards webhook
src/controllers/zoho-webhook.controller.ts - Failure email → SMTP service: sends mail
src/mail/mail.service.ts