Skip to content

pingou100/DroPin

Repository files navigation

DroPin

Self-hosted travel check-in tracker. Beautiful, privacy-first, works on any device. No backend needed.

License: MIT Netlify PRs Welcome

When Foursquare shut down their Swarm API, millions of check-ins became trapped in a closed ecosystem. DroPin is the open-source alternative: a beautifully designed, privacy-focused check-in tracker you own and control.

Deploy in 5 minutes to Netlify (free). No backend, no database, no tracking β€” just your travel memories, beautifully visualized and safely synced across devices.


✨ Features

Core

  • πŸ—ΊοΈ Interactive Global Map β€” Visualize all check-ins with clustering and smooth animations
  • ⚑ Quick Check-in β€” Location-based check-in finds nearby venues instantly via Google Places API
  • πŸ“ Manual Entry β€” Drag-to-position pin placement with auto-geocoding
  • πŸ” Smart Search β€” Search pins by name/city, or fly to any city worldwide via Nominatim geocoding
  • 🎨 Minimalist Design β€” Clean, Apple-inspired interface
  • πŸ“± Mobile-First β€” Fully tested on iOS Safari and Android Chrome

Storage & Sync

  • πŸ›‘οΈ PWA Mode β€” Triple redundancy: IndexedDB + localStorage + Google Drive auto-backup
  • ☁️ Cross-device Sync β€” Push/Pull your master CSV via Google Drive, merge without data loss
  • πŸ“ CSV Mode β€” Simple static file mode, great for getting started
  • πŸ’Ύ Offline-First β€” Works without internet in PWA mode
  • πŸ”„ Auto-Recovery β€” Restores data from localStorage if IndexedDB is wiped

Stats & Sharing

  • πŸ“Š Travel Statistics β€” Choropleth world map, top countries chart, city rankings, distance insights
  • πŸ‘€ Read-only Sharing β€” Share view.html with family/friends for a public map (no editing)
  • πŸ“€ Export/Import β€” Full CSV export, import from any CSV source including Foursquare exports

Privacy & Control

  • πŸ”’ Your data, your storage β€” Everything stays in your browser + your Google Drive
  • πŸš€ Zero Backend β€” Pure HTML/CSS/JS, deploy on any static host
  • πŸ’° Free Hosting β€” Netlify free tier is more than enough
  • πŸ” No Tracking β€” Zero analytics, no cookies, no third-party data collection

πŸš€ Quick Start

Option 1: CSV Mode (5 minutes)

The simplest setup β€” reads check-ins from a static CSV file:

git clone https://github.com/pingou100/DroPin.git
cd DroPin/src
cp config.example.js config.js
# Edit config.js: set STORAGE_MODE to 'csv' and add your API keys

Then drag the src/ folder to Netlify Drop.

Option 2: PWA Mode with Sync (10 minutes)

Full check-in app with Google Drive sync across all your devices:

  1. Clone and configure as above, but set STORAGE_MODE: 'pwa' in config.js
  2. Create a Google OAuth 2.0 Client ID at Google Cloud Console:
    • Application type: Web application
    • Authorized JavaScript origins: https://your-netlify-domain.netlify.app
    • Authorized redirect URIs: (none needed β€” we use implicit flow)
  3. Enable the Google Drive API in your project
  4. Add your GOOGLE_DRIVE_CLIENT_ID to config.js
  5. Deploy to Netlify

Important: The sync feature requires the https://www.googleapis.com/auth/drive scope so that files pushed from one device can be read by another. The old drive.file scope will not work for cross-device sync.


πŸ“± Pages

Page URL Description
Map index.html Main map with filters, search, clustering
Check In checkin-now.html GPS-based venue search and quick check-in
Add add-checkin.html Manual check-in with draggable pin
Stats stats.html Travel statistics dashboard
Import/Export import-export.html CSV import and export
Sync sync.html Google Drive Push/Pull sync
View view.html Read-only shareable map (no auth required)

☁️ Cross-Device Sync

The sync page (sync.html) keeps all your devices in sync via a single master CSV on Google Drive:

Device A (mobile)          Google Drive               Device B (laptop)
     β”‚                          β”‚                           β”‚
     β”œβ”€β”€ Push ──────────────► DroPin-Master.csv             β”‚
     β”‚                          β”‚                           β”‚
     β”‚                          β”‚ ◄────────────── Pull ──────
     β”‚                          β”‚                           β”‚
     β”‚              Preview diff (new check-ins only)       β”‚
     β”‚                          β”‚                           β”‚
     β”‚                          β”‚ ──── Merge ──────────────►│
  • Push β€” uploads your local check-ins as the new master file (DroPin-Master.csv in the "DroPin Backups" folder)
  • Pull & Merge β€” downloads the master, shows you a diff preview, and merges only new check-ins (nothing deleted)
  • Conflict-free β€” deduplication is by checkin_id, so merging is always safe

