How sotercare/web-dev-v2 works
SoterCare is a Next.js product website with a public community and news presence, a protected newsroom editor, and an authenticated live-monitoring dashboard. Public visitors browse product information, community details, and published articles; editors manage articles; caregivers use the dashboard to monitor vitals, alerts, devices, and activity. The graph reflects documented routes and sampled imports/calls. Several dashboard API handlers and editor internals were not sampled, so uncertain links are omitted; the README documents their capabilities.
Main entry points: dashboardApi.ts Dashboard API client · news-store.ts News store · page.tsx News index · useAlerts.ts Alert handling
Components 28
Public experience
- Product homepage
src/components/HomePage.tsx - Developer community
src/app/community/page.tsx - Community links
src/app/community/page.tsx
News publishing
- News index
src/app/news/page.tsx - Article page
src/app/news/[slug]/page.tsx - News store
src/lib/news-store.ts - Article sorting
src/lib/news-sort.ts - Article model
src/types/news.ts - Newsroom editor
src/app/editnews/NewsEditor.tsx - News actions
src/app/dashboard/news-actions.ts
Care dashboard
- Dashboard login
src/app/dashboard/login/page.tsx - Dashboard shell
src/components/dashboard/DashboardLayoutClient.tsx - Monitoring overview
src/app/dashboard/page.tsx - Activity timeline
src/app/dashboard/timeline/page.tsx - Alert handling
src/lib/useAlerts.ts - Device selection
src/lib/useDeviceId.ts - Recycle bin
src/app/dashboard/recycle-bin/page.tsx - Realtime events
src/components/dashboard/WebSocketContext.tsx - Dashboard API client
src/lib/dashboardApi.ts - Dashboard API routes
src/app/api
Shared services
- Authentication
src/lib/auth.ts - API client
src/lib/api.ts - SEO metadata
src/lib/seo.ts - Site summary feed
src/app/llms.txt/route.ts - Email templates
src/emails/WelcomeWaitlist.tsx
Other components
- Site visitor
- Caregiver
- Email delivery
Connections 34
- Site visitor → Product homepage: browses
- Site visitor → Developer community: visits
- Site visitor → News index: browses
- Product homepage → SEO metadata: builds metadata
src/app/page.tsx - Product homepage → Developer community: links to
- Developer community → Community links: presents
src/app/community/page.tsx - News index → News store: reads
src/app/news/page.tsx - News index → Article sorting: sorts articles
src/app/news/page.tsx - News index → Article page: links articles
src/app/news/page.tsx - Article page → News store: reads
src/app/news/[slug]/page.tsx - Article page → Article sorting: sorts related
src/app/news/[slug]/page.tsx - Newsroom editor → News actions: uses actions
- Newsroom editor → News store: updates articles
- News store → Article model: stores records
src/lib/news-store.ts - Caregiver → Dashboard login: signs in
- Dashboard login → Authentication: authenticates
src/app/dashboard/login/page.tsx - Dashboard login → API client: requests token
src/app/dashboard/login/page.tsx - Dashboard shell → Realtime events: provides context
src/components/dashboard/DashboardLayoutClient.tsx - Caregiver → Monitoring overview: monitors care
- Caregiver → Activity timeline: reviews activity
- Caregiver → Recycle bin: reviews dismissed events
- Activity timeline → Dashboard API client: loads timeline
src/app/dashboard/timeline/page.tsx - Activity timeline → Device selection: selects device
src/app/dashboard/timeline/page.tsx - Alert handling → Device selection: gets device
src/lib/useAlerts.ts - Alert handling → Realtime events: receives events
src/lib/useAlerts.ts - Alert handling → Dashboard API client: loads and updates
src/lib/useAlerts.ts - Device selection → Dashboard API client: queries devices
src/lib/useDeviceId.ts - Realtime events → Dashboard API routes: connects to services
- Dashboard API client → API client: delegates requests
src/lib/dashboardApi.ts - Dashboard API client → Dashboard API routes: calls routes
- Site summary feed → News store: reads articles
src/app/llms.txt/route.ts - Site summary feed → Article sorting: sorts articles
src/app/llms.txt/route.ts - Site summary feed → SEO metadata: uses site URL
src/app/llms.txt/route.ts - Email templates → Email delivery: sent through