How hnam10/foundit works
Foundit is a campus lost-and-found platform. Students browse items and submit claims; security staff report and manage found items, review claims, and coordinate release. The graph covers the documented item, claim, matching, identity, notification, and photo-report flows. Connections use README statements or source-index references and excerpts; some routes and UI modules were not sampled, so their internal links are left out.
Main entry points: claims.ts Claim workflow · index.ts API router · items.ts Item browsing · ingest.ts Embedding ingestion
Components 21
Web experience
- Role-based pages
foundit-ui/app - API client
foundit-ui/lib/api/client.ts - Session utilities
foundit-ui/utils/auth.ts
API and identity
- Item browsing
backend/src/routes/items.ts - Claim workflow
backend/src/routes/claims.ts - Account and login
backend/src/routes/auth.ts - Photo sessions
backend/src/routes/photoSessions.ts - Report links
backend/src/routes/reportLinks.ts - API router
backend/src/index.ts
Item recovery
- Embedding ingestion
backend/src/lib/matching/ingest.ts - Text and image embeddings
backend/src/lib/matching/embeddings.ts - Match suggestions
backend/src/lib/matching/suggestions.ts - Search text builders
backend/src/lib/matching/searchText.ts
Platform services
- Application database
backend/src/db.ts - In-app notifications
backend/src/lib/notifications.ts - Email delivery
backend/src/lib/email.ts - Claim email notices
backend/src/lib/claimEmailNotifications.ts - Image object storage
backend/src/lib/r2.ts
Other components
- Student
- Security staff
- OpenRouter
Connections 28
- Student → Role-based pages: uses
README.md - Security staff → Role-based pages: uses
README.md - Role-based pages → API client: requests through
- API client → Session utilities: reads tokens
foundit-ui/lib/api/client.ts - API client → API router: calls API
- API router → Account and login: routes to
backend/src/index.ts - API router → Claim workflow: routes to
backend/src/index.ts - API router → Report links: routes to
backend/src/index.ts - API router → Item browsing: routes to
backend/src/index.ts - API router → Photo sessions: routes to
backend/src/index.ts - Account and login → Application database: reads and writes
backend/src/routes/auth.ts - Account and login → Email delivery: sends verification
backend/src/routes/auth.ts - Item browsing → Application database: reads and writes
backend/src/routes/items.ts - Claim workflow → Application database: reads and writes
backend/src/routes/claims.ts - Claim workflow → In-app notifications: fans out notices
backend/src/routes/claims.ts - Claim workflow → Claim email notices: delivers claim email
backend/src/routes/claims.ts - Claim workflow → Embedding ingestion: ingests embeddings
backend/src/routes/claims.ts - Item browsing → Embedding ingestion: ingests embeddings
backend/src/routes/items.ts - Claim workflow → Match suggestions: requests suggestions
backend/src/routes/claims.ts - Item browsing → Match suggestions: requests suggestions
backend/src/routes/items.ts - Embedding ingestion → Application database: persists vectors
backend/src/lib/matching/ingest.ts - Embedding ingestion → Text and image embeddings: computes vectors
backend/src/lib/matching/ingest.ts - Embedding ingestion → Search text builders: builds search text
backend/src/lib/matching/ingest.ts - Text and image embeddings → OpenRouter: requests embeddings
backend/src/lib/matching/embeddings.ts - Photo sessions → Application database: stores session data
backend/src/routes/photoSessions.ts - Photo sessions → Image object storage: creates upload URLs
backend/src/routes/photoSessions.ts - Security staff → Item browsing: reports found items
README.md - Student → Claim workflow: submits claims
README.md