A full-stack location-based adventure check-in platform that gamifies outdoor exploration with GPS verification, photo sharing, business partnerships, and quest systems. Built with React, Vite, Hono, and deployed on Cloudflare's edge network.
- GPS Verification: Real-time location verification within customizable radius
- Adventure Locations: Discover hiking trails, scenic spots, and outdoor destinations
- Distance Calculation: Accurate distance tracking from your current location
- Interactive Maps: Leaflet-powered maps with custom markers and popups
- Local Business Integration: Partner businesses participate in the rewards system
- Business Check-ins: Location-verified visits to partner establishments
- Cross-Business Rewards: Enhanced point rewards for business partnerships
- Customer Authentication: Seamless login using Shopify customer accounts
- Points Redemption: Redeem adventure points for discounts in your Shopify store
- Customer Sync: Automatic synchronization between GeoApp and Shopify customers
- Reward System: Earn points in GeoApp, spend them in your Shopify store
- Adventure Photos: Upload photos of your visits for extra points
- Cloud Storage: Secure photo storage with Cloudflare R2
- Point Rewards: Earn points for both check-ins and photo uploads
- Multi-Step Challenges: Complete quests across locations and businesses
- Progress Tracking: Monitor quest completion and step progress
- Achievement System: Track progress and unlock achievements
- Point Accumulation: Earn points through various activities
- Real-time Updates: Live point tracking and leaderboards
- Achievement Badges: Unlock achievements based on activities
- Shopify Redemption: Convert points to store discounts
- React 19 with TypeScript
- Vite for lightning-fast development
- Tailwind CSS for utility-first styling
- Leaflet for interactive maps
- Lucide React for modern icons
- Hono ultralight framework
- Cloudflare Workers for edge computing
- Cloudflare D1 for serverless SQLite database
- Cloudflare R2 for object storage
- Shopify Admin API for customer authentication and management
- TypeScript for type safety
- ESLint for code quality
- PostCSS with Autoprefixer
- Node.js 20+
- npm or yarn
- Cloudflare account (for deployment)
- Shopify store with Admin API access
git clone <your-repo-url>
cd geoapp
npm installImportant: This application contains sensitive API credentials. Follow the security setup:
-
Copy configuration templates:
cp wrangler.toml.example wrangler.toml cp wrangler.json.example wrangler.json
-
Update with your credentials (see SETUP.md for detailed instructions):
- Shopify store domain
- Shopify Admin API access token
- Cloudflare D1 database ID
-
Set up Cloudflare services:
npx wrangler login npx wrangler d1 create geoapp npx wrangler d1 execute geoapp --file=./schema.sql
-
Create a Private App in Shopify:
- Go to your Shopify admin β Apps β Private apps
- Create a new private app with Admin API access
- Set scopes:
read_customers,read_shop - Copy the Admin API access token
-
Update your configuration files with the token
Start the development server:
npm run devYour application will be available at http://localhost:5173.
npm run build && npm run deploy- Never commit
wrangler.tomlorwrangler.jsonto version control - These files contain sensitive API credentials
- Use the
.examplefiles as templates - The
.gitignorefile is configured to exclude sensitive files
The application uses Cloudflare D1 (SQLite) with the following tables:
- users - User accounts with points tracking and Shopify integration
- locations - Adventure locations with GPS coordinates
- business_partners - Local business information
- checkins - User location visits with verification
- photos - Adventure photos linked to check-ins
- quests - Multi-step challenge definitions
- quest_steps - Individual tasks within quests
- user_quests - Active and completed user quests
- achievements - Gamification progress tracking
POST /api/auth/shopify/customer- Authenticate Shopify customerGET /api/auth/shopify/customer/:customerId- Get customer dataGET /api/users/:id/points- Get user pointsPOST /api/users/:id/redeem-points- Redeem points for discounts
GET /api/users/:email- Get user by emailPOST /api/users- Create new userGET /api/users/:id/checkins- Get user check-ins
GET /api/locations- Get all adventure locationsGET /api/locations/nearby- Get locations near coordinatesPOST /api/checkins- Create location check-inPOST /api/business-checkins- Create business check-in
POST /api/photos/upload-url- Get signed upload URLPOST /api/photos- Save photo metadata
GET /api/partners- Get business partnersGET /api/quests- Get available questsGET /api/users/:id/quests- Get user quest progress
GET /api/test/shopify- Test Shopify API connectionGET /api/test/customers- List available customers
- GPS-based location verification
- Interactive maps with Leaflet
- Photo upload with R2 storage
- Point-based reward system
- Quest system framework
- Business partnership integration
- Shopify customer authentication
- Points redemption system
- Customer data synchronization
- Social media integration
- Advanced achievement system
- Leaderboards and competitions
- Push notifications
- Offline support
- Mobile app (React Native)
- Shopify discount code generation
- Customer analytics dashboard
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and commit:
git commit -m 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
Monitor your deployment:
npx wrangler tailCheck logs:
npx wrangler dev --local- Cloudflare Workers Documentation
- Cloudflare D1 Documentation
- Cloudflare R2 Documentation
- Hono Documentation
- React Leaflet Documentation
- Shopify Admin API Documentation
Built with β€οΈ for adventure seekers and outdoor enthusiasts