MilkFlow is a dairy herd management prototype built during IFSul Code Day 2025. The project was developed as a hackathon solution for tracking cattle, milk production, weights, reproductive events, and operational alerts.
This repository is kept as an archived project record. It contains a Node.js/Express API backed by PostgreSQL and a Flutter Web/Android client for basic herd and milking workflows.
- Node.js and Express for the backend API
- PostgreSQL for persistent storage
- Flutter for the Web and Android client
- Docker Compose for local orchestration
Create a local environment file from the provided example:
cp .env.example .envBefore running the project, replace JWT_SECRET with a long random string.
When using Docker, Compose overrides DB_HOST=db for the backend service. When
running the API directly on your machine, use DB_HOST=localhost.
docker compose up --buildExposed services:
- Web client:
http://localhost:8080 - API server:
http://localhost:3000 - PostgreSQL:
localhost:5432
The database schema is initialized from init.sql only when the PostgreSQL
volume is created for the first time. If the schema changes and you need a fresh
local database, recreate the volume:
docker compose down -v
docker compose up --buildcd frontend
flutter pub get
flutter run -d chrome --dart-define=API_BASE_URL=http://localhost:3000To generate a production Web build:
flutter build web --dart-define=API_BASE_URL=http://localhost:3000cd backend
npm install
npm start