How jddd-hy/youjian works
Youjian is a small-group focus companion: members create or join a private space, start a timed focus session, and see one another’s live status. The app also supports statistics and exports, unanimous shared-goal proposals, achievements, personal deadlines, and account recovery/device transfer. The graph follows the documented user workflow and the sampled routing/API/realtime evidence; several feature pages and integrations are represented at their source paths because their implementation was not sampled.
Main entry points: router.tsx App router · HomePage.tsx Focus home · api.ts RPC API · SettingsPage.tsx Space settings
Components 19
Entry and membership
- App router
src/app/router.tsx - Create space
src/routes/CreateSpacePage.tsx - Join by invite
src/routes/InvitePage.tsx - Identity transfer
src/routes/IdentityTransferPage.tsx - Space settings
src/routes/SettingsPage.tsx
Focus experience
- Focus home
src/routes/HomePage.tsx - Session display
src/components/focus/FocusPanel.tsx - Focus health check
src/components/FocusHealthCheckController.tsx - Personal deadline
src/components/deadlines/DeadlineEditorModal.tsx
Goals and insights
- Focus statistics
src/routes/StatsPage.tsx - Shared goals
src/routes/GoalsPage.tsx - Achievement rules
src/domain/achievementCatalog.ts
Shared services
- Room realtime
src/hooks/useRoomRealtime.ts - Data export
src/lib/focusExport.ts - RPC API
src/lib/api.ts - Space boundary
src/lib/spaceBoundary.ts - Supabase client
src/lib/supabase.ts
Other components
- Member
- Supabase backend
Connections 27
- Member → App router: opens app
README.md - App router → Create space: routes to
src/app/router.tsx - App router → Join by invite: routes to
src/app/router.tsx - App router → Identity transfer: routes to
src/app/router.tsx - App router → Focus home: routes to
src/app/router.tsx - App router → Focus statistics: routes to
src/app/router.tsx - App router → Shared goals: routes to
src/app/router.tsx - App router → Space settings: routes to
src/app/router.tsx - Member → Create space: creates space
README.md - Member → Join by invite: joins space
README.md - Member → Focus home: starts focus
README.md - Focus home → RPC API: requests snapshots
src/routes/HomePage.tsx - Focus home → Space boundary: checks space
src/routes/HomePage.tsx - Space boundary → RPC API: reports mismatch
src/lib/spaceBoundary.ts - RPC API → Supabase client: calls RPC
src/lib/api.ts - Supabase client → Supabase backend: uses service
- Focus home → Room realtime: tracks room
src/routes/HomePage.tsx - Room realtime → Supabase client: subscribes
src/hooks/useRoomRealtime.ts - Focus home → Session display: shows session
README.md - Focus home → Focus health check: handles check
src/components/FocusHealthCheckController.tsx - Focus home → Personal deadline: sets deadline
README.md - Member → Focus statistics: reviews time
README.md - Focus statistics → Data export: exports records
README.md - Member → Shared goals: proposes goal
README.md - Shared goals → Achievement rules: shows achievements
src/routes/GoalsPage.tsx - Member → Space settings: manages space
README.md - Space settings → RPC API: saves changes
src/routes/SettingsPage.tsx