Logo Lanfrica

chanceDira/bnr-bank-licensing-portal

Domain:

digital infrastructure

Record type:

software
Creator:
cha
Host:
A system of record for bank license applications, supporting documents, multi-stage review decisions, and a tamper-evident audit trail. Built for the National Bank of Rwanda compliance scenario. # Bank Licensing & Compliance Portal A system of record for bank license applications, supporting documents, multi-stage review decisions, and a tamper-evident audit trail. Built for the National Bank of Rwanda compliance scenario. - **Backend** — NestJS 11 + PostgreSQL + Prisma + JWT (`bnr-bank-licensing-portal-be/`) - **Frontend** — React 18 + Vite + TanStack Query + Zustand (`bnr-bank-licensing-portal-fe/`) ```mermaid flowchart LR browser[React SPA] -->|JWT Bearer requests| api[NestJS API] api --> prisma[Prisma Client] prisma --> postgres[(PostgreSQL)] api --> storage[Local File Storage] api --> swagger[Swagger Docs] ``` --- ## What's in the box - Four roles: `APPLICANT`, `REVIEWER`, `APPROVER`, `ADMIN`. - Explicit workflow state machine with optimistic locking. - Four-Eyes Principle: reviewer cannot be the final decision maker. - Append-only audit log with a SHA-256 tamper-evident hash chain. - Document upload with SHA-256 fingerprinting and download verification. - Deterministic, explainable risk scoring (`LOW` / `MEDIUM` / `HIGH`). - Swagger API documentation at `/api/docs`. --- ## Quick start ### Prerequisites | Tool | Version | |---|---| | Node.js | ≥ 20 | | npm | ≥ 9 | | PostgreSQL | ≥ 14 | ### 1. Backend ```bash cd bnr-bank-licensing-portal-be npm install cp .env.example .env ``` Edit `.env` and set at minimum: ```env DATABASE_URL="postgresql://postgres:yourpassword@localhost:5432/license_portal" JWT_SECRET="your-long-random-secret-min-32-chars" ``` Create the database, run migrations, seed it, and start the API: ```bash psql -U postgres -c "CREATE DATABASE license_portal;" npx prisma migrate dev npm run seed npm run start:dev ``` API ready at `localhost`. Swagger at `localhost`. ### 2. Frontend In a second terminal: ```bash cd bnr-bank-licensing-portal-fe npm install cp .env.example .env ``` Default frontend environment: ```env VITE_API_URL=/api/v1 ``` Run the SPA: ```bash npm run dev ``` Op …