A modern Next.js web interface for searching UK legislation and caselaw built with shadcn/ui and Tailwind CSS.
- 🔍 Legislation Search - Search through 125K+ UK laws from 1963-present
- ⚖️ Caselaw Search - Semantic search across 1.9M+ court cases from 2001-present
- 🎨 Modern UI - Built with shadcn/ui components and Tailwind CSS
- 📱 Responsive - Mobile-first design with collapsible sidebar
- 🌙 Dark Mode - Automatic dark mode support
- Bun v1.0+
- Lex backend API running on
localhost:8000
# Install dependencies
bun install
# Run development server
bun dev
# Build for production
bun run build
# Start production server
bun startOpen http://localhost:3000 to view the app.
The frontend connects to the Lex backend API. You can use either:
Set the public API endpoint in .env.local:
NEXT_PUBLIC_API_URL=https://lex.lab.i.ai.gov.ukDefault configuration connects to http://localhost:8000:
NEXT_PUBLIC_API_URL=http://localhost:8000Make sure the backend is running before starting the frontend.
- Legislation:
POST /legislation/search - Caselaw:
POST /caselaw/search
app/
├── src/
│ ├── app/ # Next.js app router pages
│ │ ├── page.tsx # Home page
│ │ ├── legislation/ # Legislation search
│ │ └── caselaw/ # Caselaw search
│ ├── components/
│ │ ├── ui/ # shadcn/ui components
│ │ ├── app-sidebar.tsx # Main sidebar navigation
│ │ └── ...
│ └── lib/
│ └── utils.ts # Utility functions
└── public/ # Static assets
This app uses:
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS v4
- Components: shadcn/ui
- Icons: Lucide React
- Runtime: Bun
bunx shadcn@latest add [component-name]Edit src/components/app-sidebar.tsx to modify sidebar navigation items.
- Legislation:
src/app/legislation/page.tsx - Caselaw:
src/app/caselaw/page.tsx
MIT - See root LICENSE file