Skip to main content

Overview

The Reporting system provides comprehensive analytics and insights for supervisors and administrators to monitor operations, track performance, and make data-driven decisions.
Reports are primarily designed for Supervisors and Administrators. Credit Officers see their own performance data in the dashboard.

Report Types

The system supports multiple report types:
enum ReportType {
  DAILY      // Single day snapshot
  WEEKLY     // 7-day period
  MONTHLY    // Calendar month
  QUARTERLY  // 3-month period
  CUSTOM     // User-defined date range
}

DAILY

Daily operations snapshot for quick daily review

WEEKLY

7-day rolling window for week-over-week trends

MONTHLY

Full calendar month analysis for monthly reviews

QUARTERLY

3-month period for strategic planning

CUSTOM

Flexible date range for specific analysis needs

Report Session Model

Reports are saved as sessions for historical reference:
model ReportSession {
  id           String     @id
  supervisorId String
  supervisor   User
  
  reportType  ReportType @default(CUSTOM)
  title       String?
  periodStart DateTime
  periodEnd   DateTime
  
  // Cached metrics at report generation time
  totalOfficers  Int     @default(0)
  totalUnions    Int     @default(0)
  totalMembers   Int     @default(0)
  totalLoans     Int     @default(0)
  activeLoans    Int     @default(0)
  completedLoans Int     @default(0)
  defaultedLoans Int     @default(0)
  
  totalDisbursed   Decimal @default(0) @db.Decimal(14, 2)
  totalRepaid      Decimal @default(0) @db.Decimal(14, 2)
  totalOutstanding Decimal @default(0) @db.Decimal(14, 2)
  collectionRate   Decimal @default(0) @db.Decimal(5, 2)
  
  // Full report data snapshot
  reportData Json?
  
  // Officer performance breakdown
  officerMetrics Json?
  
  generatedAt DateTime @default(now())
}
Report sessions capture a snapshot of data at generation time, allowing historical comparison even as live data changes.

Accessing Reports

1

Navigate

Click ReportsSupervisor Reports in the sidebar
2

View Dashboard

See real-time dashboard or generate new report
Permission Required: Only Supervisors and Administrators can access the Reports section.

Supervisor Dashboard

Real-time overview of your team’s performance:

Key Metrics

Team Overview

  • Total credit officers under supervision
  • Total unions managed
  • Total union members
  • Active unions count

Loan Portfolio

  • Total loans issued
  • Active loans
  • Completed loans
  • Defaulted loans
  • Loans by status breakdown

Financial Summary

  • Total disbursed (Naira)
  • Total repaid (Naira)
  • Outstanding balance (Naira)
  • Collection rate percentage

Performance Indicators

  • Average loan size
  • Approval rate
  • Default rate
  • Portfolio at risk

Date Range Selection

Choose analysis period:
  • Today - Current day only
  • This Week - Last 7 days
  • This Month - Current calendar month
  • This Quarter - Last 3 months
  • Custom Range - Select specific start and end dates

Generating a New Report

1

Start Generation

On Supervisor Reports page, click Generate Report
2

Select Report Type

Choose from:
  • Daily
  • Weekly
  • Monthly
  • Quarterly
  • Custom
3

Set Date Range

For preset types (DAILY, WEEKLY, etc.):
  • Select the end date
  • System calculates start date automatically
For CUSTOM:
  • Select both start and end dates
4

Add Title (Optional)

Give your report a descriptive nameExample: “January 2024 Performance Review”
5

Generate

Click Generate ReportSystem calculates all metrics and saves report session
6

View Results

Report opens with complete data and visualizations

API Endpoint

// POST /api/supervisor-reports/generate
const generateReport = async (data: {
  supervisorId?: string;  // Admin can specify
  reportType: 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'CUSTOM';
  periodStart: Date;
  periodEnd: Date;
  title?: string;
}) => {
  // Calculates metrics for date range
  // Saves report session
  // Returns complete report data
}

Report Contents

Each generated report includes:

Portfolio Summary

  • Total loans issued in period
  • New loans created
  • Loans approved
  • Loans disbursed
  • Loans completed
  • Loans defaulted
  • Total principal disbursed
  • Total interest earned
  • Processing fees collected

