How bammyverylazy/compro_group_proj works
CPE Egg Hatch is a Flet study-and-hatching game. Its main loop runs from the landing page to a lobby, through a timed subject study session, then to hatching or a failed-session result and back to the lobby. The service layer manages sessions, rarity rolls, and pet ownership; the store supplies repositories and save-file persistence. The README also documents room play, a species dex, history, and analytics, though Phase 1 marks some of those as later-phase capabilities. Links for unsampled views and services rely on the README or SOURCE INDEX references, not inspected implementations.
Main entry points: app_context.py App context · navigator.py Screen navigation · focus_service.py Focus sessions · room_service.py Group rooms
Components 26
User interface
- Screen navigation
ui/core/navigator.py - Landing and setup
ui/landing/landing_view.py - Lobby and pets
ui/lobby/lobby_view.py - Focus screen
ui/focus/focus_view.py - Hatch and result
ui/hatch/hatch_view.py - History view
ui/result/history_view.py - Dex view
ui/dex/dex_view.py
Game services
- Focus sessions
app/services/focus_service.py - Group rooms
app/services/room_service.py - Hatch service
app/services/hatch_service.py - History analytics
app/services/analytics_service.py - Species dex
app/services/dex_service.py
Game domain
- Study session
app/domain/study_session.py - Tier odds
app/domain/tier_odds_table.py - Species catalog
app/domain/species.py - Room model
app/domain/group_room.py - Transfer objects
app/dto.py - Game statuses
app/domain/enums.py
Persistence
- Game store
app/data/game_store.py - Entity repositories
app/data/repositories.py - Save file
app/data/save_file.py
Runtime support
- App entry
main.py - App context
ui/core/app_context.py - Study clock
app/core/clock.py - Settings
app/config.py
Other components
- Player
Connections 43
- Player → App entry: opens app
- App entry → App context: creates context
main.py - App context → Game store: opens store
ui/core/app_context.py - App context → Study clock: creates clock
ui/core/app_context.py - App context → Focus sessions: creates service
ui/core/app_context.py - App context → Hatch service: creates service
ui/core/app_context.py - App context → Group rooms: creates service
ui/core/app_context.py - App context → History analytics: creates service
ui/core/app_context.py - App context → Species dex: creates service
ui/core/app_context.py - App context → Screen navigation: creates navigator
ui/core/app_context.py - Screen navigation → Landing and setup: routes to
ui/core/navigator.py - Screen navigation → Lobby and pets: routes to
ui/core/navigator.py - Screen navigation → Focus screen: routes to
ui/core/navigator.py - Screen navigation → Hatch and result: routes to
ui/core/navigator.py - Screen navigation → History view: routes to
ui/core/navigator.py - Screen navigation → Dex view: routes to
ui/core/navigator.py - Player → Landing and setup: starts game
- Landing and setup → Lobby and pets: starts focus flow
- Lobby and pets → Focus screen: starts study
- Focus screen → App context: uses services
ui/focus/focus_view.py - Focus sessions → Game store: reads and saves
app/services/focus_service.py - Focus sessions → Study clock: measures time
app/services/focus_service.py - Focus sessions → Study session: creates and stops
app/services/focus_service.py - Focus sessions → Tier odds: gets odds
app/services/focus_service.py - Focus sessions → Transfer objects: returns results
app/services/focus_service.py - Game store → Entity repositories: owns repositories
app/data/game_store.py - Game store → Save file: loads and writes
app/data/game_store.py - Group rooms → Hatch service: requests hatching
app/services/room_service.py - Hatch service → Game store: reads and saves
app/services/hatch_service.py - Hatch service → Tier odds: gets tier odds
app/services/hatch_service.py - Hatch service → Species catalog: selects species
app/services/hatch_service.py - Hatch service → Transfer objects: returns result
app/services/hatch_service.py - Group rooms → Game store: reads and saves
app/services/room_service.py - Group rooms → Study clock: measures time
app/services/room_service.py - Group rooms → Room model: creates and stops
app/services/room_service.py - Group rooms → Study session: creates and stops
app/services/room_service.py - Lobby and pets → App context: uses services
- Hatch and result → App context: uses services
- History view → History analytics: shows reports
- Dex view → Species dex: shows collection
- Group rooms → Tier odds: computes odds
app/services/room_service.py - App context → Settings: uses settings
ui/core/app_context.py - Focus sessions → Game statuses: checks status
app/services/focus_service.py