Ghana Hire Purchase Management System
A comprehensive, enterprise-ready technical specification and architectural blueprint for the Bridgeway Technologies Ltd platform. Powers the complete hire purchase lifecycle, identity verification (NIA/DVLA), payments, credit risk scoring, government worker (CAGD IPPD2) salary deductions, and statutory GRA compliance across Ghana.
1. System Overview & Architecture
The Ghana Hire Purchase Management System (GHP) is a financial technology operating system developed by Bridgeway Technologies Ltd. It standardizes and governs credit-based retail sales, collateral verification, government employee deductions, debt recovery, and tax administration across accredited merchants in Ghana.
| Architecture Layer | Blueprint Decision | Production Engineering Notes |
|---|---|---|
| Frontend Framework | Single-Page Architecture with Vanilla JS IIFE & Tailwind/CSS Tokens | Modular page routing, instantaneous client-side calculations, zero heavy bundler lock-in. |
| Backend REST Engine | Django 5 + Django REST Framework + DRF Spectacular (OpenAPI 3.0) | Full type safety, MultiPart file upload parser classes, robust role-based middleware. |
| Data & Persistence | PostgreSQL (Relational + JSONB) + Redis Cache | ACID transaction guarantees for ledger, automated indexes on Ghana Card & Contract IDs. |
| Payment Gateway | PCI-DSS Level 1 Compliant Native MoMo & Card Processing | Supports MTN Mobile Money, Telecel Cash, AT Money, Visa, Mastercard, and Bank Cheque. |
| Identity & Biometrics | NIA Ghana Card API, DVLA Gateway, Face ID Verification | Sub-2 second verification latency with automated fallback and audit logging. |
Role-Based Access Control (RBAC) Hierarchy
# Minimum role enforcement level (0 to 4): Staff(0) < Shop Manager(1) < Regional Manager(2) < CEO(3) < System Admin(4)
Every navigation link, API endpoint, and dashboard action enforces minimum role permissions both on the client and server side.
2. Module Inventory (34 Modules)
Filter modules by functional business domain or search by name, role requirement, and capabilities:
| Module & Direct Access | Domain Subsystem | Min Role | Core Operational Capabilities | Action |
|---|---|---|---|---|
Master Overview Dashboard
/dashboard/ |
1. Dashboards | Role 0 (Staff) | Real-time operations summary, system activity feed, national sales counters, and quick HP actions. | Launch |
CEO Executive Portal
/ceo-dashboard/ |
1. Dashboards | Role 3 (CEO) | Nationwide revenue velocity, regional portfolio performance, delinquency heatmaps, executive approval flags. | Launch |
Regional Portfolio Command
/regional-manager-dashboard/ |
1. Dashboards | Role 2 (Reg Mgr) | Cross-shop regional KPI tracking, regional underwriting quotas, territory risk analytics, branch rankings. | Launch |
Shop Operations Hub
/shop-manager-dashboard/ |
1. Dashboards | Role 1 (Shop Mgr) | Branch daily sales, inventory levels, down payment deposits, cashier drawer balance, staff management. | Launch |
Branch Register & POS
/shop-dashboard/ |
1. Dashboards | Role 1 (Shop Mgr) | Point-of-sale terminal, in-store cash drawer tracking, rapid installment lookup, receipt generation. | Launch |
Merchant Owner Portal
/shop-owner-portal/ |
1. Dashboards | Role 1 (Shop Owner) | Merchant revenue settlements, commission tracking, store profile configuration, B2B subscription status. | Launch |
Staff Task & Queue Desk
/staff-dashboard/ |
1. Dashboards | Role 0 (Staff) | Assigned customer verification tasks, pending contract creation queues, payment verification desk. | Launch |
HP Agreement Wizard
/hire-purchase-creation/ |
2. HP Origination | Role 0 (Staff) | Four-step origination workflow: buyer verification, product assignment, PMT calculation, down payment. | Launch |
HP Origination Studio v4
/hire-purchase-creation-v4/ |
2. HP Origination | Role 0 (Staff) | Next-generation origination interface with live installment simulators, instant Ghana Card OCR, and digital signing. | Launch |
Regional Underwriting & Approval
/hp-approval/ |
2. HP Origination | Role 2 (Reg Mgr) | Credit risk scoring evaluation, guarantor debt validation, 1-click contract approval, rejection reason notes. | Launch |
Financial Terms Calculator
/store/calculator/ |
2. HP Origination | Role 0 (Public/Staff) | Dynamic PMT schedule modeler, weekly/monthly installment split, deposit % slider, interest rate breakdown. | Launch |
Digital Legal Document Vault
/legal-documents/ |
2. HP Origination | Role 1 (Manager) | Statutory hire purchase contracts (Act 1974 NRCD 292), repossession notices, SHA-256 hash validation. | Launch |
Client Master Dossier & Face ID
/client-profile/ |
3. KYC & Biometrics | Role 0 (Staff) | Comprehensive borrower dossier, photo biometric match %, contract history, residential digital address map. | Launch |
NIA Identity Compliance Centre
/kyc-nia-centre/ |
3. KYC & Biometrics | Role 1 (Manager) | Live National Identification Authority lookup, incomplete verification billing tracker, biometric portrait store. | Launch |
Video KYC Remote Session Hub
/video-kyc/ |
3. KYC & Biometrics | Role 1 (Manager) | Remote customer video verification, live government ID capture, biometric liveness check, recording audit. | Launch |
Customer Self-Service Portal
/client-self-service/ |
3. KYC & Biometrics | Role 0 (Client/Staff) | Buyer payment schedule tracker, online balance inquiry, payment receipt downloads, profile update requests. | Launch |
Enterprise Client Portal v3
/client-self-service-v3/ |
3. KYC & Biometrics | Role 0 (Client/Staff) | Mobile-first customer self-service, instant MoMo quick repayments, upgrade & swap calculator, push notifications. | Launch |
Payment Gateway & MoMo Terminal
/payment-processing/ |
4. Payments & Store | Role 0 (Staff) | MTN Mobile Money, Telecel Cash, AT Money, Visa/Mastercard processing, instant receipt generation, ledger sync. | Launch |
Statement of Account & Ledger
/statement-of-account/ |
4. Payments & Store | Role 0 (Staff) | Complete chronological transaction ledger, principal vs interest splits, penalty audit, PDF statement exports. | Launch |
Public Marketplace Storefront
/ |
4. Payments & Store | Role 0 (Public) | Customer-facing retail storefront, product discovery, live weekly/monthly installment display, brand catalogue. | Launch |
Product Catalogue & Stock
/product-catalogue/ |
4. Payments & Store | Role 0 (Staff) | Inventory management, cash price vs HP price configuration, minimum deposit percentages, stock alerts. | Launch |
Direct Checkout & Order Tracker
/store/checkout/ |
4. Payments & Store | Role 0 (Public) | Instant hire purchase application, outright cash purchase flow, mobile money deposit confirmation, order tracking. | Launch |
Debt Collection & Recovery Hub
/debt-collection/ |
5. Debt & Field | Role 1 (Manager) | Aging buckets (1-30, 31-60, 60+ days), field agent assignments, repossession workflow, settlement negotiations. | Launch |
GPS Field Agent Dispatch Desk
/field-agent/ |
5. Debt & Field | Role 0 (Agent/Staff) | Field debt recovery assignments, GPS visit logging, photographic evidence capture, field receipt issuance. | Launch |
Mobile Agent Recovery Terminal v2
/field-agent-v2/ |
5. Debt & Field | Role 0 (Agent/Staff) | Optimized mobile field app with offline sync capability, instant GhanaPost GPS mapping, and MoMo collection trigger. | Launch |
National Credit Bureau Scoring
/credit-bureau/ |
6. Risk & Swaps | Role 1 (Manager) | 300–850 credit risk scoring, historical repayment streak analytics, default risk classification, bureau API pull. | Launch |
Asset Swap & Trade-In Desk
/swap-management/ |
6. Risk & Swaps | Role 0 (Staff) | Used device evaluation, trade-in condition grading, valuation differential settlement, refurbished inventory. | Launch |
National Fraud & Ban Registry
/ban-management/ |
6. Risk & Swaps | Role 2 (Reg Mgr) | Blacklist enforcement, fraud severity tiers (3 mo, 12 mo, Permanent), automatic block on new contract origination. | Launch |
GRA Statutory Tax Filing Hub
/gra-integration/ |
7. GRA & Telecom | Role 2 (Reg Mgr) | Ghana Revenue Authority compliance: automated VAT (15%), NHIL (2.5%), GETFund (2.5%), WHT (3%) calculation & export. | Launch |
Automated SMS Trigger Rules
/sms-automation/ |
7. GRA & Telecom | Role 1 (Manager) | Configurable lifecycle SMS: payment reminders (-3 days), overdue alerts (+15 days), welcome notifications, receipt SMS. | Launch |
Carrier SMS Gateway Centre
/sms-centre/ |
7. GRA & Telecom | Role 1 (Manager) | Ghana Telecel / MTN SMS gateway delivery log, carrier cost ledger (GHS 0.035/SMS), broadcast campaigns, audit trace. | Launch |
SHA-256 Audit Ledger
/blockchain-log/ |
8. Governance | Role 3 (CEO/Admin) | Immutable cryptographic audit chain, SHA-256 block mining, previous hash validation, proof-of-audit verification. | Launch |
Machine Learning Predictive Hub
/analytics-ml/ |
8. Governance | Role 3 (CEO) | Default prediction models, seasonal sales forecasting, regional revenue cluster analytics, AI customer segmentation. | Launch |
REST API & Key Governance
/api-management/ |
8. Governance | Role 4 (Admin) | OpenAPI 3.0 documentation, API key token generation, rate limiting (120 req/min), HMAC security headers, developer gate. | Launch |
3. Fee Structure & Revenue Engine
| Fee Type | Rate | Payer | Timing | Receipt Prefix |
|---|---|---|---|---|
| Client Verification Fee | 1% of product value | Client | At registration before submission | BTL-VER-XXXXXXXX |
| HP Processing Fee | 1% of agreement amount | Client | At HP creation Step 4 | BTL-PROC-XXXXXXXX |
| Swap Exchange Fee | 1% of top-up difference | Client | At swap submission | BTL-SWP-XXXXXXXX |
| Lay-By Reservation Fee | 1% of product price | Client | At lay-by creation | BTL-LAY-XXXXXXXX |
| NIA Incomplete Penalty | 1% of product value | Merchant | If NIA lookup runs without client completion | BTL-PEN-XXXXXXXX |
| DVLA Incomplete Penalty | 1% of vehicle value | Dealership | If DVLA lookup runs without HP agreement | BTL-PEN-XXXXXXXX |
// Fee helper reference implementation const calculatePlatformFees = (productPrice, hpAgreementTotal) => { const verificationFee = Math.round(productPrice * 0.01 * 100) / 100; const processingFee = Math.round(hpAgreementTotal * 0.01 * 100) / 100; return { verificationFee, processingFee, totalDueUpfront: verificationFee + processingFee }; };
4. Business Rules & Domain Constraints
| Domain | Constraint / Rule | Technical Implementation |
|---|---|---|
| DVLA Access | Restricted exclusively to car_dealership entity types. | Middleware & API gate checks shop.shop_type == 'car_dealership'. |
| Entity Type Lock | Once confirmed as 'Shop' or 'Company', type cannot be changed. | Immutable field; only System Admin (Role 4) has override permission. |
| Lay-By Schedule | 0% interest; released strictly at 100% completion; 3 missed payments triggers auto-cancellation. | Cron job audits delinquent lay-bys; locks stock release until zero balance. |
| National Ban Registry | Mild = 3 months, Moderate = 12 months, Severe = Permanent. | Automatic expiry calculation; blocks HP origination during active ban. |
| Credit Score Bands | Range: 300 to 850 (Exceptional: 800+, Good: 650-799, Fair: 500-649, Poor: <500). | Calculated from payment behavior, debt history, and bureau reports. |
| CAGD IPPD2 | Monthly installment must not exceed 30% of gross salary; min 12 SSNIT contributions. | Form validation rejects agreements exceeding 30% debt-to-income threshold. |
| Ghana Tax Engine | VAT (15%) + NHIL (2.5%) + GETFund (2.5%) = 20% effective tax; WHT is 3%. | Automated tax breakdown on every invoice and invoice remittance schedule. |
5. Verification Protocols & Regex Specs
| Service / Identifier | Expected Format | Regex Pattern | Sample Valid Input |
|---|---|---|---|
| Ghana Card ID (NIA) | GHA-XXXXXXXXX-X | ^GHA-\d{9}-\d$ | GHA-729104821-3 |
| GRA Taxpayer TIN | C/P + 10 Digits | ^[CP]\d{10}$ | C0012345678 |
| GhanaPost GPS Address | XX-NNN-NNNN | ^[A-Z]{2}-\d{3}-\d{4}$ | GA-183-9024 |
| CAGD Staff ID | XXX/YYYY/NNNNNN | ^[A-Z]{3}\/\d{4}\/\d{6}$ | GES/2021/049182 |
| SSNIT Number | Letter + 10 Digits | ^[A-Z]\d{10}$ | C1092837465 |
| DVLA Number Plate | Region-Number-Year | ^[A-Z]{2}-\d{1,4}-\d{2}$ | GR-4819-24 |
6. Domain Data Models
| Model Entity | Key Database Columns | Relationships & Constraints |
|---|---|---|
Product | id, sku, name, cash_price, hp_price, image, stock, active | Belongs to Category & Shop; enforces min deposit. |
ClientProfile | id, ghana_card_id, full_name, phone, credit_score, photo, kyc_status | Unique Ghana Card constraint; links to Contracts & KYC files. |
Contract | id, contract_number, client_id, product_id, total_amount, balance_remaining, status | ForeignKeys to Client & Product; tracks blockchain hash. |
Payment | id, contract_id, amount, payment_method, transaction_reference, receipt_image | ForeignKey to Contract; validates ledger reconciliation. |
NIARecord | id, ghana_card_id, full_name, dob, card_image_front, card_image_back | Stores NIA national verification snapshots & card scans. |
BlockchainBlock | id, block_index, block_hash, previous_hash, event_type, payload | Immutable Merkle chain for contract & payment integrity. |
7. Technology Stack & Standards
| Component | Technology Selection | Standard & Rationale |
|---|---|---|
| Application Server | Django 5.x / Python 3.14 | High-performance ASGI/WSGI backend with built-in ORM security. |
| API Interface | Django REST Framework + OpenAPI 3.0 | Standardized JSON endpoints with Swagger UI & Redoc interactive docs. |
| Relational Database | PostgreSQL 16 | Robust ACID compliance, foreign key constraints, and JSONB document storage. |
| Security & Auth | Django Session + RBAC Middleware | Role protection middleware guarding all 36 routes against unauthorized access. |
| Media & File Storage | Django Static & Media Engine | Multipart file parser for product images, user avatars, and KYC identity scans. |
8. Design Tokens & Brand Palette
--navy: #1a2744; /* Primary brand navy (headers, cards) */ --blue1: #1a5276; /* Deep accent blue */ --blue2: #2e86c1; /* Vibrant interactive blue (links, active buttons) */ --amber: #f59e0b; /* Brand gold (KPI highlights, primary accents) */ --green: #27ae60; /* Success badges, verified states, credit pass */ --red: #e74c3c; /* Error alerts, delinquent debt, bans */ --purple: #8b5cf6; /* Alternate finance, lay-bys, video KYC */ Typography: Sora (Headers/Body), JetBrains Mono (Numbers, IDs, Code)
9. Merchant Subscription Tiers
| Subscription Tier | Monthly Price | Included Quota & Features |
|---|---|---|
| Starter | GHS 500 | NIA verification, basic HP origination, 50 automated SMS alerts/month. |
| Professional | GHS 750 | All Starter features + 200 SMS, analytics reports, DVLA checks for auto dealers. |
| Enterprise | GHS 1,500 | All Pro features + unlimited SMS, custom API integration, multi-branch network, 24/7 support. |
10. Developer Acceptance Checklist
| Verification Item | Target Standard | Automated Test Command |
|---|---|---|
| Route Protection | 100% of internal pages redirect unauthenticated/unauthorized users. | manage.py test core |
| OpenAPI & Swagger | /api/schema/, /api/docs/, /api/redoc/ return HTTP 200 OK. | manage.py test core |
| Full App Test Suite | All 36 unit/integration tests pass with 0 errors. | manage.py test core hire_purchase accounts kyc |
| Static & Media Engine | Product photos, user avatars, and KYC card scans upload & render. | Automated image upload test suite |
11. Legal & Statutory Compliance References
| Statutory Act | Regulatory Scope | Application within GHP |
|---|---|---|
| Hire Purchase Act 1974 (NRCD 292) | Hire purchase, conditional sale, credit sale agreements. | Governs statutory agreement terms, minimum deposit rules, repossession limits. |
| Data Protection Act 2012 (Act 843) | Personal data privacy, biometric storage, consent. | Governs encryption and consent for Ghana Card and Face ID data. |
| Ghana Revenue Authority Act 2009 (Act 791) | Tax remittance, VAT/NHIL/GETFund withholdings. | Automates statutory tax schedule generation and filing reminders. |
| Public Services Act (CAGD) | Public sector payroll deduction management. | Enforces 30% gross deduction limit on government worker HP agreements. |