A simple tool to help livestock farmers track feed costs, mortality rates, and profits. Built to solve real-world animal farming challenges in Nigeria through data
# Livestock Analytics — A Practical Break-Even & Profitability Tool
## Background
In 2023, I co-founded a livestock farm. Like many small businesses, we initially relied on manual records and intuition to guide decisions. That approach broke down quickly when feed prices increased by over 190%. At that point, effort alone was no longer enough — we needed clear, reliable numbers.
I built this tool to move our operations from paper-based tracking to structured, data-driven decision-making.
---
## What This Tool Does
This command-line application, written in **Go**, functions as a basic analytics system for livestock operations. It focuses on the core financial questions that determine whether a batch is viable or not.
**Key features include:**
- **Full-Cycle Cost Tracking**
Combines historical investment (animal purchase, prior feed, medications) with current-period expenses to calculate the true total cost of a batch.
- **Profit & Loss Projection**
Estimates potential revenue using current market prices and compares it against total investment.
- **Break-Even Analysis**
Calculates the minimum selling price per animal required to recover costs, helping prevent loss-driven sales.
- **Automated Record Keeping**
Saves each batch record to a timestamped CSV file, making it easy to analyze trends later in Excel or other tools.
---
## Why I Built It
In volatile markets, small errors can wipe out margins. This tool helps answer operational questions such as:
- How much has this batch actually cost from day one?
- Are rising feed prices pushing us below break-even?
- How do mortality losses affect overall profitability?
- At what price does selling today make financial sense?
Rather than reacting emotionally to market pressure, the goal was to make decisions grounded in data.
---
## Tech Stack
- **Go (Golang)** – Used for its simplicity, speed, and reliability in financial calculations and file handling
- **CSV Storage** – Lightweight, transparent storage that …