PluriHive
Run, Capture, Stay Healthy
The problem PluriHive solves
π― Problem Statement
Traditional fitness apps lack gamification and competitive elements that keep users motivated. Walking and running feel like chores rather than adventures. We need a solution that:
- Makes fitness fun and engaging
- Provides real-time competition with global players
- Rewards consistent activity with tangible achievements
- Creates social proof through territory ownership
π‘ Solution
PluriHive transforms real-world movement into a competitive territory conquest game. As users walk or run, they capture hexagonal territories on a live map, compete for points, and defend their conquered areas from challengers.
Think PokΓ©mon GO meets Risk - but for fitness enthusiasts.
π Key Features
πΊοΈ Real-Time Territory Capture
- GPS-based tracking with sub-5-meter accuracy
- Hexagonal grid system overlays the real world
- Live territory visualization on Google Maps
- Route shape preservation - your exact walking path becomes your territory
π Competitive Gameplay
- Global leaderboard with real-time rankings
- Territory battles - capture others' territories by walking the same area
- Points system - earn rewards for distance, territories, and consistency
- Capture history - see who owned a territory before you
π Advanced Activity Tracking
- Multi-modal motion detection - distinguishes walking, jogging, running
- Step counter with pedometer integration
- Speed and distance tracking with GPS fusion algorithms
- Workout summaries - detailed stats for each session
π Secure Authentication
- Google Sign-In integration
- JWT-based security for API protection
- Profile customization - weight, height, age, gender for accurate calorie calculations
π Backend Architecture
- RESTful API with NestJS (TypeScript)
- PostgreSQL for scalable data persistence
- WebSocket support for real-time updates
- Geospatial queries with PostGIS for efficient territory lookups
π± Mobile-First Design
- Native Android performance with Flutter
- Offline caching for seamless experience
- Background tracking with foreground services
- Picture-in-Picture mode for multitasking
π οΈ Tech Stack
Frontend (Mobile)
| Technology | Purpose |
|---|---|
| Flutter 3.x | Cross-platform UI framework |
| Dart | Primary programming language |
| BLoC Pattern | State management with flutter_bloc |
| Google Maps Flutter | Interactive map rendering |
| Geolocator | GPS location tracking |
| Sensors Plus | Accelerometer/gyroscope for motion detection |
| Pedometer | Step counting |
| Secure Storage | Encrypted credential storage |
Backend (Server)
| Technology | Purpose |
|---|---|
| NestJS | Node.js framework with TypeScript |
| PostgreSQL | Relational database |
| TypeORM | ORM for database operations |
| JWT | Stateless authentication |
| Passport | Authentication middleware |
| WebSockets | Real-time communication |
| Docker | Containerization (optional) |
DevOps & Infrastructure
| Technology | Purpose |
|---|---|
| Render | Backend hosting (plurihubb.onrender.com) |
| Google Cloud | OAuth & Maps API |
| Git | Version control |
| GitHub | Repository hosting |
Challenges we ran into
1. πΊοΈ GPS Tracking Auto-Starting Bug
The Problem
Users reported that GPS tracking would automatically start 5 seconds after entering the map screen, even without pressing the "Start" button. The speed indicator showed "1.1 km/h" and a "Tracking: 0.01 km" banner appeared, confusing users who hadn't initiated any activity.
Root Cause
The LocationBloc was persisting its state across screen navigations. When users completed a tracking session and returned to the dashboard, then navigated back to the map screen, the bloc was still in the LocationTracking state. The BlocListener would detect this state and start updating the UI as if tracking was active.
Added a force-reset by dispatching StopLocationTracking() event before initializing the map screen. This ensures a clean state on every screen entry.
Learning: State management in Flutter requires explicit cleanup, especially with singleton blocs. Always reset to a known state when entering critical screens.
Tracks Applied (1)
Duality AI β Offroad Semantic Scene Segmentation
DUALITY
Technologies used
