How anang-programmer/sesuaidompet works
SesuaiDompet is a smartphone decision-support web app: users manage criteria and phone alternatives, set a budget and comparison set, then receive a ranked recommendation calculated with SAW. It also exposes the calculation steps, saved history, and SEDO AI for conversational phone lookup and recommendation explanations. The graph follows evidenced routing, data access, and calculation calls; the AI service-to-edge-function link is shown as unverified because the excerpts do not expose its invocation.
Main entry points: App.jsx Routes and providers · spkService.js SPK data service · useSawExecution.js SAW execution hook · SedoAI.jsx SEDO AI assistant
Components 22
Application
- Routes and providers
src/App.jsx - Authentication provider
src/context/AuthProvider.jsx - Auth context hook
src/hooks/useAuth.js - Login and registration
src/pages/Login.jsx - Dashboard
src/pages/Dashboard.jsx
Decision workflow
- Criteria management
src/pages/Kriteria.jsx - Phone alternatives
src/pages/Alternatif.jsx - Phone assessment
src/pages/Penilaian.jsx - Budget comparison
src/pages/Bandingkan.jsx - SAW execution hook
src/hooks/useSawExecution.js - Calculation breakdown
src/pages/Perhitungan.jsx - Ranked results
src/pages/Hasil.jsx - Calculation history
src/pages/Riwayat.jsx
Data and calculation
- SAW calculator
src/utils/sawCalculator.js - SPK data service
src/services/spkService.js - Supabase client
src/lib/supabase.js - Supabase data store
SEDO AI
- SEDO AI assistant
src/pages/SedoAI.jsx - AI service
src/services/sedoAiService.js - SEDO AI edge function
supabase/functions/sedo-ai/index.ts - Markdown renderer
src/components/MarkdownRenderer.jsx
Other components
- User
Connections 29
- User → Routes and providers: uses app
src/App.jsx - Routes and providers → Authentication provider: wraps routes
src/App.jsx - Routes and providers → Dashboard: routes to
src/App.jsx - Routes and providers → Criteria management: routes to
src/App.jsx - Routes and providers → Phone alternatives: routes to
src/App.jsx - Routes and providers → Phone assessment: routes to
src/App.jsx - Routes and providers → Budget comparison: routes to
src/App.jsx - Routes and providers → Calculation breakdown: routes to
src/App.jsx - Routes and providers → Ranked results: routes to
src/App.jsx - Routes and providers → Calculation history: routes to
src/App.jsx - Routes and providers → SEDO AI assistant: routes to
src/App.jsx - User → Login and registration: signs in
- Login and registration → Auth context hook: uses auth
src/pages/Login.jsx - Authentication provider → Supabase client: uses client
src/context/AuthProvider.jsx - Criteria management → SPK data service: loads and updates
src/pages/Kriteria.jsx - Phone alternatives → SPK data service: manages phones
src/pages/Alternatif.jsx - Phone assessment → SPK data service: loads phone data
src/pages/Penilaian.jsx - Budget comparison → SAW execution hook: runs comparison
src/pages/Bandingkan.jsx - SAW execution hook → SPK data service: fetches inputs
src/hooks/useSawExecution.js - SAW execution hook → SAW calculator: calculates ranking
src/hooks/useSawExecution.js - Calculation breakdown → SAW execution hook: uses results
src/pages/Perhitungan.jsx - Ranked results → SAW execution hook: uses results
src/pages/Hasil.jsx - Calculation history → SPK data service: loads history
src/pages/Riwayat.jsx - SPK data service → Supabase client: queries through
src/services/spkService.js - Supabase client → Supabase data store: reads and writes
- SEDO AI assistant → AI service: requests AI tasks
src/pages/SedoAI.jsx - SEDO AI assistant → SPK data service: loads and saves phones
src/pages/SedoAI.jsx - AI service → SEDO AI edge function: invokes function
- SEDO AI assistant → Markdown renderer: renders responses
src/pages/SedoAI.jsx