Skip to content

OpenJustice-org/openjustice-docs

OpenJustice Documentation

Welcome to the official documentation for OpenJustice — a pan-African Digital Public Good for law enforcement agencies across Africa.

What is OpenJustice?

OpenJustice is a production-ready, open-source criminal record management system built with modern technologies:

  • Backend: NestJS 11 (TypeScript) with 24 modules and 187+ files
  • Frontend: Next.js 16 (App Router) with 69 reusable components
  • Database: PostgreSQL 15+ with Prisma ORM (32 models)
  • Architecture: Service-Repository pattern, offline-first PWA

License: MIT (Open Source) Target Pilot: Sierra Leone Police Force Multi-Country Ready: Configurable for any African country

Key features

Case Management — Track criminal cases from open to closed ✅ Person Records — Manage suspects, victims, witnesses with encrypted PII ✅ Evidence Tracking — Chain of custody with QR codes and file storage ✅ Background Checks — Officer and citizen background verification ✅ Amber Alerts & Wanted Persons — Public safety alert system ✅ GeoCrime Analytics — Spatial crime tracking with heatmaps ✅ Inter-Agency Integration — API and webhook system for courts, prisons, immigration ✅ Dual-Channel Field Tools — USSD (feature phones) + WhatsApp (smartphones) ✅ Offline-First PWA — Works without internet, syncs when online ✅ Role-Based Access Control — 6 default roles with granular permissions ✅ Audit Logging — Immutable audit trail for all operations ✅ Multi-Country Adaptable — Configuration-based customization

Documentation sections

What OpenJustice is, its Digital Public Good status, use cases, and pan-African scope.

Install and run the backend and frontend.

System architecture, design patterns, authentication, RBAC, offline sync, and integrations.

Endpoint documentation for all 24 modules with request/response examples.

Deployment, configuration, administration, development, integrations, and troubleshooting.

UI components, PWA, offline mode, and mobile responsiveness.

Glossary, database schema, environment variables, FAQ, and changelog.

Quick links

First Time Here?

  1. What is OpenJustice?
  2. Installation Guide
  3. Quick Start: Backend
  4. Quick Start: Frontend

Deploying OpenJustice?

  1. Production Deployment
  2. Country Customization
  3. Environment Variables

Contributing?

  1. Project Structure
  2. Contributing Guide
  3. Creating Modules

Pan-African Digital Public Good

OpenJustice is a reusable, adaptable platform that any African country can adopt. The architecture supports:

  • Multiple national ID systems (NIN, Ghana Card, Huduma Namba, etc.)
  • Different legal frameworks (configurable offense categories, case workflows)
  • Multi-language support (English, French, Portuguese, Arabic, Swahili, etc.)
  • Low-connectivity environments (offline-first, USSD for 2G/3G networks)
  • Country-specific integrations (telecom providers, court systems, national registries)

Sierra Leone is the reference implementation, but the system is built for continental scale.

Technology stack

Backend (openjustice-server)

  • Framework: NestJS 11.2.0 (TypeScript 5.7)
  • Database: PostgreSQL 15+ with Prisma 7.0
  • Authentication: JWT with PIN-based login, MFA support
  • Storage: S3-compatible (MinIO/AWS S3)
  • Cache: Redis for sessions and rate limiting
  • Task Scheduling: @nestjs/schedule for cron jobs
  • Testing: Jest for unit and integration tests

Frontend (openjustice-client)

  • Framework: Next.js 16 (App Router)
  • UI Library: React 19.2, shadcn/ui components
  • Styling: Tailwind CSS 4
  • Forms: React Hook Form + Zod validation
  • Maps: Leaflet for GeoCrime visualization
  • Offline: Service Worker + IndexedDB
  • PWA: Installable on mobile and desktop

DevOps

  • Containerization: Docker + Docker Compose
  • CI/CD: GitHub Actions (planned)
  • Monitoring: Logging with structured logs
  • Deployment: Ubuntu Server 22.04 LTS (recommended)

Support and community

Contributing

OpenJustice is open source and welcomes contributions from developers across Africa and beyond. See our Contributing Guide for details.


Built for law enforcement agencies across Africa

Version 1.0.0 | Last Updated: February 2026

About

Documentation for OpenJustice

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors