How baptchau/gmq works
Suivi GMQ is a farm application for managing young cattle, recording live or carcass weigh-ins, and tracking average daily gain (GMQ). An operator signs in, registers animals and optional mothers, adds weigh-ins, then views animal history and calculated growth. Vue components use a shared HTTP client to reach the Express API; the API enforces account-scoped access and uses SQLite for records and GMQ calculations. Carcass weights are converted to estimated live weights using the applicable yield. The route handlers are grouped by domain despite sharing one server file; links reflect shown calls or README-documented API access.
Main entry points: api.js API client · App.vue Session and dashboard · server.js Herd routes · db.js SQLite records
Components 13
Farm interface
- Session and dashboard
frontend/src/App.vue - Account access
frontend/src/components/Login.vue - Animal registration
frontend/src/components/BroutardForm.vue - Mother records
frontend/src/components/MereManager.vue - Animal and weigh-ins
frontend/src/components/BroutardDetail.vue - API client
frontend/src/api.js
API and domain
- Account routes
backend/src/server.js - Herd routes
backend/src/server.js - Weigh-in routes
backend/src/server.js - JWT and passwords
backend/src/auth.js - Yield and GMQ
backend/src/db.js
Data storage
- SQLite records
backend/src/db.js
Other components
- Farm operator
Connections 22
- Farm operator → Account access: signs in
frontend/src/components/Login.vue - Account access → API client: requests account
frontend/src/components/Login.vue - Session and dashboard → Account access: shows when signed out
frontend/src/App.vue - Session and dashboard → Animal registration: renders
frontend/src/App.vue - Session and dashboard → Mother records: renders
frontend/src/App.vue - Session and dashboard → Animal and weigh-ins: renders
frontend/src/App.vue - Session and dashboard → API client: loads dashboard data
frontend/src/App.vue - Animal registration → API client: creates animal
frontend/src/components/BroutardForm.vue - Mother records → API client: manages mothers
frontend/src/components/MereManager.vue - Animal and weigh-ins → API client: manages weigh-ins
frontend/src/components/BroutardDetail.vue - API client → Account routes: calls account API
README.md - API client → Herd routes: calls herd API
README.md - API client → Weigh-in routes: calls weigh-in API
README.md - Account routes → JWT and passwords: hashes and signs
backend/src/server.js - Account routes → SQLite records: reads and writes accounts
backend/src/server.js - Herd routes → JWT and passwords: requires token
backend/src/server.js - Herd routes → SQLite records: reads and writes herd
backend/src/server.js - Weigh-in routes → JWT and passwords: requires token
backend/src/server.js - Weigh-in routes → SQLite records: reads and writes weights
backend/src/server.js - Herd routes → Yield and GMQ: calculates growth
backend/src/server.js - Weigh-in routes → Yield and GMQ: uses weight calculations
backend/src/server.js - Yield and GMQ → SQLite records: reads weights and yield
backend/src/db.js