How xchange-taiwan/x-talent-frontend works
X-Talent is a mentor–mentee platform. A typical journey is to authenticate, complete a profile, discover mentors, then arrange a reservation and exchange feedback after a meeting; favorites provide a separate way to save mentors. The graph preserves these documented product stages and the shared API/auth layers. Several feature implementations were not excerpted, so their connections are limited to relationships named in the SOURCE INDEX; the external backend is shown where sampled service code makes API requests.
Main entry points: page.tsx Auth flows · sessionLifecycle.ts Auth lifecycle · reservationService.ts Reservations · mentors.ts Mentor search
Components 21
Entry and identity
- Landing site
src/app/(landing)/page.tsx - Auth flows
src/app/auth/(sign)/onboarding/page.tsx - Auth lifecycle
src/lib/auth/sessionLifecycle.ts - Session bridge
src/lib/auth/bffSession.server.ts - Auth service
src/services/auth/authClient.ts
Profiles and discovery
- Profile pages
src/app/profile/[pageUserId]/container.tsx - Profile editor
src/hooks/user/profile/useProfileEditorSession.ts - Mentor search
src/services/search-mentor/mentors.ts - Search query
src/lib/mentor/mentorPoolQuery.ts - Mentor pool
src/app/mentor-pool/container.tsx
Mentor engagement
- Saved mentors
src/services/favorites/favoriteMentors.ts - Booking experience
src/components/profile/reservation/MenteeBookingForm.tsx - Mentor schedule
src/services/mentor-schedule/schedule.ts - Reservations
src/services/reservations/reservationService.ts - Reservation dashboard
src/components/reservation/ReservationDashboard.tsx - Conversation view
src/components/reservation/ReservationConversationDialog.tsx - Meeting feedback
src/hooks/user/reservation/useMeetingFeedbackForm.ts
Shared platform
- API client
src/lib/apiClient.ts - Analytics
src/lib/analytics.ts
Other components
- User
- Backend API
Connections 23
- User → Landing site: visits
README.md - User → Auth flows: authenticates
README.md - Landing site → Mentor pool: finds mentors
README.md - Auth flows → Auth lifecycle: runs auth flow
- Auth lifecycle → Session bridge: exchanges OAuth
- Auth flows → Auth service: uses auth APIs
- Auth service → API client: sends requests
src/services/auth/authClient.ts - Session bridge → Backend API: calls auth endpoints
src/lib/auth/bffSession.server.ts - Profile pages → Profile editor: opens editor
src/hooks/user/profile/useProfileEditorSession.ts - Profile editor → User: saves profile
src/hooks/user/profile/useProfileEditorSession.ts - User → Mentor search: searches mentors
README.md - Mentor search → Search query: builds query
src/lib/mentor/mentorPoolQuery.ts - Mentor pool → Mentor search: loads results
- User → Saved mentors: saves mentors
README.md - User → Booking experience: requests booking
README.md - Booking experience → Mentor schedule: uses availability
- Reservations → API client: sends requests
src/services/reservations/reservationService.ts - Reservation dashboard → Reservations: shows reservations
- Reservation dashboard → Conversation view: opens conversation
- Reservations → Conversation view: provides messages
src/services/reservations/reservationService.ts - User → Meeting feedback: submits feedback
README.md - API client → Backend API: makes API calls
src/lib/apiClient.ts - Auth lifecycle → Analytics: tracks identity
src/lib/auth/sessionLifecycle.ts