posted an update

DocGuard Nigeria: Comprehensive User & Technical Manual

Version: 1.0.0 (Hackathon Release)
Date: January 2026
Target Audience: End Users (Loan Officers) & Developers


1. Introduction

DocGuard Nigeria is an intelligent "Operating System" for secured corporate lending in Nigeria. It moves beyond simple document generation to handle the entire lifecycle of a loan—from the initial term sheet to the final perfection of the security charge at the Corporate Affairs Commission (CAC).

Core Problem Solved

Nigerian banks lose security on loans (approx. 40% error rate) because charge registration is manual, disconnected from the loan documentation process, and prone to the strict 90-day deadline (CAMA 2020) being missed. DocGuard automates this compliance.


2. Installation & Setup

Prerequisites

  • Node.js (v18 or higher)
  • Bun (Recommended package manager)
  • Git

Step-by-Step Setup

  1. Clone the Repository:

    git clone https://github.com/doc-guard/docguard-nigeria.git
    cd docguard-nigeria
    
  2. Install Dependencies:

    bun install
    # OR
    npm install
    
  3. Environment Configuration: The application uses a secure secret management system. You generally do not need a .env file for local development unless you are overriding defaults.

    • Google Gemini API: Required for AI features. Set in Settings > API Keys inside the app.
    • Supabase Credentials: Built-in for the hackathon demo version.
  4. Running the App:

    • Desktop Mode (Electron): bun run electron:dev (Recommended)
    • Web Mode: bun run dev (Limited functionality - no file system access)

3. User Manual: Feature Walkthrough

3.1 Dashboard & Command Center

Upon login, you land on the Dashboard.

  • Portfolio Health: Top metrics show active loan volume and perfection success rate.
  • Pipeline: A pipeline view showing deals in Review, Documentation, and Disbursement.
  • Deadline Guardian (Top Right): A traffic-light widget showing the most urgent CAMA filing deadline.
    • Red: <15 Days remaining (CRITICAL)
    • Amber: 15-30 Days
    • Green: >30 Days

3.2 Smart Loan Origination

Location: Sidebar > Loan Origination

How it Works:

  1. Click New Loan.
  2. Smart Context: Enter the Borrower Name (e.g., "Dangote Cement").
  3. Identity Capture: Enter RC Number (RC123456), TIN (1234...), and BVN.
  4. Auto-Link Magic: The system checks if this RC Number exists in your KYC database. If yes, it automatically links the verified status to this new transaction, saving you from re-doing due diligence.

3.3 KYC Orchestrator

Location: Sidebar > KYC

The "Unified Check": Instead of logging into 3 different portals, DocGuard runs parallel checks:

  1. CAC Check: Validates the company exists and is "ACTIVE".
  2. FIRS Check: Validates Tax Clearance status.
  3. NIBSS Check: Validates Directors' BVNs.

Note: In this version, these services are **Simulated* to demonstrate the workflow without live government API keys. Use RC... for valid company results.*

3.4 LMA Document Builder

Location: Sidebar > LMA Doc Builder

This is the heart of the legal automation.

  1. Select Template: Choose from Secured Term Facility, Revolving Credit, etc.
  2. Variable Injection: The system auto-fills the "Borrower" variable with the full legal description: "Dangote Cement (with Registration No. RC123456)".
  3. Redline AI Analyzer:
    • Highlight a clause.
    • Click "Analyze Risk".
    • The AI (Gemini 3 Flash) scans it against CAMA 2020 and Evidence Act 2023 to find enforceability risks.
  4. Magic Rewrite: Click to have the AI rewrite the clause to be more lender-friendly.

3.5 CAC Registry Bot (RPA)

Location: Sidebar > CAC Registry

The "Killer Feature"

  1. Select a Loan to perfect.
  2. Click "Open GuardBot Terminal".
  3. Click "Run Simulation".
  4. Watch the Magic:
    • The bot logs into the (simulated) CAC portal.
    • It fills Form 8 automatically using data from the Loan.
    • It captures a Screenshot of the success page.
    • It uploads this screenshot to Supabase Cloud Storage as permanent evidence.

4. Technical Architecture

4.1 System Design

DocGuard follows a Hybrid Desktop Architecture:

  • Frontend: React 19 + TypeScript + Tailwind CSS (High performance UI).
  • Backend-as-a-Service: Supabase (PostgreSQL + Auth + Storage).
  • Desktop Host: Electron 39.

4.2 Security Architecture (AppSec)

  • Zero-Trust Storage: We do not store API keys in plaintext.
  • Electron safeStorage: We use the OS native encryption:
    • Windows: DPAPI (Data Protection API)
    • macOS: Keychain
    • Linux: Libsecret/Keyring

4.3 Data Model (Supabase)

  • loans: The central fact table.
  • filings: Linked to loans (1:N), tracks CAC status.
  • documents: Linked to loans (1:N), stores generated PDFs.
  • kyc_requests: Linked to loans, stores verification results.
  • activity_feed: A SQL View that aggregates events from all tables for the dashboard timeline.

Log in or sign up for Devpost to join the conversation.