A collective intelligence platform that detects human discomfort and environmental hazards using real-time map movement analysis and community reporting.
StreetPulse transforms passive GPS data into a live interactive safety map, identifying anomalies like:
- Sudden speed drops
- Unusual reroutes
- Hesitation patterns
These signals are combined with user-reported dangers to generate dynamic risk scores in real time.
- 🧠 Collective Intelligence-based safety detection
- 📊 Real-time dynamic risk scoring (0–100)
- 🗺️ Safe route recommendation (SafeNav)
- ⚡ Live updates using WebSockets
- 🆘 Emergency SOS (no paid SMS needed)
- 🔒 Privacy-first (no personal data stored)
- Full-screen interactive dark map (Leaflet.js)
- H3 hexagonal zones showing risk levels
- Real-time user location tracking
- Floating action buttons (SOS + Danger Report)
- Live statistics panel
| Level | Color | Score Range | Meaning |
|---|---|---|---|
| 🟢 Safe | Green | 0–33 | Normal movement |
| 🟡 Caution | Amber | 34–66 | Moderate anomalies |
| 🔴 High Risk | Red | 67–100 | Dangerous zone |
Clicking a zone shows:
Risk Score: 45/100
Slowdowns: 3
Reroutes: 1
Danger Reports: 2
Users: 4
- Search destination using OpenStreetMap
- Route generated via OSRM
- Route is analyzed against risk zones
| Status | Meaning |
|---|---|
| ✅ Safe | No risky zones |
| Passes caution zones | |
| 🚨 High Risk | Passes danger zones |
- Triggered when entering risky zones
- Auto-dismiss in 6 seconds
- Context-aware messages
Example:
🚨 High Risk Zone
Multiple users slowed down here recently
- One-tap emergency sharing
- Uses Web Share API
- Works with WhatsApp, Messages, etc.
- One-tap unsafe location reporting
- Instant risk recalculation
- WebSocket broadcast to all users
- Anti-spam protection (rate limiting)
Displays:
- Active zones
- Risk distribution
- Connection status
- React 18
- TypeScript
- Vite
- Leaflet.js
- H3-js
- Socket.io Client
- Node.js
- Express.js
- PostgreSQL + PostGIS
- Redis (optional)
- Socket.io
- Render (hosting)
- PostgreSQL (cloud DB)
- Client captures GPS and sends signals
- Server processes anomalies and computes risk
- Database stores geo and risk data
- WebSocket provides real-time updates
- GPS data collected
- Sent every 5 seconds
- Anomalies detected
- Weighted scoring
- Trust and time factors applied
- Classified into Safe / Caution / High Risk
- Broadcast via WebSockets
- Map updates instantly
- Old data auto-deleted
- Risk recalculated every 2 minutes
Risk Score = Speed Drops + Reroutes + Danger Reports + Time Factor
→ Adjusted using Trust + Multi-user signals
→ Normalized to 0–100
- No login required
- Anonymous session IDs
- SHA-256 hashing
- Data auto-deletes after 15 minutes
- Rate limiting enabled
POST /api/signals → Send GPS data
POST /api/danger-tap → Report unsafe area
POST /api/alerts/check-location
GET /api/alerts/active-risks
GET /api/health
- raw_signals
- anomalies
- danger_taps
- geo_cells
- user_trust
git clone
cd server npm install
cd ../client npm install
cd server npm run dev
cd client npm run dev
Backend:
- Build: npm install && npm run build
- Start: npm start
Frontend:
- Build: npm run build
- Publish: client/dist
| Feature | Description |
|---|---|
| 🧠 Collective Intelligence | Multi-user safety detection |
| 📊 Risk Scoring | Dynamic safety levels |
| 🛡️ Trust Engine | Prevents fake reports |
| 🆘 SOS | Emergency sharing |
| ⚡ Real-time Updates | Instant map refresh |
| 🗺️ SafeNav | Safe route suggestions |
| 🔒 Privacy | No personal data |
| 🌙 Night Mode | Risk increases at night |
| ♻️ Auto Decay | Self-healing system |
StreetPulse is not just a map — it’s a real-time safety intelligence system powered by people.
⚡ Engineered for safer communities.