NYCLegal helps lawyers quickly review possible cases against New York City by turning messy city incident records into clear timelines and short case summaries for faster intake.
The platform is built for municipal liability intake and early case review. A user can search an address, review incident history tied to that location, place a client's incident date into that history, and generate a concise AI-assisted screening summary to support early evaluation.
- Address-based search for NYC incident records
- Normalized location results so inconsistent public records are easier to review
- Map view for geographic context
- Chronological timeline of reported and closed incidents
- Client incident date comparison against prior incident history
- AI-assisted preliminary case-screening summary based on the timeline
NYCLegal is not a substitute for legal judgment. It is designed to give lawyers and intake teams a faster, clearer starting point.
- Frontend: React, Vite, TypeScript, Tailwind CSS
- Backend: FastAPI, Python
- Auth: Supabase Auth with Google OAuth
- Data: PostgreSQL-compatible database plus normalized incident records
- AI: OpenAI for preliminary liability summaries
- Maps: MapTiler / MapLibre
frontend/: React dashboardbackend/: FastAPI API and data import scripts.env.example: combined local environment referencefrontend/.env.example: frontend-only environment templatebackend/.env.example: backend-only environment template
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reloadBackend runs on http://localhost:8000.
cd frontend
npm install
cp .env.example .env
npm run devFrontend runs on http://localhost:5173.
Required for the full app experience:
VITE_API_BASE_URL=http://localhost:8000
VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=
VITE_MAPTILER_API_KEY=Optional:
VITE_MAP_STYLE_URL=Notes:
VITE_API_BASE_URLshould point to the FastAPI backend.VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEYare required for authentication.VITE_MAPTILER_API_KEYenables the map.VITE_MAP_STYLE_URLcan override the default MapTiler style URL if needed.
BACKEND_FRONTEND_ORIGIN=http://localhost:5173
BACKEND_SUPABASE_URL=
BACKEND_SUPABASE_SERVICE_ROLE_KEY=
BACKEND_DATABASE_URL=
BACKEND_OPENAI_API_KEY=
BACKEND_OPENAI_MODEL=gpt-5-miniNotes:
BACKEND_FRONTEND_ORIGINshould match the frontend dev URL.BACKEND_SUPABASE_URLis required for token verification.BACKEND_SUPABASE_SERVICE_ROLE_KEYis included for deployments or future backend Supabase operations.BACKEND_DATABASE_URLis required for incident lookup and timeline queries.BACKEND_OPENAI_API_KEYandBACKEND_OPENAI_MODELpower the AI liability summary.
NYCLegal uses Supabase Auth with Google OAuth:
- Create a Supabase project.
- Enable Google under
Authentication > Providers. - Add your frontend URL to Supabase redirect URLs.
- Put the Supabase project URL and anon key in
frontend/.env. - Put the Supabase project URL in
backend/.env.
The frontend authenticates users with Supabase, then sends the bearer token to FastAPI. The backend verifies the token against Supabase JWKS before serving protected endpoints.