Collection Report

  • Total payments received
  • Total amount collected (Naira)
  • Collection rate (% of expected)
  • Payments on time
  • Late payments
  • Missed payments
  • Average payment amount
  • Collections by method (CASH, TRANSFER, etc.)

Arrears Analysis

  • Number of overdue loans
  • Total overdue amount
  • Overdue by age:
    • 1-30 days
    • 31-60 days
    • 61-90 days
    • 90+ days
  • Portfolio at Risk (PAR) metrics
  • Default rate

Officer Performance

For each credit officer:
  • Name and contact
  • Number of unions managed
  • Number of members
  • Loans processed
  • Total disbursed
  • Collection rate
  • Overdue count
  • New members added
  • Active loans count

Union Performance

For each union:
  • Union name and location
  • Credit officer assigned
  • Total members
  • Active loans
  • Total disbursed
  • Total collected
  • Collection rate
  • Overdue loans
  • Top performers

Viewing Saved Reports

1

Access Report History

On Supervisor Reports page, scroll to Report Sessions
2

Browse Sessions

See list of all previously generated reports with:
  • Report title
  • Report type
  • Date range
  • Generated date
  • Key metrics preview
3

Open Report

Click on any report to view full details

Report List Features

Pagination

Navigate through saved reports (10 per page)

Search

Find reports by title or date

Actions

  • View full report
  • Export to Excel/PDF
  • Delete report

Comparison

Open multiple reports to compare periods

Exporting Reports

Reports can be exported in multiple formats:

Export Options

Excel Export

Full data with multiple sheets:
  • Summary
  • Officer Performance
  • Union Analysis
  • Loan Details
  • Collection Data

PDF Export

Formatted report with:
  • Executive summary
  • Charts and graphs
  • Data tables
  • Printable layout

CSV Export

Raw data for:
  • Custom analysis
  • Import to other tools
  • Database integration

Export Process

1

Open Report

Navigate to the report you want to export
2

Click Export

Click the Export button in report header
3

Choose Format

Select:
  • Excel (.xlsx)
  • PDF (.pdf)
  • CSV (.csv)
4

Download

File downloads automatically to your device
Excel exports include formulas and charts, making them ideal for further analysis

Dashboard Statistics (Real-Time)

Access live metrics without generating a saved report:
// GET /api/supervisor-reports/dashboard?supervisorId=xxx&periodStart=2024-01-01&periodEnd=2024-12-31
const getDashboard = async (params: {
  supervisorId?: string;  // Admin can view any supervisor
  periodStart?: Date;
  periodEnd?: Date;
}) => {
  return {
    summary: {
      totalOfficers: number;
      totalUnions: number;
      totalMembers: number;
      totalLoans: number;
      activeLoans: number;
      // ... more metrics
    },
    officers: Array<{
      id: string;
      name: string;
      metrics: {
        unionsCount: number;
        membersCount: number;
        loansCount: number;
        // ... performance data
      }
    }>,
    unions: Array<{
      id: string;
      name: string;
      officer: string;
      metrics: {
        // ... union data
      }
    }>,
    trends: {
      // ... time-series data
    }
  };
}

Key Performance Indicators (KPIs)

Collection Rate

collectionRate = (totalRepaid / totalDisbursed) × 100
Interpretation:
  • 90-100% - Excellent collection performance
  • 80-89% - Good, room for improvement
  • 70-79% - Needs attention
  • Below 70% - Critical, immediate action required

Portfolio at Risk (PAR)

PAR30 = (outstandingBalanceOfLoansOverdue30Days / totalOutstandingBalance) × 100
Thresholds:
  • 0-5% - Healthy portfolio
  • 5-10% - Monitor closely
  • 10-15% - Take corrective action
  • Above 15% - Portfolio in danger

Default Rate

defaultRate = (defaultedLoans / totalLoans) × 100
Target: Keep below 5%

Officer Productivity

  • Loans per Officer = Total Loans / Number of Officers
  • Disbursement per Officer = Total Disbursed / Number of Officers
  • Members per Officer = Total Members / Number of Officers
