How shanikn/smart_notes works
Smart Mind is a mobile notes app that resurfaces tasks by place and time. The main workflow is: a user creates or edits a note; the API stores and enriches it; the phone syncs notes and place data, then uses local alarms and geofences to notify the user, including while offline. The graph includes documented search, store-alert, account, and ranking capabilities. Several backend and mobile modules were not sampled, so their internal links are included only where the README or source index supports them.
Main entry points: main.py FastAPI routes · client.ts API client · App.tsx App navigation · pipeline.py Note enrichment
Components 25
Mobile app
- App navigation
mobile/App.tsx - Note screens
mobile/src/screens - Settings
mobile/src/screens/SettingsScreen.tsx - API client
mobile/src/api/client.ts - Firebase auth
mobile/src/context/AuthContext.tsx - Note model
mobile/src/types/notes.ts
Location and alerts
- Phone location
mobile/src/services/currentPosition.ts - Address search
mobile/src/services/addressSearch.ts - Place geofences
mobile/src/services/geofence.ts - Store alerts
mobile/src/services/storeAlerts.ts - Arrival notifications
mobile/src/services/reminderNotifier.ts - Exact alarms
mobile/src/services/scheduledReminders.ts
Backend API
- FastAPI routes
api/main.py - Places and folders
places.py - Geocoding
geocode.py - Nearby stores
nearby.py
Enrichment and ranking
- Note enrichment
agents/pipeline.py - Category inference
agents/categorizer.py - Semantic ranking
agents/relevance.py
User data
- MongoDB
notepad.py - ChromaDB vectors
agents/embedding_model.py
Other components
- User
- Firebase Auth service
- Google Places / OSM
- Phone OS services
Connections 33
- User → App navigation: uses
- App navigation → Note screens: routes to
mobile/App.tsx - App navigation → Firebase auth: mounts
mobile/App.tsx - Note screens → API client: syncs notes
- Settings → API client: manages data
- Firebase auth → Firebase Auth service: authenticates with
mobile/src/context/AuthContext.tsx - Firebase auth → API client: provides tokens
- API client → FastAPI routes: requests API
- Note screens → Note model: uses
- FastAPI routes → Note enrichment: enriches notes
api/main.py - Note enrichment → Category inference: infers note fields
agents/pipeline.py - Note enrichment → MongoDB: saves notes
agents/pipeline.py - Note enrichment → ChromaDB vectors: ingests embeddings
agents/pipeline.py - FastAPI routes → MongoDB: reads and writes
notepad.py - FastAPI routes → Places and folders: manages places
api/main.py - FastAPI routes → Geocoding: searches addresses
api/main.py - FastAPI routes → Nearby stores: finds nearby stores
api/main.py - FastAPI routes → Semantic ranking: ranks reminders
- Semantic ranking → ChromaDB vectors: uses embeddings
- Address search → Phone location: gets recent position
mobile/src/services/addressSearch.ts - Address search → FastAPI routes: searches backend
mobile/src/services/addressSearch.ts - Address search → Google Places / OSM: fallback search
mobile/src/services/addressSearch.ts - Geocoding → Google Places / OSM: queries providers
- Nearby stores → Google Places / OSM: queries OpenStreetMap
- Place geofences → Phone OS services: registers regions
mobile/src/services/geofence.ts - Place geofences → Store alerts: dispatches store events
mobile/src/services/geofence.ts - Place geofences → Arrival notifications: dispatches place events
mobile/src/services/geofence.ts - Store alerts → API client: fetches nearby data
- Arrival notifications → API client: fetches reminder notes
mobile/src/services/reminderNotifier.ts - Exact alarms → Phone OS services: schedules alarms
mobile/src/services/scheduledReminders.ts - Arrival notifications → Phone OS services: shows notifications
- App navigation → Arrival notifications: polls reminders
mobile/App.tsx - App navigation → Place geofences: starts location monitoring
mobile/App.tsx