Home
OpenJustice: AI for Laws

OpenJustice

An open-source legal AI platform that makes legal reasoning transparent and usable for professionals.

Overview

OpenJustice is an open-source legal AI platform designed to make legal reasoning explainable, transparent, and accessible. It allows lawyers, researchers, and policymakers to explore case outcomes through structured dialog flows that simulate professional reasoning.

The platform combines modern language models with legal expertise to reason through claims such as constructive dismissal, contract disputes, and employment law while keeping every decision traceable.

OpenJustice is a no-code platform that mimicks how legal professionals reason through problems

Tech Stack

Core Platform

Language

TypeScript

Core development language across backend and frontend.

Backend Framework

NestJS

Modular server framework using Domain-Driven Design and microservice architecture.

AI & Reasoning Layer

AI Orchestration

Agentic RAG Pipeline

Retrieves legal materials, performs reasoning with citations and confidence scores.

LLM Integration

GPT, LLAMA APIs

Powers legal reasoning, parsing, and citation generation.

Dialog Flow

Start, Extractor, Switch, Reasoning, Outcome

Nodes represent workflow stages for structured reasoning.

Memory

Facts Dictionary

Acts as in-memory knowledge base for facts, citations, and conclusions.

Data & Storage

Vector Database

Qdrant (current), Pinecone (earlier)

Stores legal document embeddings and metadata for semantic retrieval.

ORM / Schema Management

Drizzle ORM

Schema definitions, migrations, and type-safe database access.

File / Blob Storage

Microsoft Azure

Stores user uploads and normalized document sets.

Reactive Programming

RxJS Observables

Handles streaming updates and real-time output (SSE).

Infrastructure & Deployment

Containerization

Docker, Docker Compose

Local development and deployment consistency.

Inter-service Communication

NestJS message patterns, HTTP

Connects reasoning and retrieval services.

Frontend & Security

Frontend Framework

React, Next.js

Frontend not confirmed, but consistent with TypeScript usage.

Security / Compliance

Role-based access, SOC2 Type 2

Protects sensitive legal data, ensures compliance.

My Contributions

Forward Deployed Engineer

June 2025 - Present
  • In one month developed OpenJustice version 2 from scratch with my co-developer, creating a RAG agentic workflow with 100+ Canadian case law documents and logic that reflects a legal professional's
  • Generated responses that closely resemble a lawyer's by translating the reasoning process that lawyers use into programmable logic via 5 nodes: start node, fact node, reasoning node, switch node, and output node
  • Creating a 30 page comprehensive guidebook for venture capital and NSERC partners, as well as new OpenJustice employees, containing introductory (mission statement, values, problem scope) and system-level (architecture, RAG workflow, logic) information
  • Constantly improving OpenJustice through feedback from NSERC partners at top law firms and 30 law students, helping both groups navigate the platform and addressing the painpoints they encounter

Capstone Project

September 2024 - April 2025
  • Collaborated with 3 other computer engineering students to resolve high priority GitHub issues, implementing TextGrad and feedback mechanisms
  • Read 10+ research papers on reinforcement learning with AI (RLAI) and completed the CourseEra course to understand industry best practices and promising research ideas
  • Improved response accuracy by 7% by developing an RLAI implementation script using open-source code and the proximal policy optimization algorithm