Home

Ganaderiapp

Cover of Ganaderiapp
Year
2026
Type
Side project
Status
In development
Stack
  • Expo and React Native
  • TypeScript and expo-router
  • NativeWind (Tailwind)
  • Zustand
  • React Hook Form and Zod
  • Skia (charts)
  • Supabase Postgres and PL/pgSQL
  • Row Level Security
  • Supabase Auth, Realtime and Storage
  • Edge Functions (Deno)
  • pg_cron and pg_net
  • Expo Push Service (APNs and FCM)

Summary

Ganaderiapp is a mobile app, for iOS and Android, to run a cattle farm from the phone. It brings together the farm and its paddocks, with rotation, rest days and forage measurements, and the herd, with genealogy, weighings, photos, purchase and sale. It also covers health and reproduction, feeding, milk production, supply inventory and finances with receipts.

Reports can be exported as PDF, Excel or CSV for a bank, an accountant or a buyer. A farm can be shared with a team, with a role for each person, and the app sends alerts for vaccines, expected heat and births, low stock and paddocks that are ready. Animals, weighings and photos can be registered without a signal, and they sync when the phone is back online.

I designed and built it end to end. The app is in Spanish, with Colombian pesos and the Bogotá time zone.

22
capabilities
98
features
25
SQL migrations

Challenge & strategy

Challenge

A cattle farm in Colombia is usually run with a notebook, a spreadsheet and the memory of the person in charge. Which animal was vaccinated, when a cow is due, how much a paddock has rested, how much a supply costs and what the farm earned this month end up in different places, or in nobody's head. When the farm has partners, a foreman and a vet, the same information has to reach all of them, and each one should only change what they are responsible for.

The setting is also hard for software. Paddocks and corrals often have no signal, the phone is a mid-range Android used in the sun with one hand, and the people who need the data, such as a bank, an accountant or a buyer, do not use the app at all.

Strategy

The idea was one app for the whole farm, built around how the work happens in the field. Everything that belongs to a farm is scoped to it: the paddocks, the herd, the supplies, the money and the team. The things that cannot wait for a connection, which are new animals, weighings and photos, can be registered offline and are sent later without duplicates.

Three rules shaped the design. The domain rules live in the database, so no screen can break them, and every operation that touches several tables is one transaction. Money follows the work: buying or selling an animal, a vaccine, an insemination, feeding or buying a supply creates its expense or income by itself. And the team model is simple: an owner, co-owners with permissions per module, and partners who can only read.

User persona

Seven personas were defined. Five of them use the app, one only receives its reports, and one operates the platform.

Farm owner

Owns one or more farms. Decides purchases and sales, keeps the accounts and wants to know what the farm earns, which animals it has and what has to be done today.

Mobile app, owner role

Co-owner or administrator

A partner or relative who shares the management and writes only in the modules the owner enabled: farm, animals, finance, inventory or members.

Mobile app, co-owner role

Field foreman

Works in paddocks and corrals with poor signal. Records births, weighings, vaccines, milkings and paddock moves from the phone.

Mobile app, offline registration

Veterinarian or advisor

Reviews health, reproduction and production, and receives the health report. Can join as a read-only partner or as a co-owner with the animals module.

Mobile app and shared reports

Investor or family partner

Has a share in the farm and wants to see the herd and the alerts without changing anything.

Mobile app, partner role

Report recipient

A bank, an accountant, a cattle or milk buyer or an insurer. Does not use the app: receives the PDF, Excel or CSV the farmer shares.

Email, WhatsApp or Drive

Platform operator

Manages the global catalogs, configures the push sender and watches the scheduled jobs from Supabase.

Supabase

Implementation & design

Architecture

An Expo and React Native app is the only interface, and Supabase is the whole backend: there is no server of my own. The schema lives in 25 versioned SQL migrations, and the TypeScript types are generated from it. Click a diagram to open it at full size.

ArchitectureThe phone app, the Supabase services behind it and the push path to the phone.

Domain model

The domain is split into 12 contexts with 41 entities.

Domain contextsThe contexts of the domain, grouped by what they are for.
Money follows the workSix operations create their expense or income in the same transaction.

Data and security

Authorization is decided by the database, so the app only mirrors it. Row Level Security is on every table, denied by default, and operations that touch several tables are SQL functions that run in one transaction.

From request to dataThe checks a request passes, and how files and accounts are protected.
Roles per farmWhat the owner, a co-owner and a partner can do.

Offline operation

New animals, weighings and photos can be saved without a signal. Each one gets an identifier made on the phone, so sending it twice never duplicates it.

Offline queueWhat works without a connection, and how queued changes are synced.

Alerts and push notifications

An alert is a row written by a trigger and shown live in the app. Push notifications go through a delivery queue in Postgres, with retries and receipts.

Alerts and pushFrom a change or a schedule to the bell in the app and the notification on the phone.

Reports

Reports are built on the phone, so a farmer can send them to a bank or an accountant straight from the share sheet.

ReportsFrom farm data to PDF, Excel or CSV and the share sheet.

Decisions

