←../back_to_projects
⚡ 2025 Project·completed·AgriTech Mobile Application

>_ How I Automated Broiler Farm FCR Calculations and Replaced Paper Logs with Real-Time Telemetry

Building a production Flutter management system for broiler farms: daily feed recording, depletion tracking, automated Feed Conversion Ratio (FCR) & Performance Index engines, and real-time multi-shed sync on Firebase.

Get it on Google Play ↗
BroilerKu — architecture.pipeline
  1. 01Flutter UI Layer
    Reactive forms & FCR dashboard cards
  2. 02Domain / FCR Engine
    Automated FCR, depletion & IP calculation
  3. 03Repository Layer
    State sync & validation rules
  4. 04Firebase / Firestore
    Real-time cloud persistence & auth

Figure 1.0 — End-to-end architecture and data flow for BroilerKu

# The Journey Overview

A broiler coop management app that replaces paper records with automatic feed efficiency (FCR) calculation.

The Starting Point (Problem)

Farmers logged feed, mortality, and daily weight on paper or in chat messages, so Feed Conversion Ratio (FCR) calculation was slow and error-prone.

Why This Matters (Outcome & Impact)

Cut the time spent on daily coop summaries and put harvest performance indicators (FCR & Performance Index) instantly on the farmer's phone.

# Phase 1: System Architecture & Pipeline

The system architecture is designed to be modular so each layer has a clearly isolated responsibility:

STAGE 01

Flutter UI Layer

Reactive forms & FCR dashboard cards

STAGE 02

Domain / FCR Engine

Automated FCR, depletion & IP calculation

STAGE 03

Repository Layer

State sync & validation rules

STAGE 04

Firebase / Firestore

Real-time cloud persistence & auth

Core Technical Deliverables

  • Daily feed, depletion (mortality), and weight sampling records per coop
  • Automatic FCR (Feed Conversion Ratio) calculation & real-time harvest estimates
  • Multi-coop data sync built on Cloud Firestore & Firebase Auth

# Phase 2: Engineering Decisions & Implementation

[Decision 01]Kept the farming calculations (FCR, depletion rate, average weight) in a pure domain layer so results stay consistent and easy to test.
[Decision 02]Used a hierarchical collection structure in Firestore (Farms -> Cycles -> DailyLogs) to speed up per-harvest-period summary queries.
[Decision 03]Designed the daily input form with sanity-range validation so coop staff do not mix up kilograms and feed sacks.
fcr_calculator.dart
class FcrCalculator {
  static double compute({
    required double totalFeedKg,
    required int livePopulation,
    required double avgWeightKg,
  }) {
    final totalBiomassKg = livePopulation * avgWeightKg;
    if (totalBiomassKg <= 0) return 0.0;
    return double.parse((totalFeedKg / totalBiomassKg).toStringAsFixed(2));
  }
}

# Phase 3: Application Screens & Operational Workflow

BroilerKu - 1. Coop Dashboard

1. Coop Dashboard

Key metrics at a glance: current FCR score, live population, and a feed consumption chart.

BroilerKu - 2. Quick Daily Input

2. Quick Daily Input

A form to record incoming feed, daily mortality, and sample weighing results.

BroilerKu - 3. Harvest Cycle Analytics

3. Harvest Cycle Analytics

Coop performance review from day 1 (DOC) to harvest to compare efficiency.