Skip to content

c0de128/GPS-API-CLAUDE

Repository files navigation

GPS Trip Tracker

A mobile-first web application for real-time GPS tracking, trip logging, and route management. Track your location, record trips with speed data, replay routes, and manage your travel history - all with complete privacy protection.

GPS Trip Tracker License React TypeScript

πŸš€ Features

βœ… Currently Implemented

  • Real-time GPS Tracking - Live location monitoring with high accuracy
  • Interactive Maps - Leaflet-based mapping with OpenStreetMap tiles
  • Mobile-First Design - Responsive UI optimized for mobile devices
  • Privacy Protection - All location data processed locally
  • Modern UI - Built with shadcn/ui components and Tailwind CSS

🚧 In Development (Per PRD)

  • Speed Tracking - Current, average, and maximum speed monitoring
  • Trip Management - Create, name, and organize trips
  • Route Recording - Automatic waypoint logging and route tracking
  • Data Persistence - Local storage with IndexedDB/localStorage
  • Trip History - View and manage past trips
  • Route Replay - Playback trips with speed controls
  • Data Export - Export trip data as JSON
  • Trip Analytics - Distance, duration, and speed statistics

πŸ—οΈ Project Structure

gps-tracking-app/
β”œβ”€β”€ .claude/                    # Claude Code configuration
β”‚   └── GPS Trip Tracker - PRD.md
β”œβ”€β”€ index.html                  # Main application (React component)
β”œβ”€β”€ package.json               # Dependencies
β”œβ”€β”€ .mcp.json                  # MCP server configuration
β”œβ”€β”€ docs/                      # Documentation (this folder)
β”‚   β”œβ”€β”€ ARCHITECTURE.md
β”‚   β”œβ”€β”€ DEVELOPMENT.md
β”‚   β”œβ”€β”€ FEATURES.md
β”‚   └── API.md
└── augments-mcp-server/       # MCP server for framework docs

πŸ› οΈ Technology Stack

  • Frontend: React 18+ with TypeScript
  • UI Components: shadcn/ui with Tailwind CSS
  • Maps: Leaflet with OpenStreetMap
  • Storage: IndexedDB/localStorage (planned)
  • Build: Vite (recommended)
  • Deployment: Static hosting (Vercel, Netlify)

πŸ“± Supported Devices

  • Mobile: iOS Safari, Android Chrome
  • Desktop: Chrome, Firefox, Safari, Edge
  • Requirements: GPS/Location services enabled

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ and npm
  • Modern browser with geolocation support
  • Internet connection for map tiles

Installation

  1. Clone the repository

    git clone https://github.com/c0de128/GPS-API-CLAUDE.git
    cd GPS-API-CLAUDE
  2. Install dependencies

    npm install
  3. Configure environment variables

    # Copy the environment template
    cp .env.example .env
    
    # Edit .env and add your API keys
    # Get OpenRouteService API key from: https://openrouteservice.org/dev/#/signup
  4. Start development server

    npm run dev
  5. Open in browser

    http://localhost:3000
    

πŸ” Security & Environment Setup

Required Environment Variables

Create a .env file in the root directory with the following variables:

# OpenRouteService API Configuration
VITE_OPENROUTESERVICE_TOKEN=your_openrouteservice_api_key_here

# Admin API Key for managing the GPS API server
VITE_ADMIN_API_KEY=your_secure_admin_key_here

# API Server Configuration
VITE_API_BASE_URL=http://localhost:3003

Getting API Keys

  1. OpenRouteService API Key (Required for route planning and geocoding)

  2. Admin API Key (Required for API server management)

    • Generate a secure random string
    • Use a password generator or run: openssl rand -base64 32
    • Add to VITE_ADMIN_API_KEY

Security Best Practices

  • βœ… Never commit .env files - Already excluded in .gitignore
  • βœ… Use HTTPS in production - Required for Geolocation API
  • βœ… Environment variables secured - No hardcoded secrets in source code
  • βœ… API keys protected - Environment-based configuration
  • πŸ”’ Production deployment - Ensure environment variables are set securely

Using the App

  1. Grant Location Permissions - Allow browser access to your location
  2. Start Tracking - Click "Start Tracking" to begin GPS monitoring
  3. View Live Map - Watch your location update in real-time
  4. Stop Tracking - Click "Stop Tracking" when finished

πŸ“‹ Current vs Target Features

Feature Current Status Target (PRD) Priority
GPS Tracking βœ… Implemented βœ… Required High
Interactive Maps βœ… Implemented βœ… Required High
Speed Tracking ❌ Missing βœ… Required High
Trip Management ❌ Missing βœ… Required High
Data Persistence ❌ Missing βœ… Required High
Route Replay ❌ Missing βœ… Required Medium
Data Export ❌ Missing βœ… Required Medium
Trip History ❌ Missing βœ… Required Medium

🎯 Implementation Roadmap

Phase 1: Core Trip Features

  • Speed tracking (current/avg/max)
  • Trip data models and state management
  • Local storage implementation
  • Basic trip creation and management

Phase 2: Advanced Features

  • Route recording with waypoints
  • Trip history and list view
  • Route replay functionality
  • Distance and duration calculations

Phase 3: Enhanced UX

  • Data export/import
  • Trip search and filtering
  • Performance optimizations
  • Offline support improvements

πŸ”§ Development

MCP Servers Configured

  • Augments MCP - Framework documentation and examples
  • shadcn MCP - UI component management and installation

Code Quality

# Type checking
npm run type-check

# Linting
npm run lint

# Formatting
npm run format

Testing

# Run tests
npm test

# Coverage report
npm run test:coverage

🌐 Browser Compatibility

Browser GPS Support Maps Support Status
Chrome Mobile βœ… βœ… Full Support
Safari Mobile βœ… βœ… Full Support
Firefox Mobile βœ… βœ… Full Support
Chrome Desktop βœ… βœ… Full Support
Safari Desktop βœ… βœ… Full Support
Firefox Desktop βœ… βœ… Full Support

πŸ”’ Privacy & Security

  • No Server Storage - All data processed locally
  • No Third-Party Tracking - Location data never leaves your device
  • Secure HTTPS - Required for geolocation API access
  • User Consent - Explicit permission requests for location access

πŸ“– Documentation

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new features
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For questions and support:

  • Create an issue in the repository
  • Check the documentation in /docs
  • Review the PRD in .claude/GPS Trip Tracker - PRD.md

Built with ❀️ by Kevin McKay, DFW WEB GUY

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages