DevPrep
  • Interview Prep
  • Projects
  • Resources
  • Pricing
  • About Us
Submit Question
DevPrep
  • Pricing
  • About Us
Submit Question
← From Beginner to Expert in Fundamentals of Frontend
  • Project 1: The Performance-First Dashboard
  • Project 2: Accessible Video Player
  • Project 3: Markdown Blog Engine
  • Project 4: Browser-Based Code Editor
  • Project 5: Multi-Tab Whiteboard
  • Project 6: Infinite Scroll Image Gallery
  • Project 7: Recipe Optimizer & Converter
  • Project 8: Budget Tracker with Charts
  • Project 9: Typing Speed Test
  • Project 10: Weather App with Time-Travel
  • Project 11: CSS Grid Layout Builder
  • Project 12: Password Vault (Frontend Only)
  • Project 13: Kanban Board (Trello Clone)
  • Project 14: Quiz App with Leaderboard
  • Project 15: Habit Tracker (GitHub Style)
  • Project 16: E-commerce Product Page
  • Project 17: Unit Converter (Expert Mode)
  • Project 18: Music Visualizer
  • Project 19: Flashcard Learning App
  • Project 20: Custom Form Validator
  • Project 21: Virtual Terminal
  • Project 22: Pomodoro Timer (Focus Pro)
  • Project 23: SVG Path Editor
  • Project 24: Movie Database Matchmaker
  • Project 25: Interactive Resume / Portfolio
  • Project 26: Recipe Scraper UI
  • Project 27: Crypto Tracker (Real-Time)
  • Project 28: Find My Pet (PWA)
  • Project 29: Markdown-to-Slide Tool
  • Project 30: Browser Health Dashboard
← From Beginner to Expert in Fundamentals of Frontend

Project 28: Find My Pet (PWA)

45 min read
Service WorkersPWACamera APIPush NotificationsLeaflet.jsOffline-First

📋 Project Brief

Build a Progressive Web App (PWA) for reporting and finding lost pets. This mobile-first app works offline via Service Workers, uses the Camera API for photos, and integrates maps for location marking.

✅ Feature Requirements

Feature 1: Service Workers (Offline Support)

Acceptance Criteria:

  • App loads and displays cached data even without internet
  • New reports are queued in IndexedDB and synced when connectivity returns
  • Cache strategy: Network-first for API data, Cache-first for static assets
  • A banner shows "You're offline — changes will sync when connected"

Feature 2: Camera API

Acceptance Criteria:

  • Users can take a photo directly in the app using getUserMedia
  • Photo can be cropped/resized before submitting
  • Fallback: file upload input for devices without camera access
  • Compress images to < 500KB before storing

Feature 3: Push Notifications

Acceptance Criteria:

  • Users can opt-in to notifications for their area
  • When a new pet is reported nearby, they receive a push notification
  • Notifications include the pet's photo and last seen location
  • "Nearby" defined as within a configurable radius

Feature 4: Map Integration

Acceptance Criteria:

  • Use Leaflet.js (open-source) for displaying a map
  • Lost pets shown as markers with photo thumbnails
  • Users can drop a pin to mark where they last saw a pet
  • Clicking a marker opens a detail card

Feature 5: Install Prompt

Acceptance Criteria:

  • A custom "Install App" banner appears (using the beforeinstallprompt event)
  • The banner is dismissable and doesn't show again for 7 days
  • A Web App Manifest configures: app name, icons, theme color, start URL
  • The app opens in standalone mode after installation

🧪 Testing Checklist

  • Test offline mode: disconnect network → app still loads and displays cached data
  • Test camera capture and image compression
  • Test map marker placement and detail card
  • Test install prompt behavior
  • Lighthouse PWA audit: all checks pass

Practice

  • JavaScript
  • DSA
  • Machine Coding
  • System Design

Resources

  • Learning Tracks
  • Articles
  • Roadmaps
  • Compare Concepts
  • Glossary
  • Developer Tools
  • All Questions

Company

  • About
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service
DevPrep

© 2026 DevPrep. All rights reserved.