Skip to content

noamrazbuilds/legal-spend-analytics

Repository files navigation

Legal Matter & Spend Analytics Dashboard

Track legal department workload, matter types, cycle times, outside counsel spend, and team utilization -- with interactive charts and filterable views.

Getting Started

Use the hosted version

Visit: https://legal-spend-analytics.up.railway.app

Run locally

./start.sh        # macOS / Linux
start.bat          # Windows

This creates a virtual environment, installs dependencies, starts the API and dashboard, and opens your browser. Requires Python 3.11+.

Run with Docker

docker compose up

Open http://localhost:8501.

Deploy Your Own

  1. Fork this repo on GitHub
  2. Create a Railway account
  3. New Project > Deploy from GitHub repo
  4. Railway auto-detects Dockerfile.railway and deploys

Features

  • Data import from CSV/spreadsheet files
  • Key metrics: matters opened/closed, average cycle time, outside counsel spend, internal hours, request volume by business unit
  • Interactive visualizations: trend lines, breakdown charts, cycle time distributions
  • Filterable views with drill-down by matter type, team member, and business unit
  • Budget vs. actual tracking per matter and outside counsel firm
  • Exportable charts for executive presentations

For Developers

API documentation

Start the API server and visit http://localhost:8000/docs for the interactive Swagger UI.

Project structure

lsa_app/          FastAPI backend (API, models, services)
lsa_frontend/     Streamlit frontend (calls API via HTTP)
data/sample/      Synthetic sample data for testing
tests/            pytest test suite

Running tests

pip install ".[dev]"
pytest

Tech stack

  • Python 3.11+, FastAPI, Uvicorn
  • SQLAlchemy 2.0 with SQLite
  • Pydantic v2
  • Streamlit, Plotly
  • Docker, Railway

License

MIT -- Copyright (c) 2026 Noam Raz and Pleasant Secret Labs

About

Analytics dashboard for in-house legal teams to track matter workload, outside counsel spend, cycle times, and team utilization with interactive charts and CSV/Excel import.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors