This package contains ALL the changes from today's session ready to upload to GitHub.
github-upload/
├── utils.py ← Foursquare + clean destinations
├── app.py ← Foursquare OAuth routes
├── scheduler.py ← Hourly check-in sync
├── .env.example ← Foursquare credentials
├── FOURSQUARE_SETUP.md ← Setup guide
├── FOURSQUARE_IMPLEMENTATION.md ← Technical docs
└── templates/
├── trips/
│ └── view.html ← Check-ins + map display
└── settings/
└── api_integrations.html ← Foursquare UI
- OAuth authentication
- Automatic hourly check-in syncing
- Manual sync button
- Check-in display with photos
- Shows "Paris, France" instead of "Paris, Ile-de-France, France"
- Deduplication (no duplicate city names)
- Cleaner autocomplete
- Interactive Leaflet.js map
- Markers for each check-in
- Popups with venue details
- Auto-zoom to fit all locations
tar -xzf github-upload.tar.gz
cd github-upload# Copy root files
cp utils.py app.py scheduler.py .env.example FOURSQUARE*.md ~/TravelTracker/
# Copy templates
cp templates/trips/view.html ~/TravelTracker/templates/trips/
cp templates/settings/api_integrations.html ~/TravelTracker/templates/settings/cd ~/TravelTracker
# Add all files
git add utils.py app.py scheduler.py .env.example
git add FOURSQUARE_SETUP.md FOURSQUARE_IMPLEMENTATION.md
git add templates/trips/view.html templates/settings/api_integrations.html
# Commit
git commit -m "Complete Foursquare integration + destination/map improvements
- Add Foursquare/Swarm OAuth integration
- Automatic hourly check-in syncing
- Manual sync trigger on trip pages
- Check-in display with photos and details
- Interactive map showing all check-in locations
- Clean destination names (City, Country format)
- Deduplication in location autocomplete
- Comprehensive setup documentation"
# Push
git push origin main| File | What Changed |
|---|---|
utils.py |
+250 lines - Foursquare API functions, clean destination search |
app.py |
+100 lines - OAuth routes, sync endpoints |
scheduler.py |
+50 lines - Hourly check-in sync job |
templates/trips/view.html |
+150 lines - Map + check-ins display |
templates/settings/api_integrations.html |
+60 lines - Foursquare connection UI |
.env.example |
+4 lines - Foursquare credentials |
| File | Description |
|---|---|
FOURSQUARE_SETUP.md |
Complete user setup guide |
FOURSQUARE_IMPLEMENTATION.md |
Technical implementation details |
Once pushed to GitHub:
# SSH to server
cd ~/TravelTracker
# Stash local changes
git stash
# Pull new code
git pull origin main
# Restore local config
git stash pop
# Rebuild containers
docker-compose down
docker-compose build --no-cache web
docker-compose up -d
# Verify deployment
docker-compose exec web grep "seen_names" /app/utils.py
docker-compose exec web grep "foursquare" /app/app.pyAfter deployment:
- Type "Paris" in new trip form
- See "Paris, France" (clean format)
- No duplicate entries
- Can create trip successfully
- Correct Paris image fetched
- Connect Foursquare account in Settings
- OAuth flow completes
- Manual sync works
- Check-ins display on trip page
- Map shows with markers
- Click markers to see details
Before Foursquare will work, you need to:
- Create Foursquare app at https://foursquare.com/developers/
- Add to server's
.env:FOURSQUARE_CLIENT_ID=your_client_id FOURSQUARE_CLIENT_SECRET=your_client_secret - Restart containers
See FOURSQUARE_SETUP.md for detailed instructions.
- Lines Added: ~600
- Files Modified: 6
- Files Created: 2
- Features: 3 major features
- Documentation: 2 comprehensive guides
-
Better Destinations
- Clean, simple city names
- No confusing regional details
- No duplicate entries
-
Automatic Check-in Import
- Connect Foursquare once
- Check-ins sync every hour
- Shows where you went during trips
-
Visual Trip Timeline
- Interactive map
- See all venues visited
- Complete travel history
Ready to upload! 🚀