User Manual — WatuKopesha
This manual explains how to use WatuKopesha — from logging in, registering borrowers, processing loans, recording repayments, to producing regulatory reports.
1. Getting Started
WatuKopesha is a complete loan management system (LMS) built for Tanzanian microfinance providers (MSPs). It has four main areas: a public website for new clients, a client portal for existing borrowers, an admin area for staff, and an owner portal for read-only oversight.
2. User Roles & Portals
| Portal | URL | Used By |
|---|---|---|
| Public Website | / | New clients seeking loans |
| Client Portal | /portal/ | Registered borrowers viewing their loans |
| Admin Area | /admin/ | All staff — loan officers, accountants, managers, etc. |
| Owner Portal | /owner/ | Owners/shareholders for read-only insights |
Staff Roles
- Super Admin — all permissions, full system access
- Branch Manager — manages a branch, approves loans
- Loan Officer — creates applications, records repayments
- Accountant — accounting, financial reports, BoT submissions
- HR Officer — employees and payroll
- Data Entry Clerk — data entry only, no approvals
3. Logging In
Staff Login
- Go to
/admin/login.php - Enter username and password
- If 2FA enabled, enter OTP sent to your phone
Client Login
- Go to
/portal/login.php - Enter phone number and membership number
- Receive an OTP by SMS and verify
5. Borrowers
Registering a New Borrower
- Click Borrowers → + New Borrower
- Fill in basic info: name, phone, NIDA ID, address
- Select branch and economic sector
- Save — a membership number is auto-generated
- A welcome SMS is sent automatically to the borrower
KYC (Know Your Customer)
Ensure each borrower has complete data before approving any loan: identity number, date of birth, address, and gender. Use the KYC Compliance Audit report to find gaps.
6. Groups (Solidarity Lending)
Groups enable solidarity lending where members guarantee each other. Create a group at Groups → New Group, add members, then when creating a loan choose "group loan" instead of "individual".
This module can be turned off at Settings → Modules → Group Loans.
7. Loan Products
Before lending, create loan products that define interest, term, min/max amount, and repayment cycle. Go to Loans → Products → + Add Product.
| Field | Meaning |
|---|---|
| Interest method | Flat: interest on original principal throughout; Reducing: interest on declining balance |
| Repayment cycle | daily, weekly, biweekly, monthly |
| MSP loan type | BoT category (business_individual, salary, agriculture_asset, etc.) — used for the MSP2-04 quarterly report |
8. Loan Workflow (Application → Closure)
The full lifecycle has six stages, all visible on Loans → View loan:
- Submitted — Loan officer creates the application
- Under Review — Manager reviews the file
- Approved — A loan record is created and the repayment schedule generated
- Disbursed — Funds released via bank/M-Pesa, posted to the GL
- Active — Borrower repays each cycle
- Closed — Outstanding hits zero; loan is closed
Each stage triggers an automatic SMS to the borrower.
Approve or Reject
Open the application at Loans → Applications. Click "Approve" to spawn the loan, or "Reject" with a reason — the reason is sent to the borrower by SMS.
Disbursement
An approved loan sits in pending_disbursement status. Click "Disburse", pick the source account (cash/bank/M-Pesa), date and reference. The system posts the payment to the GL and sends an SMS confirming the loan amount and first installment date.
9. Repayments
Recording a Payment
- Repayment → + New Repayment
- Search the loan (by number or borrower name)
- Enter amount, method (cash/bank/M-Pesa…), and the receiving account
- Click Submit — the system allocates: penalty → fees → interest → principal
- A receipt is generated and the borrower gets an SMS with the new balance
10. Restructure & Write-off
Restructure
When a borrower can no longer meet the schedule, change the term and/or rate. The remaining balance becomes the new principal. Go to Loan view → Restructure.
Write-off
Truly uncollectible loans are written off. The system posts the balance to bad-debt expense (5300) and reduces loans receivable (1300).
11. Savings
- Create a savings product at Savings → Products
- Open an account for a borrower at Savings → + New Account
- Post deposits, withdrawals, interest credits, or fees
Every transaction sends an SMS to the customer and posts a journal entry to the GL.
12. Accounting
The accounting suite includes:
- Chart of Accounts — all GL accounts grouped by type
- Journal Entries — double-entry postings; auto-generated by loans, savings, payroll, etc.
- Trial Balance, Balance Sheet, Income Statement, Cash Flow
- Receivables & Payables — outstanding from clients and to suppliers
- Bank Reconciliation — match imported bank statements with GL
Cash/bank/M-Pesa accounts are linked to GL accounts at Accounting → Cash Accounts.
13. Fixed Assets
Register vehicles, furniture, computers, etc. under Fixed Assets. Run "Depreciation" monthly — the system reduces book value and posts depreciation expense (5200) automatically.
14. HR & Payroll
HR (Employees)
- Departments / Positions / Employees — master data
- Leave Requests / Attendance
- Staff Loans — advances to staff (separate from client loans)
Payroll
Run payroll monthly via Payroll → New Run. The system calculates PAYE, NSSF, NHIF, SDL, and WCF using current Tanzanian rates (Settings → Accounting). Pay slips are generated per employee and can be printed.
Statutory reports available: PAYE Report, NSSF Report, NHIF Report, SDL/WCF Report, Statutory Tax Summary.
15. Inventory
Track office supplies (stationery, IT consumables, branded merchandise). Configure warehouses, categories, items. The system tracks current quantities and every movement.
16. Procurement
Full procure-to-pay flow:
- Suppliers — register vendors
- Purchase Requisition (PR) — department request
- Purchase Order (PO) — after approval
- Goods Received Note (GRN) — receive delivery
- Supplier Invoice — log the invoice
- Supplier Payment — pay from any cash/bank account
17. Complaints
Log client complaints received by phone, email, in-person, or through the portal. This feeds the BoT MSP2-06 quarterly return automatically.
18. Reports & Analytics
A library of 100+ reports across 10 categories:
- Loan Reports (35) — active, arrears, PAR, top borrowers, sector breakdown, etc.
- Repayment Reports (10) — daily/weekly/by-method collections, voided, day-of-week patterns
- Savings (10), Borrowers (10), Financial Statements (13)
- HR & Payroll (9), Fixed Assets (5), Inventory & Procurement (7)
- Regulatory & Compliance (6), Operational (6)
Analytics — a separate page with 12 trend charts for executive insight.
19. 🤖 AI Skilled Agents
The system ships with 60 OpenAI-powered assistants: 40 for admin staff and 20 for the owner. Each one reads MFI data straight from the database, then produces expert-level analysis — from scoring a borrower to drafting the next BoT MSP2 return.
Initial setup
- Get an OpenAI API key from platform.openai.com/api-keys
- Open Settings → AI
- Paste the key, pick a model (recommended:
gpt-4o-mini), click Save
Pricing (Tsh)
AI usage is billed in credits on a flat per-credit rate:
| Item | Price | Details |
|---|---|---|
| 1 credit = 1,000 tokens | Tsh 50 | Flat rate. A token is roughly ¾ of an English word. A typical agent run uses 1-3 credits (1,000-3,000 tokens including prompt + response). |
| 1 SMS | Tsh 30 | Up to 160 characters per SMS. Longer messages are split into 160-char parts and each part is billed separately. |
- Borrower Risk Scorer — averages 2 credits = Tsh 100 per run
- Loan Approval Assistant — averages 3 credits = Tsh 150 per run
- Annual Report Drafter — averages 5-8 credits = Tsh 250-400 per run
- One repayment-reminder SMS = Tsh 30
Token usage is shown below every AI result and is recorded in the Audit Log so admins can track spend per user, per day, per agent.
Admin agents — 40 (/admin/ai/)
| Category | Count | Agents |
|---|---|---|
| 💎 Profitability | 5 | Loan Profitability Calculator · Customer Lifetime Value · Product Profitability Ranker · Interest Income Forecaster · Yield Analyzer |
| 💳 Lending | 5 | Borrower Risk Scorer · Loan Approval Assistant · Collateral Analyst · Restructure Advisor · Repayment Plan Optimizer |
| 🧑 Customer | 4 | Borrower Profile Summarizer · KYC Gap Analyzer · Complaint Triager · SMS Drafter |
| 🔬 Analysis | 10 | Affordability · Repayment Behavior Profiler · Cross-Sell · Borrower Segmentation · Guarantor Check · Vintage Cohort · Early Warning · LGD Estimator · Sector Outlook · DSCR Calculator |
| 📈 Loans / Borrower | 5 | Loan Performance Predictor · Collection Effort Estimator · Repeat Borrower Predictor · Churn Risk · Income Verification |
| 📒 Finance | 4 | Report Narrator · Anomaly Detector · Cash Flow Forecaster · Expense Categorizer |
| 🏛️ Compliance | 3 | MSP2 Compliance Checker · AML/Fraud Pattern Detector · Statutory Tax Calculator |
| ⚙️ Operations | 4 | Daily Briefing · Loan Officer Coach · Branch Health Diagnostic · Q&A Assistant |
Owner agents — 20 (/owner/ai/)
| Category | Agents |
|---|---|
| 📋 Strategy | Executive Briefing · Annual Report Drafter · Strategic Q&A |
| 💰 Profitability | Profitability Analyzer · ROI by Product/Sector · Pricing Optimizer · Dividend Capacity Calculator |
| 📈 Growth | Growth Forecaster · CLV by Segment · Market Position Analyzer |
| 🌡️ Portfolio Health | Portfolio Scorecard (A-F) · Risk Heatmap Narrator · Concentration Risk · Liquidity Stress Test · Capital Adequacy Advisor |
| 🏆 Comparative | Branch Comparator · Officer Productivity Ranker · Product Strategy Ranker |
| 🛡️ Compliance | BoT Compliance Status · Audit Readiness Check |
How to run an agent
- Go to Insights → 🤖 AI Assistants (or Owner → 🤖 AI)
- Click the card of the agent you want
- Fill the form — most agents use search dropdowns (type a borrower name, loan number, etc.)
- Click ▶ Run agent
- Result appears within 2-5 seconds on the right side
🔒 Privacy & Security
- API key stored in DB, never written to logs or audit trail (recorded as
••• redacted •••) - OpenAI does not train models on data sent via the API (per their data-policy)
- Every agent run is logged in the Audit Log (token count only, never the prompt content)
- To disable AI: clear the OPENAI_API_KEY field in Settings → AI
Disclaimer
AI suggestions are guidance, not final decisions. A human MFI staffer must always verify before taking a financial action (approving a loan, writing off debt, etc.). The model computes from your data; verification is your responsibility.
20. BoT MSP2 Quarterly Return
This is the regulatory return submitted to the Bank of Tanzania every quarter. It contains 10 sections:
| Sheet | Content |
|---|---|
| MSP2_01 | Balance Sheet |
| MSP2_02 | Income Statement (Quarter + YTD) |
| MSP2_03 | Sectoral Loan Classification (22 BoT sectors × DPD buckets) |
| MSP2_04 | Interest Rate Structure (by loan type) |
| MSP2_05 | Liquid Assets vs. Required Minimum (5%) |
| MSP2_06 | Complaints Register |
| MSP2_09 | Disbursements during quarter (by sector & gender) |
| MSP2_10 | Geographic Distribution of Branches |
- Go to Reports → BoT MSP2
- Select the year and quarter
- Review the figures — they're computed from the GL and loan tables
- Click "Export CSV" to feed into the official BoT spreadsheet
- Click "Save snapshot" to archive the values for internal audit
21. SMS & Reminders
SMS notifications fire automatically on these events:
| Event | Borrower Sees |
|---|---|
| Registration | Welcome! Your membership # is… |
| Loan application | Application received |
| Approval | Loan approved |
| Disbursement | Loan disbursed, first repayment due… |
| Repayment | Receipt and remaining balance |
| Payment reminder | 3 days before, on due date, and on day 1/7/14 overdue |
| Savings | Deposit/withdraw, new balance |
For reminders to fire, add a daily cPanel cron at 9 AM running cron/sms_reminders.php.
To silence all notifications (e.g. testing), set setting('sms_notifications_enabled') = '0'.
Pricing
| Item | Price | Details |
|---|---|---|
| 1 SMS | Tsh 30 | Up to 160 characters. Longer messages are split into 160-character parts and each part is billed separately (e.g. a 250-character SMS = 2 parts = Tsh 60). |
SMS volume and cost are visible at Reports → Operational → SMS Outbox.
22. 📲 Install as an App (PWA)
All three surfaces — Admin, Client Portal, and Owner Portal — can be installed as an "app" on a phone, tablet or desktop. They use Progressive Web App (PWA) technology: no Play Store or App Store needed, and they continue to work even when offline.
What you get
- Icon on the home screen (mobile) or desktop / Start menu (computer)
- Opens without a browser bar — looks and feels like a native app
- Faster (CSS/JS assets are cached locally)
- Shows a friendly offline page when the connection drops
- Mobile bottom navigation with icons (Home, Loans, Statement, Profile)
- Long-press shortcuts on the icon (e.g. "+ New Loan", "+ Repayment", "AI Assistants")
What installs where
| Surface | URL | Best for |
|---|---|---|
| 🖥️ Admin | /admin/ | Staff — Chrome/Edge desktop install |
| 📱 Client Portal | /portal/ | Borrowers — Android/iPhone (full mobile bottom nav) |
| 📊 Owner Portal | /owner/ | Owners — tablet or desktop, dark theme |
How to install — Chrome (Desktop)
- Open the surface you want in Chrome (e.g.
https://hbs.watukopesha.com/admin/) - Look at the right side of the address bar — you'll see a 📲 install icon (or open the 3-dot menu → "Install [App name]")
- Or click the 📲 Install button at the top-right of the admin bar
- Confirm "Install" in the dialog
- The app appears in your Start Menu / Dock — opens without a browser bar
How to install — Android (Chrome)
- Open
https://hbs.watukopesha.com/portal/in Chrome on your phone - Tap the floating "📲 Install App" button at the bottom-right, OR open the 3-dot menu → "Add to Home screen"
- The icon appears on your home screen — tap to launch
How to install — iPhone / iPad (Safari)
- Open the surface in Safari (not Chrome — iOS only allows Safari to install PWAs)
- Tap the Share button ⎋ at the bottom-center
- Tap "Add to Home Screen"
- Give it a name (e.g. "WK Client") and tap "Add"
Mobile Bottom Navigation
The Client Portal and Owner Portal show an icon-based bottom navigation bar on phones and tablets (under 1024px wide). It's hidden on large desktop screens where the top nav is enough.
| Portal | Bottom nav buttons |
|---|---|
| 📱 Client Portal | 🏠 Home · 💳 Loans · 📄 Statement · 👤 Profile |
| 📊 Owner Portal | 🏠 Dashboard · 📊 Reports · 🤖 AI · 🚪 Logout |
Offline Mode
When the connection drops, the app shows a friendly offline page (portal/offline.html / owner/offline.html / admin/offline.html). The service worker caches CSS, JS, and logos so the app loads instantly even on weak 3G.
📲 Shortcuts (Long-press the icon)
After installing, long-press the app icon to jump straight into common actions:
| Admin | + New Loan · + New Borrower · + Repayment · 🤖 AI Assistants |
| Client Portal | My Loans · Statement · Profile |
| Owner Portal | Dashboard · Reports · 🤖 AI Assistants |
23. Client Portal
Borrowers can log in to /portal/ to see:
- All their loans (active, closed)
- Outstanding balance and next payment due
- Repayment statement
- Their profile
New clients can self-register at /portal/register.php — a 4-step mobile-friendly form.
24. System Administration
Settings
These tabs live under Settings:
- Company — Name, address, phone, TIN, MSP code, and logo upload
- Currency — Currency, timezone, default locale
- Modules — Toggle features on/off
- SMS — Provider, sender ID, simulate mode
- Security — Session timeouts, lockout policy, OTP length
- Numbering — Prefixes for loan #, receipt #, etc.
- Accounting — Fiscal year, statutory rates (PAYE/NSSF/NHIF/SDL/WCF)
- Theme — Pick from 20 color palettes for the public site + portal
Users & Roles
Create users at Users → + New User. Each user has a role that determines their permissions. Edit roles and toggle individual permissions at Users → Roles.
Audit Log
Every important action (logins, loan approvals, user creations, etc.) is recorded to the Audit Log and is searchable by user, action, or date.
25. Security
- Passwords must be at least 8 characters (configurable)
- Accounts auto-lock after 5 failed attempts
- 2FA via phone OTP can be enforced
- All data flows over HTTPS in production
- Database is backed up daily by cPanel
26. Glossary
| BoT | Bank of Tanzania — the regulator |
| CRB | Credit Reference Bureau |
| DPD | Days Past Due — days an installment is late |
| GL | General Ledger |
| KYC | Know Your Customer — customer due diligence |
| MSP | Microfinance Service Provider — a small financial institution |
| MSP2 | BoT quarterly reporting form |
| NIDA | National ID number |
| NSSF | National Social Security Fund |
| NHIF | National Health Insurance Fund |
| PAR > 30 | Portfolio at Risk over 30 days — percent of portfolio with payments overdue 30+ days. Industry threshold: 5% |
| PAYE | Pay-As-You-Earn (income tax) |
| PR / PO / GRN | Purchase Requisition / Purchase Order / Goods Received Note |
| SDL | Skills Development Levy (4% of gross payroll) |
| WCF | Workers Compensation Fund (1% of gross payroll) |
| TIN | Taxpayer Identification Number |
27. Troubleshooting
Cannot log in
Verify the username is correct. The account may be locked — check the Failed Login Attempts report or ask an admin to unlock.
SMS not being sent
- Verify Settings → SMS → Provider = "Wanzago" (not "log")
- Verify
SMS_USER+SMS_PASSin .env are correct - Check SMS Outbox for the error reason
Reports show Tsh 0 everywhere
Reports compute from the GL. Make sure journal entries exist — they're auto-created by every disbursement, repayment, and savings transaction. For demo data, import bot_demo_data.sql.
PAR > 30 is unrealistically high
Usually a demo-data artifact. In production with current activity, 2-7% is typical. Remove demo_data.sql before going live.
Document prepared for WatuKopesha. © 2026. Version 1.0.