How aiperizhenishova/bill-splitter works
This monorepo implements a bill-splitting application: users or guests create a session, add dishes and prices, share it with participants, collect selections, and review per-person totals. The Vue frontend presents these flows; its session widgets call the NestJS API, whose service coordinates session, participant, dish, and selection records. Authentication, QR uploads, and session lifecycle management are distinct capabilities. The graph reflects shown controller/service calls and README evidence (none was provided); unsampled frontend/API wiring is omitted where it cannot be verified.
Main entry points: instance.ts HTTP API client · router.ts Vue app and routes · sessions.controller.ts Session endpoints · sessions.service.ts Session workflows
Components 31
Frontend experience
- Vue app and routes
frontend/src/app/providers/router.ts - Session list
frontend/src/widgets/session-list/model/useSessionList.ts - Create session UI
frontend/src/widgets/create-session-form/model/useCreateSessionForm.ts - Guest session UI
frontend/src/widgets/guest-session/model/useGuestSession.ts - Session management UI
frontend/src/widgets/session-manage/model/useSessionManage.ts - Join and selection UI
frontend/src/features/join-session/model/useParticipant.ts - Authentication UI
frontend/src/entities/user/model/useAuth.ts - Dish management UI
frontend/src/features/manage-dishes/model/useDishes.ts - Session summary UI
frontend/src/entities/session/model/useSessionSummary.ts - Share link
frontend/src/features/share-link/model/useShareLink.ts - QR upload UI
frontend/src/widgets/qr-upload/index.vue - HTTP API client
frontend/src/shared/api/instance.ts
Session backend
- Session endpoints
backend/src/sessions/sessions.controller.ts - Session workflows
backend/src/sessions/sessions.service.ts - Standalone dish endpoints
backend/src/dishes/dishes.controller.ts - Standalone dish service
backend/src/dishes/dishes.service.ts
Identity and access
- Auth endpoints
backend/src/auth/auth.controller.ts - Auth service
backend/src/auth/auth.service.ts - JWT access guard
backend/src/auth/jwt-auth.guard.ts - Participant token guard
backend/src/sessions/guards/participant-token.guard.ts - Guest or JWT guard
backend/src/auth/guest-or-jwt.guard.ts - Optional JWT guard
backend/src/auth/optional-jwt-auth.guard.ts
Persistence and uploads
- Session records
backend/src/sessions/session.entity.ts - Participant records
backend/src/sessions/participant.entity.ts - Selection records
backend/src/sessions/selection.entity.ts - Session dish records
backend/src/sessions/session-dish.entity.ts - Dish records
backend/src/dishes/dish.entity.ts - User records
backend/src/user/user.entity.ts - QR image upload
backend/src/qr-code/s3.service.ts
Other components
- Owner or guest
- Participant
Connections 33
- Owner or guest → Vue app and routes: uses
- Participant → Vue app and routes: uses
- Vue app and routes → Create session UI: presents
- Vue app and routes → Session list: presents
- Vue app and routes → Guest session UI: presents
- Vue app and routes → Session management UI: presents
- Vue app and routes → Join and selection UI: presents
- Vue app and routes → Authentication UI: presents
- Create session UI → HTTP API client: calls
- Guest session UI → HTTP API client: calls
- Session management UI → HTTP API client: calls
- Join and selection UI → HTTP API client: calls
- Authentication UI → HTTP API client: calls
- Dish management UI → HTTP API client: calls
- Session summary UI → HTTP API client: calls
- Share link → HTTP API client: calls
- QR upload UI → HTTP API client: uploads
- HTTP API client → Session endpoints: HTTP requests
- HTTP API client → Auth endpoints: HTTP requests
- Session endpoints → Session workflows: delegates
backend/src/sessions/sessions.controller.ts - Session endpoints → Participant token guard: guards selection
backend/src/sessions/sessions.controller.ts - Session endpoints → Guest or JWT guard: guards owner routes
backend/src/sessions/sessions.controller.ts - Session endpoints → Optional JWT guard: guards creation
backend/src/sessions/sessions.controller.ts - Session endpoints → JWT access guard: guards listing
backend/src/sessions/sessions.controller.ts - Auth endpoints → Auth service: delegates
backend/src/auth/auth.controller.ts - Auth endpoints → JWT access guard: guards profile
backend/src/auth/auth.controller.ts - Session workflows → Session records: reads and writes
backend/src/sessions/sessions.service.ts - Session workflows → Participant records: reads and writes
backend/src/sessions/sessions.service.ts - Session workflows → Selection records: reads and writes
backend/src/sessions/sessions.service.ts - Session workflows → Dish records: reads and writes
backend/src/sessions/sessions.service.ts - Session workflows → QR image upload: uploads image
backend/src/sessions/sessions.service.ts - Auth service → User records: reads and writes
backend/src/auth/auth.service.ts - Standalone dish endpoints → Standalone dish service: delegates
backend/src/dishes/dishes.controller.ts