DecisionWhyTrade-off
Domain logic in PostgreSQL functionsRules and transactions live next to the data, so no screen can skip them.Business logic in SQL is harder to test and to debug than in application code.
Multi-tenancy by farm with Row Level SecurityThe database rejects any query outside the person's farms, even if the app has a bug.Every table needs its policies, and a mistake in one is a data leak.
Partial offline modeOnly new animals, weighings and photos are queued, which is what the field needs most.Health, feeding, milk, finances and paddocks need a connection, and there is no conflict merge.
Inventory by movementsThe stock is a result of its history, never edited by hand, and never negative.Corrections are new movements, not edits.
Automatic income and expensesNobody has to enter the same operation twice.Deleting or editing the source does not always update the money entry.
Push queue in PostgresDeliveries survive failures, retry and leave a trace, with no external queue.At-least-once delivery and a dependency on pg_cron and pg_net being enabled by hand.
Reports built on the phoneNo report server, and the file goes straight to the share sheet.Large farms depend on the phone, and tables are capped at 20,000 rows.
Zustand and React Hook Form with Zod, no query cache libraryFewer moving parts, and the error handling lives in the services.Caching and refetching are done by hand.

Features

Version 1.0 ships everything I set out to build, and it is organized the way a farm is.

AreaWhat you can do
The farm and its pastureCreate farms and their paddocks, up to 50 at a time. Move the herd from paddock to paddock, track how many days each one has rested and record forage measurements.
The herdRegister animals with photos, buy and sell them, weigh them and see their daily gain. Follow their genealogy in a pedigree tree, and check the state of the herd from the home dashboard.
Care and productionKeep the health record and the vaccines, follow heat, inseminations and births, and log feeding and milk production.
Supplies and moneyKeep the supply inventory, record income and expenses with a photo of the receipt, and see how the farm is doing in charts.
Everything around itSign in, invite the team, get alerts, work without a signal, and export reports and backups.

Some details that make a difference day to day:

  • You do not type the money twice. When you buy or sell an animal, apply a vaccine or a treatment, inseminate a cow, feed the herd or buy a supply, the expense or the income is recorded on its own. If the person doing it has no access to finances, the work is still saved and the money part is simply left out.
  • Each person sees what they should. The owner can change everything, a co-owner only works in the modules the owner opened for them, and a partner can look but not touch. The server enforces it, and the app hides the buttons a person cannot use.
  • Alerts twice a day. At 7 in the morning and 5 in the afternoon the app reminds you of vaccines due, expected heat and births, sick animals to check on, supplies running low and paddocks ready to graze, without repeating the same alert.
  • Your account is safe to leave. You can pause your account and come back, or delete it with 15 days to change your mind and reminders 5 days and 1 day before it is gone.

Product screenshots

Promotional images of the running application with its demo data. The interface is in Spanish, the language of its users. Each one shows what the screen is for and what it brings. Click an image to open it larger.

Home, herd and financesThe three screens a farmer opens most: the dashboard in the middle, the herd on the left and the money on the right.
  • Monthly balance with a six-month chart of income and expenses.
  • Quick actions to register an animal or a new finance entry.
  • A searchable herd list with sex, breed, age, state and paddock on each card.
  • A floating tab bar for the five main sections.
Animal recordWeights, photos, milk, health and genealogy of an animal in a single place.
  • Status chips and the farm, paddock, birth date and birth weight.
  • Up to 12 photos, the first one used as the cover.
  • Weighings with the date and the origin of each one.
  • Sections for milk production, care and the pedigree tree.
Purchase, animal finances and genealogyFurther down the record, what the animal cost and where it comes from.
  • Purchase date, price and weight at purchase.
  • The income and expenses linked to the animal, such as the expense created when it was bought.
  • A button to register an expense for that animal.
  • A pedigree tree with mother and father, with placeholders while they are unknown.
FinancesIncome and expenses of the farm, with the balance of the month on top.
  • Balance, income and expenses for the selected period.
  • A list of movements with the concept, date and amount, and a form to add an expense or an income.
  • Entries created by the app itself when an animal is sold or a supply is bought.
  • Up to three receipts per entry, stored in a private bucket.
Finance reportsCharts drawn with Skia that respond to touch.
  • Income and expenses by month for the last twelve months, with a table view.
  • Accumulated balance over the year.
  • Tap a month to see its values.
  • Light and dark themes with the same palette.
Paddock rotationWhich paddocks are occupied, which are resting and when each one will be ready.
  • Occupied, resting and ready states for every paddock.
  • Rest days counted from the last occupation, with a minimum per paddock.
  • Move animals between paddocks in one action.
  • An alert when a paddock is ready to use again.
Farm detailThe hub of a farm: its herd, paddocks and daily work.
  • Active animals and paddocks at a glance, with the location and size of the farm.
  • Shortcuts to the herd, milk production and animal registration.
  • The list of paddocks with their area and the rotation view.
  • Move animals between paddocks and add paddocks in batches.

The app in motion

Short screen recordings of the app in use, played as silent loops while they are on screen.

Moving around the appThe five tabs: home, finances, herd, farms and profile.
Home dashboardBalance, quick actions and herd metrics.
Animal recordWeights, milk, care and finances of one animal.
Interactive chartsTap a month to see its income and expenses.
Light and dark themeThe theme changes without leaving the screen.
A tour of a farmFrom the farm to its paddocks and rotation.
Exporting a reportChoose a report and format, then share it.
Registering an animalThe form with validation in Spanish and Colombian formats.
FinancesMovements and the balance of the month.

Results

Ganaderiapp already does what I set out to build. You can create a farm, set up its paddocks and keep the herd in one place, with each animal's photos, weights, health, milk and family tree. Money gets tracked almost on its own, because buying an animal, giving a vaccine or buying feed creates its expense for you.

You can invite the people you work with and decide what each one can touch, get reminders for vaccines, births and low stock, and share a report as a PDF or an Excel file straight from your phone. And in the field, where there is often no signal, you can still register animals, weights and photos, and they sync when you are back online.

It is still in development, so I keep polishing it and testing it with demo data.