How jxuan083/graduation-project works
Phubbing Anchor is a bilingual gathering-focus web app, also packaged as a native shell. The main user flow is: a host creates a room, friends join, participants perform a synchronized focus ritual, and the room’s live session tracks distractions before ending in a summary. The app also supports group Q&A and Taboo games, meeting records and photos, social features, and shared group pets. The graph reflects README-documented capabilities and indexed source references; several view and backend implementations were not excerpted, so their internal call paths are not inferred.
Main entry points: main.py FastAPI service · api.js REST API client · ws.js Room WebSocket · main.js App bootstrap
Components 25
Client experience
- App bootstrap
frontend/main.js - View router
frontend/core/router.js - Bilingual UI
frontend/core/i18n.js - REST API client
frontend/core/api.js
Gathering session
- Room views
frontend/views/host-room/host-room.js - Sync ritual
frontend/views/sync-ritual/sync-ritual.js - Focus session
frontend/views/focus/focus.js - Room WebSocket
frontend/core/ws.js - Session message handlers
frontend/core/wsHandlers.js - Group games
frontend/views/qa-game/qa-game.js - Taboo game logic
frontend/features/taboo/controller.js - Meeting records
frontend/views/meetings/meetings.js - Meeting photos
frontend/features/photos/controller.js
Community features
- Friend system
frontend/features/friends/controller.js - Group management
frontend/features/groups/controller.js - Shared pets
frontend/views/pet-tamagotchi/pet-tamagotchi.js - Weekly leaderboard
frontend/features/leaderboard/controller.js
Backend services
- FastAPI service
backend/main.py - Scoring logic
backend/scoring.py - Intent analysis
backend/intent.py - LLM integration
backend/llm.py - Pet state logic
backend/pet_logic.py
Identity and storage
- Firebase services
- Firebase file storage
Other components
- Participant
Connections 35
- Participant → App bootstrap: uses
README.md - App bootstrap → View router: initializes
frontend/main.js - App bootstrap → Session message handlers: registers
frontend/main.js - App bootstrap → REST API client: loads
frontend/main.js - App bootstrap → Bilingual UI: initializes
- View router → Room views: routes
- Room views → Room WebSocket: connects
- Participant → Sync ritual: joins
README.md - Sync ritual → Room WebSocket: sends actions
- Room WebSocket → FastAPI service: opens room socket
README.md - FastAPI service → Room WebSocket: sends events
README.md - Room WebSocket → Session message handlers: dispatches messages
frontend/core/ws.js - Session message handlers → Focus session: updates session view
frontend/core/wsHandlers.js - Session message handlers → Sync ritual: updates ritual view
frontend/core/wsHandlers.js - Participant → Group games: plays
README.md - Participant → Taboo game logic: plays
README.md - Taboo game logic → Room WebSocket: sends game actions
frontend/features/taboo/controller.js - Participant → Meeting records: reviews meetings
README.md - Meeting records → Meeting photos: manages photos
- Meeting photos → REST API client: fetches photos
frontend/features/photos/controller.js - Participant → Friend system: manages friends
README.md - Friend system → REST API client: requests data
frontend/features/friends/controller.js - Participant → Group management: manages groups
README.md - Participant → Shared pets: tends pet
README.md - Participant → Weekly leaderboard: views rankings
README.md - Group management → REST API client: requests data
frontend/features/groups/controller.js - Shared pets → REST API client: requests data
frontend/views/pet-tamagotchi/pet-tamagotchi.js - Weekly leaderboard → REST API client: requests data
frontend/features/leaderboard/controller.js - REST API client → FastAPI service: sends REST requests
README.md - FastAPI service → Firebase services: reads and writes
README.md - FastAPI service → Firebase file storage: stores files
README.md - FastAPI service → Scoring logic: uses scoring
backend/main.py - FastAPI service → Intent analysis: uses analysis
backend/main.py - FastAPI service → LLM integration: uses LLM
backend/main.py - FastAPI service → Pet state logic: uses pet logic
backend/main.py