# Nigeria Procurement Watch — Dashboard
A data-driven dashboard that monitors awarded public contracts in Nigeria, highlights statistical anomalies, and ranks ministries by procurement risk. It helps researchers, journalists, and civic technologists quickly spot procurement patterns that warrant further verification.
- Built with TypeScript and Next.js (App Router).
- Data served from Supabase (Postgres + Row-Level Security).
- Visual components for metrics, recent findings, and an agency leaderboard.
## Quick links
- Live demo:
nigeria-procurement-watch.v…
- Methodology: /methodology (in-repo)
- Agent and tooling notes: AGENTS.md, CLAUDE.md
## Features
- National procurement overview with rolling weekly snapshots.
- Agency risk leaderboard (ranked by anomaly density / ARS score).
- Recent findings feed with links to flagged contracts and contextual metadata.
- Aggregated KPIs: contracts tracked, anomalies flagged, high-risk agencies, total flagged value (NGN).
- Extensible detectors and methodology documented in the repo.
## Stack
- Language: TypeScript (primary), small JS/CSS surface
- Framework: Next.js (App Router)
- Notable libraries:
- @supabase/supabase-js — database + auth client
- React + lucide-react — UI components & icons
- Recharts — charts/visualization
- Tailwind CSS — styling
## How it works (runtime)
On the server (Next.js route / page), the app queries Supabase for the latest analysis week, ministry scores, contract counts, flagged findings and aggregates. The page composes these into metric cards, a leaderboard and a findings feed. Data fetching is server-side with periodic revalidation (revalidate = 300s).
Key DB sources observed in code:
- ministry_scores — weekly ARS scores and banding per ministry
- ministries — ministry metadata (name, slug, sector)
- contracts — awarded contract records and values (value_ngn)
- anomaly_findings — detector outputs referencing contract_ids and detection metadata
## Getting started (dev …