JusticeEase is a full-stack web application designed to democratize legal literacy by translating unstructured law documents into an easily searchable, structured digital repository. Focused on the Pakistan Penal Code (PPC), the platform allows users to explore complex legal statutes using regular, everyday language with absolute confidence.
The system operates across three tightly integrated tiers: data ingestion, application runtime backend infrastructure, and a responsive frontend interface.
The comprehensive operational pipeline is outlined in the diagram below:
Data Ingestion Pipeline (ETL): Raw unstructured texts extracted from legal source documents (e.g., Pakistan Penal Code.pdf) are routed through a node-based parser utility (extract.js). The raw data is transformed into a structured JSON database fixture lawsData.json. This manifest is then processed by a database hydration script (seed.mongodb.js) to systematically seed the production database collections.
Application Request Lifecycle:
Presentation Tier: The client fires asynchronous HTTP queries initiated through a search component (Home.jsx) or via the core Axios configuration wrapper (api.js).
Logic Tier: Requests hit the Express entryway server gateway (server.js), which processes endpoints managed under specific pipelines (LawRoutes.js). The traffic lands on specialized request handlers (lawController.js) tasked with parsing, sanitizing, and implementing legal keyword queries.
Data Tier: The controllers interface with the data layout using Mongoose database abstractions (Law.js), requesting indexed JSON queries directly from the MongoDB engine with lookup latency benchmarks operating under 50ms.
The primary gateway introduces the portal identity, featuring clean navigation pathways and an elegant, themed context designed around high accessibility.
Queries return clean UI grids showcasing granular law segments parsed directly out of multi-page data sources.
Data is managed inside MongoDB collections using strict validation schemas configured inside Mongoose models.
Law text targets are broken down from document nodes directly into individual objects inside the laws database collection.
User records hold access controls using highly secure encrypted hashing mechanisms to ensure safe platform authorization workflows.
Figure 5: Secured users schema containing generated object identifiers, unique account emails, and pre-encrypted character passwords.
The application backend exposes secure REST endpoints, verified here through structural execution testing using API client platforms.
Endpoint: POST /api/auth/register
Payload Type: application/json
Endpoint: POST /api/auth/login
Payload Type: application/json
Node.js (v18+ recommended)
MongoDB Instance (Local Community Server or Atlas Cluster)
Navigate to the backend workspace directory:
Bash cd justice-backend Install code dependency manifests:
Bash npm install Initialize the development server:
Bash npm run dev
Open a new terminal matrix workspace and switch directories:
Bash cd justice-frontend Install UI packages and modules:
Bash npm install Boot the local presentation runtime client server:
Bash npm run dev