Use for workload balancing and performance reviews

Credit Officer Metrics

View detailed performance for individual officers:

Access Officer Details

1

From Report

In any generated report, click on an officer’s name
2

View Metrics

See complete officer profile:
  • Personal information
  • Assigned unions list
  • Member count
  • Loan portfolio
  • Collection performance
  • Trend charts

Officer Metrics Include

Portfolio Size

  • Total loans managed
  • Total principal disbursed
  • Outstanding balance
  • Average loan size

Collection Performance

  • Collection rate
  • On-time payments
  • Late payments
  • Overdue loans

Activity Metrics

  • New loans created
  • Loans approved
  • Loans disbursed
  • Repayments recorded

Member Management

  • New members added
  • Total members
  • Member verification rate
  • Member satisfaction

Union-Level Reports

Analyze performance by union:

Top Performers

Unions with:
  • Highest collection rates
  • Most loans
  • Best payment history
  • Lowest default rates

Needs Attention

Unions with:
  • Low collection rates
  • High overdue amounts
  • Increasing defaults
  • Member complaints

Union Comparison

Compare multiple unions side-by-side:
  • Collection rates
  • Loan volumes
  • Member growth
  • Default rates
  • Average loan sizes

Best Practices

Regular Review

  • Generate weekly reports every Monday
  • Monthly reports at month-end
  • Quarterly reviews for strategic planning
  • Compare period-over-period trends

Action Items

  • Document findings in report notes
  • Create action plans for issues
  • Follow up on low-performing officers
  • Recognize high performers

Data-Driven Decisions

  • Use metrics to guide training needs
  • Identify process improvements
  • Allocate resources based on data
  • Set realistic targets

Communication

  • Share reports with your team
  • Discuss trends in meetings
  • Provide constructive feedback
  • Celebrate successes

Troubleshooting

Check:
  • Your role is Supervisor or Administrator
  • You have active credit officers under you
  • You’re logged in correctly
Solution: Contact administrator to verify role
Possible causes:
  • Date range too large (try smaller period)
  • No data in selected period
  • System error
Solution:
  • Try different date range
  • Check if data exists for period
  • Refresh page and retry
Explanation:
  • Dashboard shows real-time data
  • Reports are snapshots at generation time
  • Data changes between generation and viewing
Solution: Generate new report for latest data
Check:
  • Pop-up blocker settings
  • Browser download permissions
  • Sufficient disk space
Solution:
  • Allow pop-ups from the site
  • Check browser downloads folder
  • Try different browser
Reasons:
  • Officer has no activity in period
  • Officer was added after report period
  • Officer not assigned to you as supervisor
Solution: Verify officer assignment and activity dates

API Reference

// Get real-time dashboard
GET /api/supervisor-reports/dashboard?supervisorId=xxx&periodStart=2024-01-01&periodEnd=2024-12-31

// Generate new report session
POST /api/supervisor-reports/generate
Body: {
  supervisorId?: string;  // Admin only
  reportType: 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'CUSTOM';
  periodStart: Date;
  periodEnd: Date;
  title?: string;
}

// Get all report sessions
GET /api/supervisor-reports/sessions?supervisorId=xxx&page=1&limit=10

// Get report session by ID
GET /api/supervisor-reports/sessions/:id?supervisorId=xxx

// Delete report session
DELETE /api/supervisor-reports/sessions/:id

// Get credit officers under supervisor
GET /api/supervisor-reports/officers?supervisorId=xxx

Summary

Reporting provides:
  • ✅ 5 report types (DAILY, WEEKLY, MONTHLY, QUARTERLY, CUSTOM)
  • ✅ Real-time supervisor dashboard
  • ✅ Saved report sessions
  • ✅ Officer performance metrics
  • ✅ Union-level analysis
  • ✅ Portfolio health indicators (PAR, collection rate, default rate)
  • ✅ Export to Excel, PDF, and CSV
  • ✅ Historical comparison
  • ✅ Role-based access (Supervisor/Admin only)
  • ✅ Comprehensive KPI tracking

Next Steps

Build docs developers (and LLMs) love