How aadi007kumar/lost_found_ai_app works
Reunite is a lost-and-found reporting and matching web app. People submit lost or found reports with item details, location, date, contact information and an optional photo; the server validates and saves the report, enriches it with AI captioning and embeddings, then redirects to its report page. That page retrieves fresh opposite-type matches and nearby reports, exposing contact details for follow-up. The README documents the external AI, photo-storage and database services; unsampled schema and nearby-card implementation are represented by their exact tree paths.
Main entry points: page.tsx Report Detail · actions.ts Create Report · ReportForm.tsx Report Form · matching.ts Match Search and Scoring
Components 23
Reporting
- Home Page
src/app/page.tsx - Report Page
src/app/report/page.tsx - Report Form
src/components/ReportForm.tsx - Photo Picker
src/components/PhotoDrop.tsx - Create Report
src/app/actions.ts
AI Matching
- Match Search and Scoring
src/lib/matching.ts - Photo Captioning
src/lib/ai/groq.ts - Text Embeddings
src/lib/ai/embed.ts
Report Views
- Report Detail
src/app/items/[id]/page.tsx - Match Card
src/components/MatchCard.tsx - Nearby Card
src/components/NearbyCard.tsx - Posted Notice
src/components/PostedNotice.tsx - Button Controls
src/components/Button.tsx
Data and Integrations
- Photo Upload
src/lib/blob.ts - Item Data Access
src/lib/db.ts - Items and Vectors
db/schema.sql - Date and Phone Formatting
src/lib/format.ts - Report Choices
src/lib/constants.ts
Other components
- Person
- Neon Postgres
- Vercel Blob
- Groq Vision API
- Cloudflare Workers AI
Connections 28
- Person → Home Page: opens
src/app/page.tsx - Home Page → Button Controls: renders links
src/app/page.tsx - Person → Report Page: starts report
README.md - Report Page → Report Form: renders form
src/app/report/page.tsx - Report Form → Photo Picker: uses picker
src/components/ReportForm.tsx - Report Form → Create Report: submits form
src/components/ReportForm.tsx - Report Form → Report Choices: loads choices
src/components/ReportForm.tsx - Report Form → Button Controls: renders control
src/components/ReportForm.tsx - Create Report → Photo Upload: uploads photo
src/app/actions.ts - Create Report → Match Search and Scoring: enriches report
src/app/actions.ts - Create Report → Item Data Access: inserts report
src/app/actions.ts - Create Report → Date and Phone Formatting: checks date
src/app/actions.ts - Create Report → Report Choices: validates choices
src/app/actions.ts - Photo Upload → Vercel Blob: stores photo
README.md - Match Search and Scoring → Photo Captioning: requests caption
src/lib/matching.ts - Match Search and Scoring → Text Embeddings: creates vector
src/lib/matching.ts - Match Search and Scoring → Item Data Access: queries candidates
src/lib/matching.ts - Photo Captioning → Groq Vision API: calls vision API
README.md - Text Embeddings → Cloudflare Workers AI: creates embeddings
README.md - Item Data Access → Neon Postgres: queries database
README.md - Items and Vectors → Neon Postgres: defines storage
README.md - Report Detail → Item Data Access: loads report
src/app/items/[id]/page.tsx - Report Detail → Match Search and Scoring: finds matches
src/app/items/[id]/page.tsx - Report Detail → Match Card: renders matches
src/app/items/[id]/page.tsx - Report Detail → Nearby Card: renders nearby
src/app/items/[id]/page.tsx - Report Detail → Posted Notice: shows posted notice
src/app/items/[id]/page.tsx - Report Detail → Button Controls: renders report link
src/app/items/[id]/page.tsx - Match Card → Date and Phone Formatting: formats details
src/components/MatchCard.tsx