Skip to content

freelawproject/citator-demo

Repository files navigation

Citator Demo

Static demo site for the Free Law Project citator. The site previews how citator integration into CourtListener will look once shipped: per-opinion treatment summaries, browsable Authorities and Cited By views, and validation indicators against an expert benchmark.

Status: in active development. Demo target: 2026-05-20. Tracking issue: #1.

What this is

The site is decoupled from CL's backend for build-speed reasons but is designed to mirror CL's eventual production UX. Inputs are pre-computed inference outputs (from the citator pipeline in freelawproject/ai-research) plus expert benchmark labels; outputs are static HTML.

For the design rationale, treatment taxonomy, validation indicator behaviour, and full architectural detail, see the design doc: citator_launch_plan/demo_site_design.md.

Stack

  • Eleventy — static site generator (Nunjucks templates).
  • Tailwind CSS — styling, configured to match the new CourtListener front-end design.
  • Alpine.js — small client-side interactivity (tabs, inline expand, quick filter).
  • Pythonscripts/build_data.py transforms inference output CSVs into per-opinion JSON files Eleventy consumes.

Hosted on Netlify, mirroring the deploy pattern of free.law.

Development

Prerequisites: Node 20+, Python 3.13+, uv (Python package manager).

# install Node deps
npm install

# install Python deps (only needed when running build_data.py)
uv sync

# build once
npm run build

# dev server with hot reload at http://localhost:8080
npm run dev

Project layout

citator-demo/
├── _data/             # JSON files consumed by templates (generated by build_data.py)
│   └── opinions/      # one .json per scoped opinion
├── _includes/         # partials (layouts, components)
├── assets/
│   ├── css/styles.css # Tailwind input
│   └── js/            # Alpine.js bundle (copied from node_modules at build)
├── data-source/       # gitignored — raw CSVs copied in from ai-research
├── scripts/
│   └── build_data.py  # CSV → JSON transformer
├── src/               # page templates
└── _site/             # build output (gitignored)

Data sync

Data flows from freelawproject/ai-research (specifically experiments_05012026/data/) into this repo manually:

  1. Copy the relevant CSVs into data-source/ (gitignored).
  2. Run npm run build:data to regenerate _data/opinions/*.json and _data/index.json.
  3. Commit any tracked output that should be kept.

License

BSD-2-Clause. See LICENSE.

About

A static demo site that lets domain experts try out the Citator before production rollout

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors