How ashish-800/street-safe works
StreetSafe is a Kolkata-focused personal safety app. The user enters through a splash screen, signs in or signs up, then uses the dashboard to reach safe routing, nearby alerts, location sharing, emergency SOS, and safety tools. The route screen scores and presents routes; alerts support community incident reporting; profile and tools cover additional safety needs. The README documents Mapbox, Supabase, and emergency-contact capabilities, but the unsampled implementations and several external-service connections cannot be verified here.
Main entry points: supabase.ts Supabase client · index.tsx Safety dashboard · ThemeContext.tsx Theme provider · route.tsx Safe route scoring
Components 22
Entry and identity
- Splash and auth check
app/index.tsx - Login and signup
app/auth/login.tsx
Safety workflows
- Safety dashboard
app/(tabs)/index.tsx - Safe route scoring
app/(tabs)/route.tsx - Map and location sharing
app/(tabs)/map.tsx - Community alerts
app/(tabs)/alerts.tsx - Profile
app/(tabs)/profile.tsx - Emergency safety tools
app/(tabs)/tools.tsx
App services
- Authentication context
src/context/AuthContext.tsx - Supabase client
src/lib/supabase.ts - Location provider
src/context/LocationContext.tsx - Theme provider
src/theme/ThemeContext.tsx - Theme colors
src/theme/colors.ts - Offline mock data
src/mock
Shared UI
- Route card
src/components/RouteCard.tsx - Kolkata map view
src/components/KolkataMap.tsx - Alert card
src/components/AlertCard.tsx - SOS button
src/components/SOSButton.tsx
Other components
- App user
- Supabase backend
- Reverse geocoding
- Mapbox services
Connections 34
- App user → Splash and auth check: opens
README.md - Splash and auth check → Supabase client: checks session
app/index.tsx - Splash and auth check → Login and signup: routes unauthenticated
app/index.tsx - Login and signup → Authentication context: signs in or up
app/auth/login.tsx - Authentication context → Supabase client: uses client
src/context/AuthContext.tsx - Supabase client → Supabase backend: connects when configured
README.md - Safety dashboard → Safe route scoring: offers safe walk
app/(tabs)/index.tsx - Safety dashboard → Map and location sharing: opens sharing
app/(tabs)/index.tsx - Safety dashboard → Community alerts: opens alerts
app/(tabs)/index.tsx - Safety dashboard → Emergency safety tools: opens tools
app/(tabs)/index.tsx - Safety dashboard → Supabase client: reads alerts and logs SOS
app/(tabs)/index.tsx - Safe route scoring → Location provider: reads current position
app/(tabs)/route.tsx - Safe route scoring → Supabase client: fetches active alerts
app/(tabs)/route.tsx - Safe route scoring → Mapbox services: requests directions
README.md - Safe route scoring → Route card: presents route choices
README.md - Map and location sharing → Location provider: uses location
app/(tabs)/map.tsx - Map and location sharing → Kolkata map view: renders map
README.md - Map and location sharing → Supabase client: uses client
app/(tabs)/map.tsx - Location provider → Reverse geocoding: reverse geocodes
src/context/LocationContext.tsx - Reverse geocoding → Mapbox services: web requests
- Community alerts → Supabase client: uses client
app/(tabs)/alerts.tsx - Community alerts → Alert card: presents alerts
README.md - Emergency safety tools → Location provider: uses location
app/(tabs)/tools.tsx - Emergency safety tools → SOS button: SOS interaction
README.md - Profile → Authentication context: uses identity
app/(tabs)/profile.tsx - Profile → Supabase client: uses client
app/(tabs)/profile.tsx - Supabase client → Offline mock data: offline fallback
README.md - Theme provider → Theme colors: selects theme colors
src/theme/ThemeContext.tsx - Safety dashboard → Theme provider: reads theme
app/(tabs)/index.tsx - Safe route scoring → Theme provider: reads theme
app/(tabs)/route.tsx - Map and location sharing → Theme provider: reads theme
app/(tabs)/map.tsx - Community alerts → Theme provider: reads theme
app/(tabs)/alerts.tsx - Profile → Theme provider: reads theme
app/(tabs)/profile.tsx - Emergency safety tools → Theme provider: reads theme
app/(tabs)/tools.tsx