A FastAPI web application for posting questions tied to specific GPS locations with photo evidence. Mobile-only interface (works with rear camera capture).
✅ Mobile Detection – Shows warning on desktop devices
✅ Interactive Map – Leaflet-based map with location search (Nominatim)
✅ GPS Tracking – Real-time location with continuous geolocation
✅ Camera Capture – Forces rear camera only (no gallery selection)
✅ Question Posting – Post questions with photo, GPS coords, and timestamp
✅ Location Pinning – Manually place pins on the map
✅ Submission Storage – In-memory storage (can be extended to database)
pip install -r app_requirements.txtpython app.pyThe app will start on http://0.0.0.0:8000
Open your phone browser and navigate to:
http://<your-laptop-ip>:8000
Example: http://192.168.1.100:8000
💡 Find your IP:
- Windows: Open PowerShell and run
ipconfig(look for "IPv4 Address")- Mac/Linux: Run
ifconfig
The app will request:
- Location permissions – GPS coordinates
- Camera permissions – Photo capture (rear camera)
- Map - Search for a location or let GPS track you
- Pin - Click "📌 Place Pin" to mark current location
- Question - Type your question
- Camera - Click "📷 Capture Photo" to take a picture (rear camera only)
- Post - Click "
✈️ Post Question" to submit
Serves the main app interface (HTML)
Submit a question with location and image
Request Body:
{
"question": "What is this?",
"latitude": 40.7128,
"longitude": -74.0060,
"timestamp": "2026-02-28T10:30:00Z",
"imageBase64": "data:image/jpeg;base64,..."
}Response:
{
"status": "success",
"message": "Question submitted!",
"id": 1
}Get all submissions
Get a specific submission by ID
- Device: Smartphone or tablet
- Browser: Chrome, Firefox, Safari (any modern mobile browser)
- Permissions: GPS and Camera access
- Camera: App forces rear-facing camera (facingMode: 'environment')
If you open the app on a laptop/desktop:
⚠️ Mobile Device Required
This application only works on mobile devices.
Please open this link on your phone.
e:\pinpoint\
├── app.py # FastAPI application
├── app_requirements.txt # Python dependencies
├── templates/
│ └── index.html # Main UI (HTML/CSS/JS)
└── README.md # This file
function isMobileDevice() {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}Uses navigator.geolocation.watchPosition() for continuous GPS tracking
<input type="file" id="cameraInput" accept="image/*" capture="environment" />capture="environment"forces rear camera (not front camera)- No gallery selection allowed
- Leaflet for interactive mapping
- Nominatim (OpenStreetMap) for location search
- Custom markers for current location and pins
Currently uses in-memory storage. Can be extended with:
- SQLite
- PostgreSQL
- MongoDB
- Cloud storage (Firebase, etc.)
{
"id": 1,
"question": "Why is this area flooded?",
"latitude": 40.7128,
"longitude": -74.0060,
"timestamp": "2026-02-28T10:30:00Z",
"imageBase64": "data:image/jpeg;base64,...",
"submitted_at": "2026-02-28T10:31:45.123456"
}
- Persistent database storage
- User authentication
- Question threading/comments
- Image classification using the Python scripts (1-6)
- Map heat map of questions
- Real-time notifications
- Social media integration
- Go to Settings → Privacy → Location Services
- Find the browser → Change to "While Using"
- Refresh the app
- Check browser permissions: Settings → Apps → Camera/Microphone
- Make sure you're using HTTPS (or localhost for testing)
- Try a different browser
- Check internet connection
- Verify Leaflet CDN is accessible
- Check browser console for errors (F12 → Console)
MIT License – Free to use and modify