β οΈ This is a FREE, open-source project. You can fork, customize, and deploy it for FREE using Firebase Spark Plan.
Critical Pain Points:
- 15,000+ items lost daily in Sri Lanka (NICs, wallets, phones, documents)
- No centralized trusted recovery system
- Social media posts are unstructured, unsafe, and ineffective
- Police manual processes take weeks
- High risk of scams and fake claims
- Language barriers (Sinhala, Tamil, English)
- Flutter SDK (3.38.5+)
- Git
- Google Account (for Firebase - FREE)
# Clone the repository
git clone https://github.com/pirinthaban/FindBack.git
cd FindBack
# Install dependencies
flutter pub get
# Run on web (no Firebase needed for demo)
flutter run -d chrome
# Or run on Android emulator
flutter run- Create FREE Firebase project: FIREBASE_SETUP.md
- Copy environment variables:
cp .env.example .env
- Add your Firebase keys to
.env - Generate firebase_options.dart:
flutterfire configure
π Full setup guide: FIREBASE_SETUP.md
A location-based, trust-driven, AI-powered Lost & Found ecosystem that connects:
- Citizens (item losers & finders)
- Police departments (verification authority)
- Universities (campus recovery hubs)
- Transport hubs (airports, bus stands, train stations)
Key Differentiators:
- AI-powered automatic matching between lost and found items
- Offline-first architecture (works without internet)
- Government NIC/Passport secure recovery flow
- Community trust & reputation system
- Multi-language support (Si/Ta/En)
- Phone + Email registration with OTP
- Social login (Google, Facebook)
- User profiles with reputation scores
- Role-based access (Citizen, Police, University Admin)
- Post Lost items (with urgency levels)
- Post Found items (with current location)
- Multiple image upload (up to 5 per item)
- AI auto-blur sensitive details (NIC numbers, faces)
- Item categories: NIC, Passport, Phone, Wallet, Bag, Keys, Documents, Other
- Location tagging with Google Maps
- Radius-based nearby item discovery (500m - 50km)
- AI-powered Lost β Found auto-matching
- Image similarity detection (TensorFlow Lite)
- Text description NLP matching
- Location proximity scoring
- Match confidence score (0-100%)
- Smart push notifications for high-confidence matches
- In-app encrypted chat
- Claim ownership workflow with verification
- Ownership proof submission (IMEI, photos, security questions)
- Police verification mode
- Report & block abusive users
- Case closure & recovery confirmation
- User reputation system (0-1000 points)
- Community ratings & reviews
- Anti-fraud detection algorithms
- Audit logs for all critical actions
- Privacy controls for sensitive documents
- Rate limiting & spam prevention
- Image Matching Engine: Detects similar items using neural networks
- Auto-categorization: Identifies item type from photos
- Sensitive Data Blurring: Auto-detects and blurs NIC numbers, faces
- NLP Matching: Analyzes descriptions for semantic similarity
- Fraud Detection: Identifies suspicious patterns
- Offline-first Architecture: Post items without internet, sync later
- Bluetooth Nearby Broadcast: Found phones broadcast to nearby devices
- Emergency/Disaster Mode: Special UI for natural disasters
- SMS Fallback: Critical notifications via SMS when offline
- QR Code Generation: Every item gets a unique QR code
- NFC Tag Support: Future integration with physical tags
- Police API Integration: Direct case filing
- University Systems: Campus lost & found integration
- Multi-language support (Sinhala, Tamil, English)
- District-wise categorization (25 districts of Sri Lanka)
- Local time & date formats
Framework: Flutter 3.16+
State Management: Riverpod 2.0
Architecture: Clean Architecture + MVVM
UI Library: Material Design 3
Navigation: go_router
Local Database: Hive + driftKey Packages:
google_maps_flutter- Location servicesimage_picker- Camera & galleryfirebase_auth- Authenticationcloud_firestore- Real-time databasefirebase_messaging- Push notificationsflutter_riverpod- State managementcached_network_image- Image cachinggeolocator- GPS servicesconnectivity_plus- Network detectionhive- Offline storagetflite_flutter- AI inference
Platform: Firebase
Authentication: Firebase Auth
Database: Firestore
Storage: Firebase Storage + Cloudinary
Functions: Cloud Functions (Node.js/TypeScript)
Hosting: Firebase Hosting (Admin Panel)
Analytics: Firebase Analytics
Crashlytics: Firebase CrashlyticsImage Matching: TensorFlow Lite (MobileNetV3)
NLP: Firebase ML + Cloud Natural Language API
Image Processing: Cloudinary AI
OCR: ML Kit Text Recognition
Face Detection: ML Kit Face DetectionCI/CD: GitHub Actions
Version Control: Git
Code Quality: Flutter Analyzer, ESLint
Testing: flutter_test, mockito
Monitoring: Firebase Performance Monitoring
Error Tracking: Sentryβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MOBILE APP (Flutter) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Presentation Layer (UI Screens) β
β β β
β ββ Splash & Onboarding β
β ββ Authentication Screens β
β ββ Home Feed (Nearby Items) β
β ββ Post Lost/Found Flow β
β ββ Item Details & Matching β
β ββ Claims & Verification β
β ββ Encrypted Chat β
β ββ Profile & Reputation β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Application Layer (Business Logic) β
β β β
β ββ State Management (Riverpod) β
β ββ Use Cases / Interactors β
β ββ View Models β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Domain Layer (Core Business) β
β β β
β ββ Entities (User, Item, Claim, Chat) β
β ββ Repositories (Interfaces) β
β ββ Business Rules β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Data Layer (External Services) β
β β β
β ββ Firebase Repository Implementation β
β ββ Local Database (Hive) β
β ββ AI Service (TFLite) β
β ββ Image Service (Cloudinary) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FIREBASE BACKEND β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Authentication β
β β β
β ββ Phone Auth (OTP) β
β ββ Email/Password β
β ββ OAuth (Google, Facebook) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Firestore Database β
β β β
β ββ users/ β
β ββ items/ β
β ββ matches/ β
β ββ claims/ β
β ββ chats/ β
β ββ messages/ β
β ββ reports/ β
β ββ police_verifications/ β
β ββ audit_logs/ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Cloud Functions (Triggers & APIs) β
β β β
β ββ onItemCreated() - AI matching trigger β
β ββ processImageUpload() - Blur sensitive data β
β ββ calculateMatchScore() - AI matching algorithm β
β ββ sendMatchNotification() - Push notifications β
β ββ verifyClaim() - Ownership verification β
β ββ moderateContent() - Auto moderation β
β ββ generateReports() - Analytics β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Firebase Storage β
β β β
β ββ item_images/ β
β ββ proof_documents/ β
β ββ user_avatars/ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Firebase Cloud Messaging β
β β β
β ββ Match Notifications β
β ββ Claim Updates β
β ββ Chat Messages β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXTERNAL SERVICES β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β ββ Cloudinary (Image Processing & CDN) β
β ββ Google Maps API (Geocoding & Maps) β
β ββ Twilio (SMS Notifications) β
β ββ SendGrid (Email Notifications) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
firestore/
βββ users/
β βββ {userId}
β βββ email: string
β βββ phone: string
β βββ displayName: string
β βββ photoURL: string
β βββ role: enum (citizen, police, university_admin, admin)
β βββ reputation: number (0-1000)
β βββ itemsPosted: number
β βββ itemsReturned: number
β βββ successRate: number (%)
β βββ location: geopoint
β βββ district: string
β βββ verifiedPolice: boolean
β βββ createdAt: timestamp
β βββ lastActive: timestamp
β βββ fcmToken: string
β
βββ items/
β βββ {itemId}
β βββ type: enum (lost, found)
β βββ category: enum (nic, passport, phone, wallet, bag, keys, documents, other)
β βββ title: string
β βββ description: string
β βββ images: array<string> (URLs)
β βββ blurredImages: array<string>
β βββ location: geopoint
β βββ locationName: string
β βββ district: string
β βββ radius: number (meters)
β βββ geohash: string
β βββ userId: string (ref)
β βββ userName: string
β βββ userPhone: string (encrypted)
β βββ status: enum (active, claimed, verified, closed, expired)
β βββ urgency: enum (low, medium, high, emergency)
β βββ matchCount: number
β βββ viewCount: number
β βββ reportCount: number
β βββ features: object (AI extracted features)
β βββ embedding: array<number> (image embedding)
β βββ createdAt: timestamp
β βββ updatedAt: timestamp
β βββ expiresAt: timestamp
β
βββ matches/
β βββ {matchId}
β βββ lostItemId: string (ref)
β βββ foundItemId: string (ref)
β βββ confidenceScore: number (0-100)
β βββ imageSimilarity: number
β βββ textSimilarity: number
β βββ locationProximity: number
β βββ timeDifference: number (hours)
β βββ matchedBy: enum (ai, manual)
β βββ status: enum (pending, viewed, claimed, dismissed)
β βββ createdAt: timestamp
β βββ notificationSent: boolean
β
βββ claims/
β βββ {claimId}
β βββ itemId: string (ref)
β βββ claimantUserId: string (ref)
β βββ itemOwnerId: string (ref)
β βββ status: enum (pending, under_review, verified, rejected, completed)
β βββ proofDocuments: array<string> (URLs)
β βββ proofAnswers: object
β βββ verificationQuestions: array<object>
β βββ verifiedBy: string (userId - police/admin)
β βββ verificationNotes: string
β βββ meetupLocation: geopoint
β βββ meetupTime: timestamp
β βββ handoverConfirmed: boolean
β βββ handoverCode: string (6-digit)
β βββ createdAt: timestamp
β βββ completedAt: timestamp
β
βββ chats/
β βββ {chatId}
β βββ itemId: string (ref)
β βββ participants: array<string> (userIds)
β βββ participantNames: object
β βββ lastMessage: string
β βββ lastMessageTime: timestamp
β βββ unreadCount: object {userId: count}
β βββ createdAt: timestamp
β βββ archived: boolean
β
βββ messages/
β βββ {messageId}
β βββ chatId: string (ref)
β βββ senderId: string (ref)
β βββ text: string (encrypted)
β βββ type: enum (text, image, location, system)
β βββ mediaUrl: string
β βββ readBy: array<string> (userIds)
β βββ createdAt: timestamp
β βββ deleted: boolean
β
βββ reports/
β βββ {reportId}
β βββ reporterUserId: string (ref)
β βββ reportedUserId: string (ref)
β βββ itemId: string (ref)
β βββ reason: enum (spam, fraud, inappropriate, fake)
β βββ description: string
β βββ evidence: array<string> (URLs)
β βββ status: enum (pending, investigating, resolved, dismissed)
β βββ reviewedBy: string (admin userId)
β βββ actionTaken: string
β βββ createdAt: timestamp
β βββ resolvedAt: timestamp
β
βββ police_verifications/
β βββ {verificationId}
β βββ itemId: string (ref)
β βββ claimId: string (ref)
β βββ officerId: string (ref)
β βββ stationName: string
β βββ caseNumber: string
β βββ verificationStatus: enum (pending, verified, rejected)
β βββ officerNotes: string
β βββ documents: array<string>
β βββ createdAt: timestamp
β βββ verifiedAt: timestamp
β
βββ notifications/
β βββ {notificationId}
β βββ userId: string (ref)
β βββ type: enum (match, claim, message, system)
β βββ title: string
β βββ body: string
β βββ data: object
β βββ read: boolean
β βββ actionUrl: string
β βββ createdAt: timestamp
β
βββ audit_logs/
βββ {logId}
βββ userId: string (ref)
βββ action: string
βββ entityType: string
βββ entityId: string
βββ changes: object
βββ ipAddress: string
βββ deviceInfo: object
βββ timestamp: timestamp
Composite Indexes (Firestore):
# Items collection
- collection: items
fields:
- status: ASC
- geohash: ASC
- createdAt: DESC
- collection: items
fields:
- type: ASC
- category: ASC
- status: ASC
- createdAt: DESC
- collection: items
fields:
- userId: ASC
- status: ASC
- createdAt: DESC
# Matches collection
- collection: matches
fields:
- lostItemId: ASC
- confidenceScore: DESC
- status: ASC
- collection: matches
fields:
- foundItemId: ASC
- confidenceScore: DESC
- status: ASC
# Claims collection
- collection: claims
fields:
- itemId: ASC
- status: ASC
- createdAt: DESC
# Messages collection
- collection: messages
fields:
- chatId: ASC
- createdAt: ASCMulti-factor Authentication:
- Phone OTP (Primary)
- Email verification (Secondary)
- Biometric (Face ID / Fingerprint)
Role-Based Access Control:
- Citizen: Post, claim, chat
- Police: Verify, investigate
- University Admin: Manage campus items
- Super Admin: Full access, moderation
Session Management:
- JWT tokens with 30-day expiry
- Auto-refresh tokens
- Device tracking
- Force logout on suspicious activityEncryption:
- End-to-end chat encryption (AES-256)
- PII encryption at rest
- Phone numbers hashed
- Sensitive documents encrypted
Privacy Controls:
- Auto-blur NIC numbers
- Face detection and blur
- Location fuzzing (show area, not exact point)
- Phone number masking (94XX XXX XX12)Rate Limiting:
- Max 5 items per user per day
- Max 3 claims per item
- Max 50 messages per hour
Fraud Detection:
- Duplicate item detection
- Suspicious pattern analysis
- IP tracking
- Device fingerprinting
- Velocity checks
Trust Scoring:
- Reputation points (0-1000)
- Success rate tracking
- Community ratings
- Time-based trust buildingSee: firestore.rules and storage.rules
[Splash Screen]
β
[Onboarding] β (First time users)
β
[Phone Verification]
β
[OTP Entry]
β
[Profile Setup]
β
[Home Feed]
ββ [Post Lost Item]
β ββ Select Category
β ββ Add Photos
β ββ Add Description
β ββ Set Location
β ββ Submit
β
ββ [Post Found Item]
β ββ Select Category
β ββ Add Photos
β ββ Add Description
β ββ Set Location
β ββ Submit
β
ββ [Item Details]
β ββ View Images
β ββ View Matches (AI suggested)
β ββ Contact Owner (Chat)
β ββ Claim Item
β
ββ [Claim Flow]
β ββ Submit Proof
β ββ Answer Questions
β ββ Wait Verification
β ββ Arrange Meetup
β
ββ [Chat Screen]
β ββ Send Messages
β ββ Share Location
β ββ Report User
β
ββ [Profile]
β ββ My Items
β ββ My Claims
β ββ Reputation Score
β ββ Settings
β ββ Logout
β
ββ [Police Dashboard]
ββ Verification Queue
ββ Active Cases
ββ Reports
Color Palette:
Primary: #1976D2 (Blue - Trust)
Secondary: #FF6B35 (Orange - Found)
Accent: #4CAF50 (Green - Success)
Warning: #FFA726 (Orange - Lost)
Error: #EF5350 (Red - Danger)
Background: #F5F5F5
Surface: #FFFFFF
Text Primary: #212121
Text Secondary: #757575Typography:
Font Family: Poppins (Primary), Noto Sans Sinhala, Noto Sans Tamil
Heading 1: 24px, Bold
Heading 2: 20px, SemiBold
Body: 16px, Regular
Caption: 14px, Regular
Button: 16px, MediumComponents:
- Bottom Navigation (Home, Search, Post, Chats, Profile)
- Floating Action Button (Quick Post)
- Item Cards (Grid/List view)
- Match Confidence Badge
- Reputation Stars
- Category Chips
- Map View with Clusters
1. Freemium Model
Free Tier:
- Post 3 items per month
- Basic AI matching
- Standard notifications
- 24-hour support
Premium ($2.99/month):
- Unlimited item posts
- Priority AI matching
- Instant notifications
- Featured listings
- 24/7 priority support
- Advanced analytics2. Institutional Subscriptions
Universities ($99/month):
- Campus-wide lost & found system
- Custom branding
- Admin dashboard
- Student verification integration
- Analytics & reports
Transport Hubs ($199/month):
- Airport/bus stand integration
- Staff accounts
- Digital lost property office
- Monthly reports
Police Departments (Free):
- Verification tools
- Case management
- Public service partnership3. Sponsored Services
Insurance Partnerships:
- Promoted recovery services
- Quick claim processing
- Insurance claim integration
Recovery Agents:
- Professional recovery services
- Verified agent listings
- Commission-based model4. Advertising (Non-intrusive)
Sponsored Items:
- Lost pet recovery services
- Document recovery agencies
- Locksmiths, phone repair shops5. Government Partnerships
NIC/Passport Recovery:
- Official government integration
- Streamlined replacement process
- Verification servicesUsers: 50,000 (Sri Lanka)
Premium Conversion: 5% = 2,500 users
Premium Revenue: 2,500 Γ $2.99 Γ 12 = $89,700
Institutions: 20 universities + 10 transport hubs
Institutional Revenue: (20 Γ $99 + 10 Γ $199) Γ 12 = $47,640
Advertising: $500/month = $6,000
Total Year 1: ~$143,340
flutter --version # 3.16.0+
node --version # 18.0.0+
firebase --version # 12.0.0+1. Create Firebase Project
firebase login
firebase projects:create lost-found-lk
firebase use lost-found-lk2. Enable Services
- Authentication (Phone, Email, Google)
- Firestore Database
- Cloud Storage
- Cloud Functions
- Cloud Messaging
- Analytics
- Crashlytics
3. Add Firebase to Flutter
flutterfire configure1. Create Account
- Sign up at cloudinary.com
- Get Cloud Name, API Key, API Secret
2. Configure Transformations
Auto-blur preset: ai_blur_sensitive
Image optimization: f_auto,q_auto
Responsive: w_auto,c_scaleCreate .env files:
# .env
FIREBASE_PROJECT_ID=lost-found-lk
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
GOOGLE_MAPS_API_KEY=your_maps_keyAndroid:
flutter build apk --release
flutter build appbundle --releaseiOS:
flutter build ios --release- Firebase security rules deployed
- Cloud Functions deployed
- Environment variables set
- App signed with release key
- Privacy policy published
- Terms of service published
- Google Play Store listing
- App Store Connect listing
- Analytics configured
- Crashlytics enabled
- Push notifications tested
- Payment integration tested
Infrastructure:
- Firebase Spark Plan (Free)
- Single region (asia-south1)
- Basic AI matching
Capacity:
- 10K concurrent users
- 50K items
- 100K messages/dayInfrastructure:
- Firebase Blaze Plan (Pay-as-you-go)
- CDN enabled (Cloudinary)
- Advanced AI matching
- Multi-language support
Capacity:
- 100K concurrent users
- 500K items
- 1M messages/day
- Auto-scaling cloud functionsInfrastructure:
- Multi-region deployment
- Microservices architecture
- Dedicated AI inference servers
- Redis caching layer
- Elasticsearch for search
Capacity:
- 1M concurrent users
- 5M items
- 10M messages/day
- 99.9% uptime SLADatabase:
- Query optimization with indexes
- Data partitioning by district
- Read replicas for heavy queries
Images:
- Cloudinary CDN
- WebP format
- Lazy loading
- Progressive image loading
Caching:
- Client-side caching (Hive)
- Server-side caching (Redis)
- CDN caching
- API response cachingCoverage Target: 80%
Test Cases:
- Business logic
- Data models
- Utilities
- ValidatorsTest Cases:
- API integration
- Database operations
- Authentication flows
- Image upload & processingTest Cases:
- Critical user flows
- Form validation
- Navigation
- Error statesMetrics:
- App launch time < 2s
- Screen load time < 1s
- API response time < 500ms
- Image load time < 1sTest Cases:
- Authentication bypass attempts
- SQL injection (N/A - NoSQL)
- XSS attacks
- Rate limiting
- Data encryptionlost_and_finder/
βββ android/ # Android native code
βββ ios/ # iOS native code
βββ lib/
β βββ core/
β β βββ constants/
β β βββ theme/
β β βββ utils/
β β βββ error/
β β βββ network/
β βββ features/
β β βββ authentication/
β β β βββ data/
β β β βββ domain/
β β β βββ presentation/
β β βββ items/
β β β βββ data/
β β β βββ domain/
β β β βββ presentation/
β β βββ matching/
β β β βββ data/
β β β βββ domain/
β β β βββ presentation/
β β βββ claims/
β β βββ chat/
β β βββ profile/
β β βββ police/
β βββ main.dart
βββ functions/ # Cloud Functions
β βββ src/
β β βββ triggers/
β β βββ ai/
β β βββ utils/
β βββ package.json
βββ assets/
β βββ images/
β βββ fonts/
β βββ models/ # TFLite models
βββ test/
βββ firebase.json
βββ firestore.rules
βββ storage.rules
βββ pubspec.yaml
See: docs/ACADEMIC_ABSTRACT.md
See: docs/ folder for:
- System Requirements Specification (SRS)
- Software Design Document (SDD)
- Test Plan
- User Manual
- Technical Report
Phase 2 Features:
- Video testimonials
- Blockchain-based ownership proof
- Augmented Reality item preview
- Voice search
- Real-time translation
- Dark mode
Phase 3 Features:
- International expansion
- Multi-currency support
- Shipping integration
- Insurance claim integration
- Reward system for finders
- Community events
MIT License - See LICENSE file
We welcome contributions! See CONTRIBUTING.md for guidelines.
- Fork this repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- π¨ UI/UX improvements
- π Sinhala/Tamil translations
- π§ͺ Unit & integration tests
- π Documentation
- βΏ Accessibility features
- β‘ Performance optimization
This is an open-source community project.
Original Author: pirinthaban
Project Type: Final Year Project / Community Initiative
University: [Your University] (Optional)
Want to be listed here? Contribute!
- π Bug Reports: Open an issue
- π‘ Feature Requests: Open an issue
- π¬ Discussions: GitHub Discussions
- π§ Email: [email protected] (optional)
This project is licensed under the MIT License - see the LICENSE file for details.
TL;DR: You can freely use, modify, and distribute this project for personal or commercial use.
- Flutter & Firebase communities
- Open-source contributors
- Sri Lanka Police (inspiration)
- Universities & transport hubs
- Everyone who loses things π
If this project helped you, please give it a β on GitHub!
Made with β€οΈ for Sri Lanka and the world