How dinh-huu-phuc/couple works
Couple is a private shared space for partners to connect, write wishes, draw a partner’s wish, respond, and save completed moments as memories. The main user journey is documented in the README; the sampled source confirms the web app’s Supabase client and key admin and deletion flows. Several feature implementations and their runtime wiring were not sampled, so those workflow links are attributed to the README rather than inferred from imports.
Main entry points: dashboard.tsx Admin console · server.ts Admin actions · route.ts Inactivity cleanup · index.ts Deletion endpoint
Components 25
Couple web app
- Couple app
fe/apps/web/src/app - Account access
fe/apps/web/src/features/auth/auth-form.tsx - Partner connection
fe/apps/web/src/features/connect/connect-page.tsx - Wish box
fe/apps/web/src/features/wishes/wishes-page.tsx - Wish draws
fe/apps/web/src/features/draws/draw-card.tsx - Gentle responses
fe/apps/web/src/features/chat/chat-page.tsx - Shared memories
fe/apps/web/src/features/memories/memories-page.tsx - Profile settings
fe/apps/web/src/features/settings/settings-page.tsx - User support
fe/apps/web/src/features/support/support-page.tsx - Server Supabase client
fe/apps/web/src/lib/supabase/server.ts
Administration
- Admin console
fe/apps/admin/src/admin/dashboard.tsx - Admin actions
fe/apps/admin/src/admin/server.ts - Account operations
fe/apps/admin/src/admin/accounts.tsx - Feedback moderation
fe/apps/admin/src/admin/feedback.tsx - Operations data
fe/apps/admin/src/admin/operations-data.ts - Inactivity cleanup
fe/apps/admin/src/app/api/inactivity-cleanup/route.ts
Public landing
- Product landing
fe/apps/landing/src/app/page.tsx - Landing motion
fe/apps/landing/src/components/landing-motion.tsx
Backend services
- Admin credentials
be/admin/auth.mjs - Account erasure
be/supabase/functions/delete-account/erasure.ts - Deletion endpoint
be/supabase/functions/delete-account/index.ts
Other components
- Partner
- Administrator
- Supabase
- Site visitor
Connections 23
- Partner → Couple app: uses
README.md - Couple app → Account access: opens account
README.md - Account access → Partner connection: then connects
README.md - Partner connection → Wish box: then writes
README.md - Wish box → Wish draws: partner discovers
README.md - Wish draws → Gentle responses: responds to
README.md - Gentle responses → Shared memories: records moment
README.md - Partner → Profile settings: manages profile
README.md - Partner → User support: requests help
- Server Supabase client → Supabase: creates client
fe/apps/web/src/lib/supabase/server.ts - Administrator → Admin console: uses
- Admin console → Admin actions: requests actions
fe/apps/admin/src/admin/dashboard.tsx - Admin actions → Admin credentials: checks credentials
fe/apps/admin/src/admin/server.ts - Admin actions → Supabase: calls admin RPCs
fe/apps/admin/src/admin/server.ts - Admin actions → Operations data: uses operations data
fe/apps/admin/src/admin/server.ts - Admin console → Account operations: renders accounts
fe/apps/admin/src/admin/dashboard.tsx - Admin console → Feedback moderation: renders feedback
fe/apps/admin/src/admin/dashboard.tsx - Inactivity cleanup → Account erasure: cleans inactive
fe/apps/admin/src/app/api/inactivity-cleanup/route.ts - Inactivity cleanup → Supabase: uses backend client
fe/apps/admin/src/app/api/inactivity-cleanup/route.ts - Deletion endpoint → Account erasure: runs erasure
be/supabase/functions/delete-account/index.ts - Deletion endpoint → Supabase: uses auth and storage
be/supabase/functions/delete-account/index.ts - Site visitor → Product landing: views
fe/apps/landing/src/app/page.tsx - Product landing → Landing motion: renders motion
fe/apps/landing/src/app/page.tsx