OpenDAIL is a web application for analyzing and exploring AI litigation cases from the DAIL database. It combines a FastAPI backend with a React frontend to provide AI-powered querying, interactive charts, and comprehensive case management.
- Natural language to SQL conversion using Ollama LLM(Uses gpt oss 120B which is open source)
- Ask questions about case data in plain English
- Automatic SQL query generation and execution
- Results transformed into chart-ready formats
- Real-time charts and visualizations using Recharts
- Temporal analysis of case data
- Multiple chart types: bar, line, pie, and donut charts
- Summary statistics and lifecycle analysis
- Conversational interface for querying case data
- Real-time responses with streaming indicators
- Inline chart rendering from query results
- Natural language interaction with the database
- Browse all cases in a searchable table view
- Advanced filtering by multiple columns
- Date range filtering for temporal queries
- Collapsible filter panel for easy access
- Comprehensive case information display
- Case overview and significance summary
- Metadata: jurisdiction, dates, status, researcher
- Classifications: areas of application, issues, causes of action, algorithms
- Secondary sources with external links
- Generate filtered statistics and visualizations
- Apply multiple filters before processing
- Visual charts based on filtered data
- Empty state handling for no-match queries
- FastAPI - Modern Python web framework
- SQLite - Lightweight database for case storage
- Ollama - Local LLM for natural language processing
- React Router - Full-stack React framework
- Recharts - Composable charting library
- Tailwind CSS - Utility-first CSS framework
- Shadcn/UI - Reusable component library
- MUI - Material UI component library
- Python 3.10+
- Node.js 18+
- Ollama server running locally
cd backend
pip install -r requirements.txt
python main.pyThe backend runs on http://localhost:5174
cd frontend
npm install
npm run devThe frontend runs on http://localhost:5173
GET /api/dashboard- Get chart data and temporal analysisGET /api/cases- Get all cases with optional filtersGET /api/case/{case_id}- Get detailed case informationGET /api/diagrams- Get filtered diagram data
POST /api/agents/process- Process natural language queryGET /api/agents/crews- Get available agent crews
DefinitelyNotAI/
├── backend/
│ ├── agents/
│ │ └── tools/
│ │ └── sql_tools.py # SQL execution utilities
│ ├── routes/
│ │ ├── agents.py # AI agent endpoints
│ │ └── dashboard.py # Dashboard endpoints
│ ├── utils/
│ │ └── dashboard_utils/
│ │ └── analyse_data.py # Data analysis utilities
│ └── main.py # FastAPI application
└── frontend/
├── app/
│ ├── api/ # API client functions
│ ├── components/ # React components
│ │ ├── ai-elements/ # AI chat components
│ │ ├── charts/ # Chart components
│ │ ├── home/ # Home page components
│ │ └── ui/ # UI components
│ ├── routes/ # Page routes
│ └── types/ # TypeScript types
└── package.json
- Home Dashboard - View charts and ask AI questions about the data
- All Cases - Browse and filter through all cases
- Case Details - Click on any case to see full details
- Diagrams - Apply filters and generate custom visualizations
- Chat - Have a conversation with the AI about case data
We used AI coding tools including OpenCode and Cursor alongside writing code ourselves, and leveraged Claude, Gemini, and ChatGPT for research throughout the process.
Demo link - Demo video OpenDAIL