A web application for browsing, searching, and analyzing declassified UAP/UFO documents. Built with Next.js, Supabase, and Tailwind CSS.
- Dashboard — Stats overview with charts showing document counts by agency, type, sensor, and classification level
- Document Browser — Filterable, paginated list of all documents with search
- Document Detail — Full metadata, AI-generated analysis, cross-references, and extracted text
- Map View — Interactive Leaflet map with clustered markers for geolocated sightings
- Timeline — Chronological view of documents grouped by year, filterable by date type
- Full-Text Search — PostgreSQL tsvector search with weighted results and ILIKE fallback
- AI Analysis — One-click Claude API analysis that extracts structured metadata from document text
- Framework: Next.js 14 (App Router)
- Database: Supabase (PostgreSQL)
- Styling: Tailwind CSS (dark theme)
- Maps: Leaflet + react-leaflet with marker clustering
- Charts: Recharts
- AI: Claude API (Anthropic)
- Hosting: Vercel
cd web
npm installGo to supabase.com, create a new project, then run the schema migration. In the Supabase dashboard, go to SQL Editor and paste the contents of supabase/migrations/001_schema.sql, then click Run.
Copy the example env file and fill in your keys:
cp .env.local.example .env.localEdit .env.local with your values:
NEXT_PUBLIC_SUPABASE_URL— from Supabase project settings > APINEXT_PUBLIC_SUPABASE_ANON_KEY— from Supabase project settings > APISUPABASE_SERVICE_ROLE_KEY— from Supabase project settings > API (keep secret)ANTHROPIC_API_KEY— from console.anthropic.com (optional, for AI analysis)
The seed script reads existing JSON data files and pushes them to Supabase:
pip install requests
python supabase/seed.pyThis loads documents from ../dashboard/uap_data.json, ../dashboard/data/documents.json, video and image metadata, cross-references, and extracted text files.
npm run devOpen http://localhost:3000.
Push to GitHub and import the repository in vercel.com. Set the same environment variables in the Vercel project settings. The root directory should be set to web.
web/
src/
app/
page.tsx # Dashboard
documents/
page.tsx # Document browser
[id]/page.tsx # Document detail
map/page.tsx # Map view
timeline/page.tsx # Timeline view
search/page.tsx # Full-text search
api/
documents/ # GET list, GET single
search/ # Full-text search endpoint
map-data/ # Geolocated documents
timeline/ # Timeline entries
stats/ # Dashboard statistics
crossrefs/ # Cross-references
analyze/ # Claude AI analysis (POST)
components/
Sidebar.tsx # Navigation sidebar
DocumentCard.tsx # Document card component
MapView.tsx # Leaflet map with clustering
DashboardCharts.tsx # Recharts dashboard charts
FilterBar.tsx # Agency/type filters
SearchBar.tsx # Search input
StatCard.tsx # Statistics card
lib/
supabase.ts # Supabase client (browser + server)
types.ts # TypeScript interfaces
supabase/
migrations/
001_schema.sql # Database schema
seed.py # Data migration script
All API routes return JSON.
| Method | Path | Description |
|---|---|---|
| GET | /api/documents?page=0&limit=24&agency=... |
List documents with filters |
| GET | /api/documents/[id] |
Single document with crossrefs and text |
| GET | /api/search?q=... |
Full-text search |
| GET | /api/map-data |
Documents with coordinates |
| GET | /api/timeline |
Timeline entries |
| GET | /api/stats |
Dashboard statistics |
| GET | /api/crossrefs/[id] |
Cross-references for a document |
| POST | /api/analyze/[id] |
Trigger Claude AI analysis |