How shehri07/ghanmi works
Ghanmi is a sheep-farm management frontend for herd records, husbandry, sales, expenses, and operational oversight. A user enters through the routed app, views the dashboard or a resource screen, and can search and maintain records. Resource operations pass through a data service that selects browser-local demo storage or an API client; the dashboard has a separate mock/API data path. The README also describes breeding, health, feeding, finance, reports, and system administration; some specialized screens are explicitly placeholders. Evidence is limited to the README and sampled/indexed files.
Main entry points: App.tsx Route dispatcher · dataService.ts Data service · Dashboard.tsx Farm dashboard · ResourcePage.tsx Resource records
Components 15
Application Shell
- App bootstrap
src/main.tsx - Route dispatcher
src/App.tsx - Navigation shell
src/layouts/Layout.tsx
Farm Operations
- Resource records
src/components/ResourcePage.tsx - Resource definitions
src/data/resources.ts - Specialized screens
src/pages/SpecialPages.tsx
Data Access
- Data service
src/services/dataService.ts - Browser record store
src/services/localStore.ts - Sample records
src/data/mock.ts - Resource API
src/api/resources.ts - HTTP client
src/api/client.ts - Data mode config
src/config.ts
Insights And Administration
- Farm dashboard
src/pages/Dashboard.tsx - Metric cards
src/components/StatCard.tsx
Other components
- Farm manager
Connections 18
- Farm manager → App bootstrap: opens app
README.md - App bootstrap → Route dispatcher: renders
src/main.tsx - Route dispatcher → Navigation shell: routes through
src/App.tsx - Route dispatcher → Farm dashboard: routes to
src/App.tsx - Route dispatcher → Resource records: routes to
src/App.tsx - Route dispatcher → Specialized screens: routes to
src/App.tsx - Route dispatcher → Resource definitions: looks up resource
src/App.tsx - Resource records → Data service: requests records
src/components/ResourcePage.tsx - Resource records → Resource definitions: renders fields
src/App.tsx - Specialized screens → Resource records: renders resource
src/pages/SpecialPages.tsx - Farm dashboard → Metric cards: renders metrics
src/pages/Dashboard.tsx - Farm dashboard → HTTP client: fetches dashboard
src/pages/Dashboard.tsx - Farm dashboard → Data mode config: checks mock mode
src/pages/Dashboard.tsx - Data service → Data mode config: checks mock mode
src/services/dataService.ts - Data service → Browser record store: uses local CRUD
src/services/dataService.ts - Browser record store → Sample records: seeds records
src/services/localStore.ts - Data service → Resource API: uses API CRUD
src/services/dataService.ts - Resource API → HTTP client: uses client
src/api/resources.ts