Decentralized Fitness Tracking Platform on Stellar Blockchain
A revolutionary blockchain-powered fitness tracking application that combines real-time GPS tracking with Stellar blockchain technology to create a decentralized fitness ecosystem with contests, leaderboards, and crypto rewards.
- Real-Time GPS Tracking - Professional-grade GPS accuracy with live path visualization
- Stellar Blockchain Integration - Store achievements permanently on Stellar blockchain
- Freighter Wallet Support - Secure wallet connection for Web3 functionality
- Interactive Maps - Leaflet-powered maps with real-time tracking visualization
- Fitness Contests - Join competitions and compete for crypto prizes
- Global Leaderboards - Track your performance against other runners
- Payment System - Automated prize distribution via Stellar network
- Create and join fitness contests
- Real-time leaderboard updates
- Automated winner selection
- Prize pool management
- Contest history and statistics
- Freighter wallet integration
- Secure Stellar transactions
- Prize distribution tracking
- Payment history
- Multi-currency support (XLM, USDC)
- Stunning Earth Background - CSS-animated Earth with rotating sphere and starfield
- Responsive Design - Works perfectly on desktop, tablet, and mobile devices
- Glassmorphism UI - Modern glass-effect design with smooth animations
- Professional Landing Page - Complete with features showcase and statistics
- Smooth Page Transitions - Framer Motion powered animations
- Node.js (v16 or higher)
- npm or yarn
- Freighter Wallet browser extension (Install here)
- SQLite3 (for backend database)
git clone https://github.com/yourusername/stellar-strider.git
cd stellar-stridercd backend
# Install dependencies
npm install
# Setup environment variables
cp .env.example .env
# Edit .env with your configuration
# Initialize database
npm run init-db
# Start backend server
npm startThe backend API will run on http://localhost:3001
cd frontend
# Install dependencies
npm install
# Setup environment variables
cp .env.example .env
# Edit .env with your configuration
# Start development server
npm run devThe frontend will run on http://localhost:5173
PORT=3001
NODE_ENV=development
FRONTEND_URL=http://localhost:5173
# Database
DATABASE_PATH=./database/stellar-strider.db
# Security
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
# Stellar Network
STELLAR_NETWORK=testnet
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org# Stellar Configuration
VITE_STELLAR_NETWORK=testnet
VITE_STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
# Backend API
VITE_API_URL=http://localhost:3001
# Optional: Smart Contract Address
VITE_PUBLIC_CONTRACT_ADDRESS=your-contract-address-here- Install Freighter wallet extension
- Create or import your Stellar wallet
- Click "Connect Wallet" in the app
- Approve the connection
- Click "Start Run" to begin GPS tracking
- Move around to record your path
- Watch real-time stats update
- Click "Stop Run" when finished
- Browse available contests
- Join contests that interest you
- Complete your runs during contest period
- Check leaderboards for rankings
- Win contests to earn crypto prizes
- Prizes automatically distributed to your wallet
- Track your earnings in payment history
stellar-strider/
โโโ backend/ # Express.js API Server
โ โโโ config/ # Database and app configuration
โ โโโ database/ # SQLite database files
โ โโโ models/ # Database models
โ โโโ routes/ # API route handlers
โ โ โโโ contests.js # Contest management
โ โ โโโ leaderboard.js # Leaderboard endpoints
โ โ โโโ payments.js # Payment processing
โ โโโ scripts/ # Utility scripts
โ โโโ server.js # Main server file
โ โโโ package.json
โ
โโโ frontend/ # React Application
โ โโโ public/ # Static assets
โ โ โโโ images/ # Image files
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โ โโโ LandingPage.jsx
โ โ โ โโโ SimpleMap.jsx
โ โ โ โโโ ContestPage.jsx
โ โ โ โโโ Leaderboard.jsx
โ โ โ โโโ ContestLeaderboard.jsx
โ โ โ โโโ WalletIntegration.jsx
โ โ โ โโโ ...
โ โ โโโ utils/ # Utility functions
โ โ โ โโโ stellarWallet.js
โ โ โโโ App.jsx # Main application
โ โ โโโ App.css # Global styles
โ โ โโโ main.jsx # Entry point
โ โโโ package.json
โ โโโ vite.config.js
โ
โโโ contract/ # Soroban Smart Contract (Rust)
โ โโโ src/
โ โ โโโ lib.rs # Contract logic
โ โโโ Cargo.toml
โ โโโ target/ # Compiled WASM
โ
โโโ DEPLOYMENT.md # Deployment guide
โโโ LICENSE # MIT License
โโโ README.md # This file
- React 19 - UI framework with latest features
- Vite - Fast build tool and dev server
- Framer Motion - Smooth animations and transitions
- Leaflet - Interactive mapping library
- React Leaflet - React bindings for Leaflet
- Stellar SDK - Stellar blockchain integration
- Freighter API - Wallet connection
- Node.js - JavaScript runtime
- Express.js - Web framework
- SQLite3 - Embedded database
- Helmet - Security middleware
- CORS - Cross-origin resource sharing
- Rate Limiting - API protection
- Stellar Network - Blockchain platform
- Soroban - Smart contract platform (Rust)
- Freighter - Stellar wallet
GET /api/leaderboard/global- Global leaderboardGET /api/leaderboard/contest/:contestId- Contest leaderboardGET /api/leaderboard/user/:walletAddress/rank- User rankGET /api/leaderboard/top-performers- Top performersGET /api/leaderboard/top-earners- Top earners
GET /api/contests- All contestsGET /api/contests/:id- Contest by IDGET /api/contests/:id/winners- Contest winnersGET /api/contests/status/active- Active contestsGET /api/contests/status/upcoming- Upcoming contestsGET /api/contests/status/completed- Completed contests
GET /api/payments- All paymentsGET /api/payments/:id- Payment by IDGET /api/payments/wallet/:walletAddress- User paymentsGET /api/payments/recent/all- Recent paymentsGET /api/payments/prizes/all- All prizesGET /api/payments/prizes/user/:walletAddress- User prizes
- High-accuracy GPS positioning
- Live path visualization on map
- Movement detection algorithms
- Speed and pace calculation
- Distance tracking with Haversine formula
- Validates start and end points (50m tolerance)
- Minimum 3 GPS points required
- Clear feedback messages
- Prevents invalid submissions
- Real-time timer
- Distance traveled
- Current speed
- Average pace
- GPS accuracy indicator
- Movement status
- Helmet.js - HTTP security headers
- Rate Limiting - API request throttling
- CORS Protection - Controlled cross-origin access
- Input Validation - Sanitized user inputs
- Secure Wallet Connection - Freighter integration
- Environment Variables - Sensitive data protection
- Distance challenges
- Time trials
- Speed competitions
- Custom fitness goals
- Automated winner selection
- Instant prize distribution
- Multi-place rewards (1st, 2nd, 3rd)
- Transparent payment tracking
- Real-time rankings
- Performance metrics
- Historical data
- User statistics
See DEPLOYMENT.md for detailed deployment instructions including:
- Production environment setup
- Database configuration
- Stellar network deployment
- Smart contract deployment
- Frontend build and hosting
- Backend server deployment
npm start # Start production server
npm run dev # Start development server with nodemon
npm run init-db # Initialize databasenpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint- Open DevTools (F12)
- Click Menu (โฎ) โ More Tools โ Sensors
- Under Location, select "Custom location"
- Enter coordinates (e.g., Lat: 28.6139, Lon: 77.2090)
- Start tracking in the app
- Change coordinates to simulate movement
- Return to start point to complete loop
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style
- Write clear commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass
This project is licensed under the MIT License - see the LICENSE file for details.
- โ GPS tracking system
- โ Stellar wallet integration
- โ Contest system
- โ Leaderboards
- โ Payment processing
- Mobile app (React Native)
- Social features and friend challenges
- Advanced analytics dashboard
- NFT rewards for achievements
- Wearable device integration
- Multi-chain support
- DAO governance
- Marketplace for fitness NFTs
- Staking and yield farming
- Virtual races and events
- Documentation: Check this README and DEPLOYMENT.md
- Issues: GitHub Issues
- Email: support@stellarstrider.app
- Discord: Join our community server
- Stellar Development Foundation - Blockchain infrastructure
- OpenStreetMap - Mapping data
- Leaflet - Mapping library
- React Team - UI framework
- Freighter Team - Wallet integration
- All contributors and testers
- 1,247 Total Runs Recorded
- 89 Active Users
- 15.4K KM Tracked
- 342 Contests Completed
๐ Transform Your Fitness Journey with Blockchain ๐