Skip to content

wingnut144/TravelTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Upload Package - Complete Updates

This package contains ALL the changes from today's session ready to upload to GitHub.


📦 What's Inside (8 Files)

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

✨ Features Included

1. Foursquare/Swarm Integration ✅

  • OAuth authentication
  • Automatic hourly check-in syncing
  • Manual sync button
  • Check-in display with photos

2. Clean Destination Names ✅

  • Shows "Paris, France" instead of "Paris, Ile-de-France, France"
  • Deduplication (no duplicate city names)
  • Cleaner autocomplete

3. Check-in Map ✅

  • Interactive Leaflet.js map
  • Markers for each check-in
  • Popups with venue details
  • Auto-zoom to fit all locations

🚀 Upload to GitHub (3 Steps)

Step 1: Extract Package

tar -xzf github-upload.tar.gz
cd github-upload

Step 2: Copy to Your Repo

# 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/

Step 3: Commit and Push

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 Details

Modified Files (6)

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

New Files (2)

File Description
FOURSQUARE_SETUP.md Complete user setup guide
FOURSQUARE_IMPLEMENTATION.md Technical implementation details

🎯 After Upload: Deploy to Server

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.py

✅ Testing Checklist

After deployment:

Destination Autocomplete

  • Type "Paris" in new trip form
  • See "Paris, France" (clean format)
  • No duplicate entries
  • Can create trip successfully
  • Correct Paris image fetched

Foursquare (After Setup)

  • 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

🔒 Environment Setup Needed

Before Foursquare will work, you need to:

  1. Create Foursquare app at https://foursquare.com/developers/
  2. Add to server's .env:
    FOURSQUARE_CLIENT_ID=your_client_id
    FOURSQUARE_CLIENT_SECRET=your_client_secret
    
  3. Restart containers

See FOURSQUARE_SETUP.md for detailed instructions.


📊 Total Changes

  • Lines Added: ~600
  • Files Modified: 6
  • Files Created: 2
  • Features: 3 major features
  • Documentation: 2 comprehensive guides

🎉 What Users Get

  1. Better Destinations

    • Clean, simple city names
    • No confusing regional details
    • No duplicate entries
  2. Automatic Check-in Import

    • Connect Foursquare once
    • Check-ins sync every hour
    • Shows where you went during trips
  3. Visual Trip Timeline

    • Interactive map
    • See all venues visited
    • Complete travel history

Ready to upload! 🚀

About

Show upcoming trips

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published