ClaimSafe is a secure, AI-powered web application designed to help users recover lost items while maintaining the privacy of found inventory. Submission for ConUHacks X SAP challenge.
- Privacy First: The inventory of found items is hidden from the public to prevent fraudulent claims.
- AI Assisted: A TF-IDF (Text Frequency-Inverse Document Frequency) algorithm matches user inquiries with inventory items to save assistant time.
- Secure Handling: Only authorized assistants can view potential matches and approve them.
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS (with custom CSS variables for theming)
- UI Components:
- Custom glassmorphism cards and inputs.
framer-motionfor page transitions and micro-interactions.lucide-reactfor iconography.
- State Management: React Hooks (
useState,useEffect) and URL search params for tracking.
- Framework: FastAPI (Python)
- Database Driver: Motor (Async MongoDB)
- Validation: Pydantic v2
- AI/ML:
scikit-learn: Used for TF-IDF vectorization and cosine similarity calculations.numpy: For vector operations.gemini: For follow up conversational questions
- System: MongoDB (Atlas or Local)
- Collections:
inventory: Stores found items with tags, location, and description.inquiries: Stores user reports with status updates (submitted,matched,resolved).
- Landing Page: High-impact visual design explaining the service.
- Report Lost Item:
- Detailed form with categorization.
- Image upload capability (Frontend ready, backend stubbed).
- Auto-generation of inquiry ID.
- Inquiry Tracking:
- Users can track their item status using their Inquiry ID.
- Shows real-time status updates (e.g., "Under Review", "Matched").
- Dashboard:
- Incoming Inquiries: List of all user reports needing attention.
- Inventory Management: View all hidden items.
- AI Matcher:
- On-demand matching for specific inquiries.
- Generates a Confidence Score (0-100%) based on text similarity (Description + Category + Tags).
- Review System:
- Side-by-side comparison of Inquiry vs. Potential Matches.
- "One-Click Match" to link items and notify the user (status update).
- Node.js (v18+)
- Python (v3.10+)
- MongoDB connection string
# From project root
python -m venv backend/venv
# Windows
backend\venv\Scripts\activate
# Mac/Linux
source backend/venv/bin/activate
# after the venv is activated, run
python -m pip install --upgrade pip setuptools wheel
# then install the requirements
pip install -r backend/requirements.txt
# Create .env file in backend/
echo "MONGODB_URL=your_connection_string" > backend/.env
# OR dump the .env file from the discord into the backend folder
# IF YOU'RE HAVING ISSUES, CONTACT A MEMBER OF THE TEAM TO GET ACCESS
# Seed Database (Optional)
python backend/seed_db.py
# Run Server (Must be run from project root)
uvicorn backend.main:app --reloadcd frontend
npm install
npm run devPOST /inquiries: Submit a new lost item inquiry.GET /inquiries/{id}: Get inquiry details by ID.GET /admin/inquiries?status={status}: List inquiries (optionally filtered by status).
GET /items: List all found items (hidden inventory).GET /items/{id}: Get specific item details.
POST /inquiries/{id}/match: Run the AI matcher for a specific inquiry. Returns a list of scored items.POST /inquiries/{id}/approve: Link an inventory item to an inquiry and update status tomatched.
- Email/SMS Notifications: Integrate Twilio or SendGrid to notify users when a match is found, instead of them manually checking the tracking page.
- Geospatial Search: Use MongoDB
$nearqueries to filter matches by location (e.g., "lost in Building H" matches "found in Building H").
- Dockerization: Create
Dockerfileanddocker-compose.ymlfor easy deployment. - Cloud Storage: Integrate AWS S3 for storing user-uploaded images permanently.
/
├── backend/
│ ├── main.py # API Entry Point
│ ├── models.py # Database Schemas (Pydantic)
│ ├── matching.py # TF-IDF Logic
│ ├── database.py # MongoDB Connection
│ ├── requirements.txt # Python Dependencies
│ └── ...
├── frontend/
│ ├── src/app/
│ │ ├── page.tsx # Landing Page
│ │ ├── report/ # Reporting Form
│ │ ├── track/ # Tracking Page
│ │ └── admin/ # Assistant Dashboard
│ ├── src/components/ # Reusable UI (Navbar, Cards)
│ └── ...
└── DOCUMENTATION.md # This file