Skip to content

danielkosgei/farmland

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

96 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Farmland

Go Version Wails React License CI Release

A modern, cross-platform desktop application for small-scale farm management. Built with Wails (Go + React) for a native experience with a beautiful web-based UI.

Farmland Dashboard

Features

  • πŸ„ Livestock Management - Track animals with lineage (mother/father relationships)
  • 🍼 Milk Production - Record daily milk yields by animal, track sales and payments
  • πŸ‘Ά Breeding & Pregnancy - Record breeding events, track pregnancies, link calves to parents
  • 🌾 Crop Management - Manage fields, track planting cycles, costs, and yields
  • πŸ“¦ Inventory - Track supplies with low-stock alerts
  • 🍽️ Feed Management - Log daily feeding records and monitor stock levels
  • πŸ₯ Health & Vet Records - Treatments, vaccinations, and follow-up reminders
  • πŸ’° Financial Tracking - Income/expense tracking with visual summaries
  • πŸ”„ Auto-Updates - Built-in update manager with GitHub Releases integration

Installation

Download

Download the latest version for your platform from GitHub Releases:

πŸͺŸ Windows

  • Download farmland-windows-amd64-installer.exe.
  • Run the installer and follow the prompts.
  • Farmland will be installed to Program Files, with shortcuts on your Desktop and Start Menu.

🐧 Linux

We provide packages for most major distributions:

  • Debian/Ubuntu: Download farmland-linux-amd64.deb and install with sudo apt install ./farmland-linux-amd64.deb.
  • Fedora/RHEL/openSUSE: Download farmland-linux-amd64.rpm and install with sudo dnf install ./farmland-linux-amd64.rpm or rpm -i.
  • Generic: Download farmland-linux-amd64.tar.gz, extract it, and run the farmland binary.

🍎 macOS

  • Download the .zip for your architecture (arm64 for Apple Silicon, amd64 for Intel).
  • Extract and move Farmland.app to your /Applications folder.

Build from Source

Prerequisites

go install github.com/wailsapp/wails/v2/cmd/wails@latest

Linux Dependencies

# Ubuntu/Debian
sudo apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev

# Fedora
sudo dnf install gtk3-devel webkit2gtk3-devel

Build

# Clone the repository
git clone https://github.com/danielkosgei/farmland.git
cd farmland

# Install frontend dependencies
cd frontend && npm install && cd ..

# Development mode (hot reload)
wails dev

# Production build
wails build -clean

The built binary will be in build/bin/.

Development

Project Structure

farmland/
β”œβ”€β”€ app.go              # Application struct and lifecycle
β”œβ”€β”€ main.go             # Entry point with Wails configuration
β”œβ”€β”€ database.go         # SQLite database initialization
β”œβ”€β”€ models.go           # Data structures
β”œβ”€β”€ *_service.go        # Business logic services
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/ # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/      # Page components
β”‚   β”‚   └── index.css   # Design system
β”‚   └── package.json
β”œβ”€β”€ .github/
β”‚   └── workflows/      # CI/CD pipelines
└── wails.json          # Wails configuration

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Frontend (React)                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚Dashboardβ”‚ β”‚Livestockβ”‚ β”‚Breeding β”‚ β”‚ Crops   β”‚ ...       β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚          β”‚          β”‚          β”‚
        β–Ό          β–Ό          β–Ό          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Wails Runtime (IPC Bridge)                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚          β”‚          β”‚          β”‚
        β–Ό          β–Ό          β–Ό          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Backend (Go)                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚LivestockSvcβ”‚ β”‚BreedingSvcβ”‚ β”‚  CropsSvc β”‚ β”‚FinancialSvcβ”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚             β”‚             β”‚              β”‚
         β–Ό             β–Ό             β–Ό              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     SQLite Database                          β”‚
β”‚              (~/.farmland/farmland.db)                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Running Tests

go test -v ./...

Linting

# Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

# Run linter
golangci-lint run

Database

Data is stored locally in SQLite at:

  • Windows: %USERPROFILE%\.farmland\farmland.db
  • macOS/Linux: ~/.farmland/farmland.db

Backup

Simply copy the farmland.db file to back up all your data.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Releasing

Releases are automated via GitHub Actions. To create a new release:

git tag v1.0.0
git push origin v1.0.0

This triggers the release workflow which builds binaries for all platforms and creates a GitHub Release.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments