<aside> 🔁 Synced from GitHub #ac5b1a75b5d1. Edit in the paidhr-system-docs repository, not here: changes made in Notion are overwritten.
</aside>
PaidHR is five front doors talking to three backend services, which share one set of SQL Server databases and use their own MongoDB stores for the rest.
flowchart LR
WEB[Web app] --> CORE
MOB[Mobile app] --> CORE
CP[Control panel] --> CORE
BOT[Channel bot] --> CORE
WEB --> EWA
MOB --> EWA
BOT --> EWA
TERM[Clock-in terminal] --> EWA
WEB --> WAL
MOB --> WAL
CORE[core-backend] |sessions, employees, loans| EWA[ewa-service]
CORE -->|payout queue| WAL[wallet-service]
CORE --> SQL[(SQL Server)]
EWA --> SQL
EWA --> MONGO[(MongoDB)]
WAL --> MONGO
WAL --> BANKS[Banking partners]
| Box | What it is |
|---|---|
| Web app | React. HR admin, employee, manager and approval pages |
| Mobile app | Flutter. Employees: requests, payslips, clock-in, EWA, wallet |
| Control panel | PaidHR staff's admin tool |
| Channel bot | USSD, WhatsApp and Telegram |
| Clock-in terminal | Android kiosk on the wall |
| core-backend | .NET. People, payroll, leave, approvals, identity, notifications |
| ewa-service | NestJS. Earned wages, time & attendance, hiring, channels, integrations |
| wallet-service | NestJS. Wallets, payouts, cards, bills, KYC |
| SQL Server | Membership, one database per tenant, warehouse |
| MongoDB | EWA, hiring and wallet records (plus SQS and Redis queues) |
| Banking partners | Bmoni, VFD, Flutterwave, Paystack, Mono and others |
/account/checksession or /account/getusersession on each request. If core-backend is down, EWA and attendance stop working too. See sign-in & tenancy.spPreparePayroll and spReviewEmployeeRequest. Each tenant database holds its own copy, deployed from the same migrations.sequenceDiagram
participant HR as HR admin (web)
participant Core as core-backend
participant SQL as Tenant DB
participant SQS as SQS
participant Wal as wallet-service
participant Bank as Banking partner
participant Emp as Employee (mobile)
HR->>Core: Prepare payroll
Core->>SQL: spPreparePayroll (earnings, deductions, tax, pension, changes)
HR->>Core: Submit for approval
Core-->>HR: Approvers emailed (one-click links)
HR->>Core: Approve (each step in the chain)
Core->>SQL: spReviewPayroll → Approved
HR->>Core: Process payment schedule
Core->>SQS: payout messages (every 5 min worker)
SQS->>Wal: INITIATE_PAYOUT
Wal->>Bank: transfers
Bank-->>Wal: webhook: success / failure
Wal-->>Core: acknowledgement queue
Core-->>Emp: payslip email + in-app
Each step is explained on its own page: payroll, payment schedules, wallet.