How s4njeee/smartcane works
SmartCane is a mobile companion for an assistive cane. Its intended user workflow is account access, cane monitoring and location tracking, then reviewing or responding to alerts; the README also describes obstacle voice alerts, SOS, guardian monitoring and cloud synchronization. The sampled code confirms authentication setup, GPS route collection, cane-state synchronization and obstacle-alert creation. Other screens and integrations are represented only where their paths or capabilities are documented, so their runtime wiring is not inferred.
Main entry points: CaneStatusContext.tsx Cane status state · appData.ts Cane and alert data · index.tsx Welcome screen · useGoogleSignIn.ts Google sign-in
Components 22
Account access
- Welcome screen
app/index.tsx - Login
app/login.tsx - Sign up
app/signup.tsx - Google sign-in
hooks/useGoogleSignIn.ts - OAuth ID storage
utils/googleClientStore.ts - OAuth configuration
constants/googleAuth.ts - Profile management
app/profile.tsx - Edit profile
app/editprofile.tsx - Password change
app/changepassword.tsx
Cane monitoring
- Home dashboard
app/home.tsx - Cane status state
context/CaneStatusContext.tsx - Cane map
components/ui/CaneMap.tsx
Alerts and response
- Alerts screen
app/messages.tsx
Cloud services
- Firebase authentication
firebase/firebaseConfig.ts - Cane and alert data
firebase/appData.ts - Cloud data store
firebase/firebaseConfig.ts - Supabase service
firebase/supabase.ts
Other components
- User
- Device location
- SmartCane device
- Guardian
- Push notifications
Connections 25
- User → Welcome screen: opens
- Welcome screen → Login: routes to
- Welcome screen → Sign up: routes to
- Welcome screen → Google sign-in: starts sign-in
- Login → Firebase authentication: authenticates
- Sign up → Firebase authentication: authenticates
- Google sign-in → OAuth ID storage: loads client ID
- Google sign-in → OAuth configuration: builds OAuth config
- Google sign-in → Firebase authentication: signs in
- User → Home dashboard: uses
- Home dashboard → Cane status state: reads status
- Device location → Cane status state: provides coordinates
- Cane status state → Cane and alert data: subscribes and syncs
- Cane status state → Cane and alert data: creates or deletes cane
- Cane status state → Cane and alert data: creates obstacle alert
- Cane status state → Cane map: shares location
- SmartCane device → Cane status state: cane state
- Cane and alert data → Cloud data store: reads and writes
- User → Alerts screen: reviews alerts
- Alerts screen → Cane and alert data: subscribes to alerts
- User → Profile management: manages account
- Profile management → Edit profile: edits details
- Profile management → Password change: changes password
- Cane and alert data → Supabase service: syncs cloud data
- Push notifications → Guardian: notifies