How mohamedabdelmoniemsaeed/games works
Green Valley Farm (Farmly) is a bilingual farm-management web app, with an interactive farm-game experience as the entry point evidenced by the sampled runtime. The entry workflow mounts game state, displays the game shell, and lets users manage plots, livestock, orders, quests, and shop activity. A separate management UI represented in the README and source tree covers farm operations, weather, harvest planning, analytics, and profiles through FarmContext. Its connection to the entry shell is not shown, so it is kept as a distinct branch. Relationships are limited to README statements and SOURCE INDEX references; unsampled internals are not assumed.
Main entry points: GameContext.tsx Game state · FarmContext.tsx Farm state · Shell.tsx Game shell · FarmView.tsx Crop plots
Components 32
Application entry
- React mount
src/main.tsx - App provider
src/App.tsx
Farm game
- Game shell
src/ui/Shell.tsx - Game state
src/game/GameContext.tsx - Crop plots
src/ui/FarmView.tsx - Livestock
src/ui/AnimalsView.tsx - Orders
src/ui/OrdersView.tsx - Quests
src/ui/QuestsView.tsx - Farm shop
src/ui/ShopView.tsx - Game HUD
src/ui/Hud.tsx
Farm management
- Management shell
src/components/AppShell.tsx - Sign-in screens
src/components/AuthScreens.tsx - Farm map
src/components/FarmScreen.tsx - Farm dashboard
src/components/HomeScreen.tsx - Herd records
src/components/LivestockScreen.tsx - Weather advice
src/components/WeatherScreen.tsx - Harvest planner
src/components/HarvestScreen.tsx - Farm analytics
src/components/AnalyticsScreen.tsx - Farm profile
src/components/ProfileScreen.tsx - Watering advice
src/components/SmartWateringModal.tsx - Farm assistant
src/components/FarmAssistantModal.tsx - Farm map widget
src/components/FarmMap.tsx
Shared state and UI
- Farm state
src/context/FarmContext.tsx - Translations
src/locales/strings.ts - Game models
src/game/models.ts - Game rules
src/game/constants.ts - Game sounds
src/game/sound.ts - Shared game widgets
src/ui/Common.tsx - Farm structures
src/ui/FarmInfrastructure.tsx - Animal artwork
src/ui/AnimalSprites.tsx - Farm rendering
src/ui/painters.tsx
Other components
- Farm user
Connections 42
- Farm user → React mount: opens app
src/main.tsx - React mount → App provider: renders
src/main.tsx - App provider → Game state: provides state
src/App.tsx - App provider → Game shell: renders
src/App.tsx - Game shell → Game state: reads state
src/ui/Shell.tsx - Game shell → Crop plots: routes to
src/ui/Shell.tsx - Game shell → Livestock: routes to
src/ui/Shell.tsx - Game shell → Orders: routes to
src/ui/Shell.tsx - Game shell → Quests: routes to
src/ui/Shell.tsx - Game shell → Farm shop: routes to
src/ui/Shell.tsx - Game shell → Game HUD: renders
src/ui/Shell.tsx - Game state → Game models: uses types
src/game/GameContext.tsx - Game state → Game rules: uses rules
src/game/GameContext.tsx - Game state → Game sounds: plays sounds
src/game/GameContext.tsx - Crop plots → Game state: reads state
src/ui/FarmView.tsx - Crop plots → Shared game widgets: renders
src/ui/FarmView.tsx - Crop plots → Farm structures: renders
src/ui/FarmView.tsx - Crop plots → Farm rendering: renders with
src/ui/FarmView.tsx - Livestock → Game state: reads state
src/ui/AnimalsView.tsx - Livestock → Shared game widgets: renders
src/ui/AnimalsView.tsx - Livestock → Animal artwork: renders
src/ui/AnimalsView.tsx - Livestock → Farm structures: renders
src/ui/AnimalsView.tsx - Orders → Game state: reads state
src/ui/OrdersView.tsx - Quests → Game state: reads state
src/ui/QuestsView.tsx - Farm shop → Game state: reads state
src/ui/ShopView.tsx - Game HUD → Game state: reads state
src/ui/Hud.tsx - React mount → Farm state: provides state
src/main.tsx - Management shell → Farm state: reads state
src/components/AppShell.tsx - Management shell → Farm assistant: renders
src/components/AppShell.tsx - Sign-in screens → Farm state: reads state
src/components/AuthScreens.tsx - Farm map → Farm state: reads state
src/components/FarmScreen.tsx - Farm map → Watering advice: renders
src/components/FarmScreen.tsx - Farm map → Farm map widget: renders
src/components/FarmScreen.tsx - Farm dashboard → Farm state: reads state
src/components/HomeScreen.tsx - Farm dashboard → Watering advice: renders
src/components/HomeScreen.tsx - Farm dashboard → Farm assistant: renders
src/components/HomeScreen.tsx - Herd records → Farm state: reads state
src/components/LivestockScreen.tsx - Weather advice → Farm state: reads state
src/components/WeatherScreen.tsx - Harvest planner → Farm state: reads state
src/components/HarvestScreen.tsx - Farm analytics → Farm state: reads state
src/components/AnalyticsScreen.tsx - Farm profile → Farm state: reads state
src/components/ProfileScreen.tsx - Farm state → Translations: translates
src/context/FarmContext.tsx