First time setup: On each device, go to Sync β†’ Connect β†’ sign in with the same Google account.


πŸ›‘οΈ PWA Triple Redundancy

In PWA mode, every check-in is saved to three independent layers:

Every check-in β†’
  βœ… Layer 1: IndexedDB     (primary, 50MB+, offline)
  βœ… Layer 2: localStorage  (backup, last 200 check-ins)
  βœ… Layer 3: Google Drive  (permanent, auto-upload every 5 check-ins)

If your browser cache is cleared, the app detects the empty IndexedDB and offers to restore from the localStorage backup. For a full restore, use Sync β†’ Pull.


πŸ“Š Travel Statistics

stats.html shows:

  • World choropleth map β€” countries colored by visit intensity, click to zoom in
  • Top 10 Countries β€” horizontal bar chart
  • Top 20 Cities β€” click any city to fly the map there
  • Distance insights β€” furthest from home, average journey, longest single-day trip

The "home" location is hardcoded to Brussels in js/stats/GeoStatsCalculator.js. Change homeLocation to your city coordinates.


πŸ‘€ Read-only Sharing (view.html)

Share your travels without exposing your check-in interface. view.html:

  • Reads directly from checkins_with_addresses.csv
  • No navigation menu, no editing, no authentication
  • Full search (pins + worldwide geocoding) and filters
  • Shows "πŸ‘€ View only" banner

Share the direct URL: https://your-domain.netlify.app/src/view.html


πŸ—ΊοΈ CSV Format

checkin_id,venue_name,venue_type,date,time,year,month,
latitude,longitude,street_address,city,state,
postal_code,country,country_code,full_address,
foursquare_url,venue_id,notes,is_private

Download a template from the Import/Export page, or use the Foursquare/Swarm CSV export directly (column mapping may need adjustment).


πŸ› οΈ Technology Stack

  • Frontend: Vanilla JavaScript (ES6 modules), no framework
  • Maps: Leaflet.js with MarkerCluster
  • Stats map: Leaflet + Natural Earth GeoJSON (via GitHub CDN)
  • Charts: Chart.js
  • Storage: CSV files OR IndexedDB + localStorage (PWA mode)
  • Sync: Google Drive API v3 (direct REST, no SDK)
  • OAuth: Google Identity Services (GIS) β€” implicit token flow
  • Geocoding: Geoapify (addresses) + Nominatim (map search)
  • Places: Google Places API v1 (New)
  • Hosting: Netlify, Vercel, GitHub Pages, or any static host

πŸ” Privacy & Security

  • No third-party servers β€” API calls go directly to Google/Geoapify from your browser
  • No analytics β€” zero tracking, no cookies set by DroPin itself
  • Google Drive scope β€” uses drive scope (required for cross-device file discovery). Files are stored in a dedicated "DroPin Backups" subfolder
  • Your keys stay local β€” config.js is in .gitignore and never committed

Best Practices

⚠️ Never commit config.js with real API keys to a public repo
βœ… Restrict API keys by domain in Google Cloud Console
βœ… Keep your instance in a private GitHub repo
βœ… Add test users in Google OAuth consent screen if app is in "Testing" mode


πŸ—ΊοΈ Roadmap

Completed βœ…

  • Interactive map with clustering, filters, year slider
  • GPS-based quick check-in via Google Places API v1
  • Manual check-in with draggable pin + auto-geocoding
  • Smart search: pin search + worldwide Nominatim geocoding
  • PWA triple redundancy (IndexedDB + localStorage + Google Drive auto-backup)
  • Cross-device sync via Google Drive Push/Pull with merge preview
  • Travel statistics dashboard (world map, charts, city rankings, distance stats)
  • Read-only shareable map (view.html)
  • CSV import/export with iOS paste support
  • iOS click/touch fixes

Coming Soon πŸš€

  • Dark mode
  • Service Worker for full PWA installability (home screen icon, offline caching)
  • Photo attachments
  • Import from Foursquare/Swarm CSV export (column auto-mapping)
  • Settings panel (backup status, manual backup trigger)

πŸ“± Browser Compatibility

βœ… iOS Safari 14+
βœ… Chrome 90+
βœ… Firefox 88+
βœ… Edge 90+
βœ… Mobile browsers (tested on iPhone and Android)

Requires HTTPS for Google OAuth and geolocation. Netlify/Vercel provide this automatically.


🀝 Contributing

Contributions welcome! Whether you found a bug, have a feature idea, or want to improve the docs:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

πŸ™ Acknowledgments


πŸ“„ License

MIT License β€” see LICENSE for details.


πŸ’¬ Support


Get Started β€’ Sync Setup β€’ Report Bug

Made with ❀️ for travelers and explorers worldwide

About

Minimalist web app for tracking and visualizing location check-ins

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors