Skip to content

marcosschlick/milk-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MilkFlow

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.

Stack

  • Node.js and Express for the backend API
  • PostgreSQL for persistent storage
  • Flutter for the Web and Android client
  • Docker Compose for local orchestration

Configuration

Create a local environment file from the provided example:

cp .env.example .env

Before 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.

Running With Docker

docker compose up --build

Exposed 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 --build

Running Flutter Locally

cd frontend
flutter pub get
flutter run -d chrome --dart-define=API_BASE_URL=http://localhost:3000

To generate a production Web build:

flutter build web --dart-define=API_BASE_URL=http://localhost:3000

Running The API Locally

cd backend
npm install
npm start

About

Dairy herd management prototype built with Flutter, Node.js/Express, PostgreSQL, and Docker for IFSul Code Day 2025.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors