Track legal department workload, matter types, cycle times, outside counsel spend, and team utilization -- with interactive charts and filterable views.
Visit: https://legal-spend-analytics.up.railway.app
./start.sh # macOS / Linux
start.bat # WindowsThis creates a virtual environment, installs dependencies, starts the API and dashboard, and opens your browser. Requires Python 3.11+.
docker compose upOpen http://localhost:8501.
- Fork this repo on GitHub
- Create a Railway account
- New Project > Deploy from GitHub repo
- Railway auto-detects
Dockerfile.railwayand deploys
- 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
Start the API server and visit http://localhost:8000/docs for the interactive Swagger UI.
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
pip install ".[dev]"
pytest- Python 3.11+, FastAPI, Uvicorn
- SQLAlchemy 2.0 with SQLite
- Pydantic v2
- Streamlit, Plotly
- Docker, Railway
MIT -- Copyright (c) 2026 Noam Raz and Pleasant Secret Labs