Skip to content
OnlyProjects
BCA · Mobile App DevelopmentFor educational purposes only
Code included

Village Dairy Co-op Milk Collection & Quality-Based Payment App (Java, Room, MVVM)

Morning and evening fat–SNF entries, two-axis rate-card payments, quality flags and member passbooks, fully offline

Mapped to your syllabusUniversity of Madras CBCS 2023-24 · 320S61 Mini Project (Professional Competency Skill) · Semester 6

Overview

1 min read

MilkBook is an offline-first Android app, written in Java with Room and MVVM, that runs the daily accounts of a village dairy co-operative society. In the Anand-pattern structure that Tamil Nadu's Aavin federation builds on, a primary village society collects milk from member farmers twice a day, tests fat and SNF with a milk analyser, and pays each pour by a published rate card. The clerk notes each pour in a register, reads a printed rate chart and multiplies by hand — hundreds of entries a day, tallied at night, with disputes every fortnight.

MilkBook records each collection (member, shift, weight, fat %, SNF %) in a few taps, computes the payment with the two-axis formula used across Indian dairy co-operatives — paying separately for the kilograms of fat and SNF the pour contains — and flags suspicious readings (SNF far below the society's normal band, usually added water) for a supervisor re-test. Rate cards are versioned with effective dates, so a federation revision applies only from its date and past pours keep the rate actually in force. Members get a passbook of pours, quality and payments; the clerk gets shift totals, fortnightly vouchers and CSV export for the union office.

The project is scoped as a six-week, two-member mini project for the University of Madras BCA 320S61 Mini Project (Professional Competency Skill) in Semester 6, built with the profile's Java stack — Java 17, the Android SDK, Room and WorkManager — with MPAndroidChart as a labelled industry-standard extra.

Relevant for
Tamil Nadu
Level
Advanced · 6 weeks · team of 2
Common at
University of Madras, Bharathiar University, Coimbatore, Maharshi Dayanand Saraswati University, Ajmer
Updated
Nov 2026

Syllabus alignment

University of Madras · CBCS 2023-24

320S61 · Mini Project (Professional Competency Skill) · Semester 6 · 2 credits · 40 + 60

Subjects this project applies
  • Java (220C4A) — application core and payment engine
  • RDBMS (320C5B) — SQLite relational design and rate-card joins
  • Data Structures (220C3A) — indexed lookup of effective-dated rate cards
  • Web Technology (320C5C) — CSV export/import interchange format
How it is evaluated

See your department's project guidelines.

Also fits: Bharathiar University 2023-24, MDSU CBCS 2024, GGSIPU 4-year BCA 2024.

What's in the box

11 parts · 5 free · 2 previewed · 4 unlock for ₹2,000

Problem & synopsis

6 min read

Problem statement

A primary dairy co-operative society pays its member farmers twice a day, per pour, on measured fat and SNF — yet the entire calculation runs on a paper register and a printed rate chart. Hundreds of manual lookups and multiplications a day produce arithmetic errors and fortnightly payment disputes; a rate revision invalidates the printed chart mid-fortnight, so pours near the changeover are priced inconsistently; and suspicious quality readings are discovered only at the chilling centre, after the milk has been pooled. Members have no way to check their own history, and the secretary cannot answer "what did I get paid for the first shift of the 4th?" without flipping through pages.

The problem is to build an offline-first Android application that records every pour with its quality reading, computes the two-axis payment from the rate card actually in force on that date, flags implausible readings for re-test before the milk leaves the village, and gives members, clerk and secretary each an accurate, searchable view of the same numbers — without storing any government identity numbers.

Synopsis

Abstract

Village dairy co-operatives pay members per pour, on measured quality, twice a day — one of the most arithmetic-heavy small ledgers in rural India. When the calculation lives in registers and printed charts, errors are common, rate revisions confuse old entries, and suspect readings surface only when the chilling centre rejects a lorry. This project delivers MilkBook, an offline-first Android app in Java that records each collection, computes two-axis payments from effective-dated rate cards, flags anomalous readings for re-test, and produces member passbooks, shift totals and CSV reports. It is built with Room on SQLite, MVVM (ViewModel + LiveData), Material Components and WorkManager.

Introduction

We studied the morning shift of a fictional society — Sri Varadha Milk Producers' Society near Kanchipuram (name invented for the report) — with about 180 members pouring milk across two shifts. A milk analyser prints fat and SNF, but the clerk still writes weight, fat, SNF and amount in a bound register and prices it from a printed chart. On rate-revision days the old chart is withdrawn and a new one pinned up, producing mixed-rate totals; members dispute fortnightly payments; reconstructing any past day means flipping pages.

Existing system and its limitations

  • Paper register per shift — transcription slips, no backup, no search.
  • Printed rate chart — one wrong lookup silently over- or under-pays a member.
  • Manual arithmetic for hundreds of pours, tallied late at night.
  • Rate revisions applied by replacing the chart, so pours near the changeover are disputed.
  • Quality anomalies surface only at the chilling centre, after the milk has left.
  • Fortnightly statements are handwritten; members cannot check their history.

Proposed system

  • Member enrolment (code, name, phone, default cattle type — no Aadhaar or government ID numbers).
  • Collection entry in one screen: member, shift, weight, fat %, SNF %, validated against plausible bands.
  • A two-axis payment engine: kg fat = weight × fat % ÷ 100 and kg SNF = weight × SNF % ÷ 100, each priced by the rate card in force on that date for that cattle type, plus quality bonuses.
  • Versioned rate cards with effective dates; every collection references the card that priced it.
  • A quality-flag workflow: readings outside the SNF band are flagged, re-tested, and cleared or deducted, with history kept per member.
  • Member passbook, shift summaries, fortnightly vouchers, CSV export/import and daily charts, plus a WorkManager reminder at the evening shift.

Feasibility study

  • Technical: Java (220C4A) is the programming core of the Madras CBCS BCA syllabus; Room, MVVM and WorkManager are the standard offline stack. The engine is a few arithmetic lines plus an indexed lookup.
  • Economic: runs on the clerk's existing Android phone; no server, data plan or licence cost.
  • Operational: the entry screen mirrors the register the clerk already fills, so training takes minutes.
  • Schedule: six weeks — one study, one design, two build increments, one testing, one report and demo.

Objectives

  1. 01Design a normalised SQLite schema (3NF) for members, collections, versioned rate cards, quality flags and payment vouchers.
  2. 02Implement the two-axis payment engine — kilograms of fat and SNF priced separately — with the rate card in force on each collection date.
  3. 03Support rate-card versioning with effective dates so a federation revision never rewrites historical amounts.
  4. 04Validate every reading against plausible fat/SNF bands and flag anomalies for a supervisor re-test workflow.
  5. 05Provide a member passbook, shift summaries, fortnightly payment vouchers and society-level collection charts.
  6. 06Export and import the society's data as CSV for the union office, and keep everything working fully offline.
  7. 07Schedule shift reminders with WorkManager and cover the payment rules with JUnit unit tests.

Scope

In scope

  • One primary society with 100–250 members, two daily shifts, cow and buffalo milk lines.
  • Roles: Clerk (entry), Secretary/Supervisor (rate cards, flags, reports), Member (read-only passbook on the same device).
  • Member records with a society-issued code — no Aadhaar or government ID numbers.
  • Collection entry with analyser readings, automatic amount computation, and correction with an audit note.
  • Rate cards per cattle type with effective dates, fat rate (₹/kg fat) and SNF rate (₹/kg SNF), and optional quality-bonus rules.
  • Quality flags with re-test resolution; fortnightly vouchers; CSV export/import; charts of daily quantity and average fat.

Out of scope (v1)

  • Direct money transfer to bank accounts (vouchers are printed/CSV; a UPI payout link is future scope).
  • Bluetooth/serial integration with specific milk-analyser hardware (CSV import covers it generically).
  • Union- or district-level cloud dashboards and multi-society sync.
  • Cattle feed inventory, loan ledgers and veterinary records kept by some societies.

Methodology

The project follows an incremental SDLC model: a thin end-to-end slice (member + collection + payment) is finished first, then features are added in increments, each ending in a testable build reviewed by the guide. This fits a six-week mini project because the risky part — the payment engine and rate-card lookup — is built and verified early.

PhaseWeeksActivitiesDeliverable
Requirement study1Observe two shifts at the (fictional) society, list functional and non-functional requirements, collect a sample rate card and register formatSRS and screen sketches
Design2ER diagram, DFDs, Room schema, repository interfaces, rate-card versioning designDesign document
Increment 13PIN lock and roles, member administration, rate-card versioning, collection entry with the two-axis engineCore working app
Increment 24Quality flags and re-test flow, passbook, shift summaries, WorkManager remindersFull feature set
Testing5Unit tests for the engine and validators, instrumented Room DAO tests, user acceptance with a month of synthetic dataTest report
Documentation & demo6CSV export polish, charts, report, PPT, rehearsal with the seed datasetFinal submission

Team split: Member 1 owns members, rate cards and the passbook/reporting modules; Member 2 owns the payment engine, quality-flag workflow and tests. Both write their own chapters and answer the viva for their modules.

Testing approach: JUnit unit tests pin the two-axis formula and the effective-date selection against worked examples; Room DAO tests run on an in-memory database; Espresso covers one end-to-end entry flow. Black-box test cases for each screen are recorded in a table (ID, input, expected, actual, status).

Architecture & tech stack

2 diagrams · 8 technologies · 2 min read

  • Java 17
  • Android SDK (minSdk 26, targetSdk 34)
  • Room (SQLite)
  • MVVM (ViewModel + LiveData)
  • Material Components
  • WorkManager
  • MPAndroidChart (industry-standard extra)
  • JUnit 4 + Espresso (industry-standard extra)

MilkBook is a classic three-layer Android app:

  1. UI layer — Activities and Fragments with Material Components; every screen observes state from its ViewModel; no business logic here.
  2. ViewModel + LiveData layer — survives rotation, exposes members, collections and totals as LiveData, and calls the repository only.
  3. Data layer — a repository over Room (SQLite): entities, DAOs with indexed queries, and database transactions for multi-table writes such as a collection with its payment line. WorkManager runs shift reminders; a small CSV exporter reads the same DAOs.

The payment engine is a pure Java class (no Android imports) so it is trivially unit-testable: given weight, fat, SNF and the effective rate card, it returns the amount; given a date and cattle type, a DAO query selects the card with the greatest effectiveFrom not after that date.

flowchart LR
  C[Clerk / Supervisor / Member] --> UI[Material screens]
  UI --> VM[ViewModel + LiveData]
  VM --> REPO[Repository]
  REPO --> ENG[Payment engine: two-axis amount]
  REPO --> DAO[Room DAOs]
  DAO --> DB[(SQLite)]
  REPO --> CSV[CSV exporter / importer]
  WM[WorkManager] -->|shift reminder| UI

ER diagram

erDiagram
  MEMBER ||--o{ COLLECTION : pours
  RATE_CARD ||--o{ COLLECTION : "prices"
  COLLECTION ||--o{ QUALITY_FLAG : "may raise"
  MEMBER ||--o{ PAYMENT : "is paid by"
  MEMBER ||--o{ RATE_CARD : "cattle type"

  MEMBER {
    int id PK
    string code UK
    string name
    string phone
    string defaultCattleType
  }
  RATE_CARD {
    int id PK
    string cattleType
    date effectiveFrom
    real fatRatePerKg
    real snfRatePerKg
    real bonusPerLitre
  }
  COLLECTION {
    int id PK
    int memberId FK
    date shiftDate
    string shift
    real weightKg
    real fatPct
    real snfPct
    int rateCardId FK
    real amount
  }
  QUALITY_FLAG {
    int id PK
    int collectionId FK
    string reason
    string status
    real retestFat
    real retestSnf
  }
  PAYMENT {
    int id PK
    int memberId FK
    date periodStart
    date periodEnd
    real grossAmount
    real netAmount
    date paidOn
  }

Modules

6 modules

  1. Module 01

    Authentication & Roles (Member 1)

    A device PIN lock with three roles — Clerk, Supervisor and Member-view. The session role gates navigation: only the Supervisor reaches rate cards and flag resolution, the Clerk reaches entry and summaries, and the Member view is read-only. PINs are stored as salted hashes, never in plain text.

  2. Module 02

    Member & Rate-card Administration (Member 1)

    Enrols members with a society-issued code, name, phone and default cattle type, and manages versioned rate cards: per cattle type, an effective-from date, ₹/kg fat, ₹/kg SNF and an optional quality bonus. A uniqueness rule forbids two cards of the same cattle type from sharing an effective date, so the in-force card is always unambiguous.

  3. Module 03

    Collection Entry & Two-Axis Payment Engine (Member 2)

    One screen per shift: pick member, enter weight, fat % and SNF % (validated against plausible bands), and the engine computes kilograms of fat and SNF, multiplies each by the in-force card's rates, adds bonus lines and stores the amount with a reference to the exact card used. Corrections are entered as an audit-noted edit, never a silent overwrite.

  4. Module 04

    Quality Flagging & Re-test Workflow (Member 2)

    Readings outside the society's SNF band (or fat/SNF combinations that suggest added water) are automatically flagged. The supervisor re-tests; the flag is resolved as cleared, or as confirmed with a deduction note. Flag history stays with the member, giving the society a defensible record before milk reaches the chilling centre.

  5. Module 05

    Passbooks, Vouchers & Society Dashboard (Member 1)

    A member passbook shows every pour with its shift, quality, rate-card version and amount, plus fortnightly totals. The supervisor's dashboard shows shift-wise quantity, average fat and SNF, flag counts and the payment summary; vouchers are produced per member per fortnight as printable summaries.

  6. Module 06

    CSV Export/Import, Charts & Reminders (Member 2)

    Exports collections, payments and rate history as CSV for the union office and imports a month of back-entries from a spreadsheet. MPAndroidChart (industry-standard extra) draws daily quantity and average-fat trends. WorkManager schedules a repeating reminder at the configured evening shift time so no shift is forgotten.

Slides

12 slides · titles free · bullets, notes and the .pptx unlock

  1. Slide 1

    MilkBook — Village Dairy Co-op Milk Collection & Payment App

  2. Slide 2

    Domain: How a Village Society Pays for Milk

  3. Slide 3

    Problem Statement

  4. Slide 4

    Objectives

  5. Slide 5

    Technology Stack

  6. Slide 6

    System Architecture

  7. Slide 7

    Database Design

  8. Slide 8

    The Two-Axis Payment Engine

  9. Slide 9

    Quality Flags & Re-test Workflow

  10. Slide 10

    Testing

  11. Slide 11

    Demo Screens

  12. Slide 12

    Conclusion & Future Scope

Bullets, speaker notes and the .pptx · ₹2,000

The titles above are the real outline. The rest is what you present from.

Unlock for ₹2,000

Viva questions & answers

3 of 16 answered free · 13 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 01Concept

    Explain the two-axis pricing formula your app implements.

    Indian dairy co-operatives price milk on its two main constituents. Kilograms of fat = weight × fat percentage ÷ 100, and kilograms of SNF = weight × SNF percentage ÷ 100; each is multiplied by its own rate per kilogram from the rate card, and an optional quality bonus per litre is added. This pays for what the milk actually contains rather than a flat per-litre rate.

  2. 02Concept

    Why did you choose Room over writing raw SQLiteOpenHelper code?

    Room gives compile-time-verified SQL through annotated DAOs, automatic mapping between rows and Java objects, and managed schema migrations — with raw SQLiteOpenHelper every query is a runtime string that can silently break. We also get in-memory test databases for instrumented tests, which made our DAO tests straightforward.

  3. 03Concept

    What is MVVM and why did you pick it over MVC for this app?

    MVVM separates the View (screens), the ViewModel (state and logic exposed as LiveData) and the Model (repository and database). We chose it because the ViewModel survives configuration changes — a clerk rotating the phone mid-entry must not lose the form — and because LiveData makes passbook and dashboard screens update themselves when the underlying data changes.

+13 more questions, with answers

Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.

Source code & how to run

5 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

5 steps · source code zip

Prerequisites, install, seed data and tests, written for demo day. Plus the complete source.

Unlock for ₹2,000

READMEFIRST

262 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

262 words · ~1 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

312 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

312 words · ~2 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

7 sources

  1. Android Developers — Save data in a local database using Room
  2. Android Developers — Add work with WorkManager (getting started)
  3. Department of Animal Husbandry and Dairying, Government of India
  4. National Dairy Development Board (NDDB)
  5. SQLite Documentation
  6. Material Components for Android (GitHub repository)
  7. Bill Phillips, Chris Stewart & Kristin Marsicano, Android Programming: The Big Nerd Ranch Guide, 3rd ed. (Java), Big Nerd Ranch Guides / Pearson

Cite this bundle

OnlyProjects. (2026). Village Dairy Co-op Milk Collection & Quality-Based Payment App (Java, Room, MVVM): BCA Mobile App Development project bundle [Educational resource]. https://onlyprojects.online/projects/bca-mobile-dairy-society-milk-collection-app

Future scope

1 min read

  • UPI payout integration so fortnightly vouchers can be paid and reconciled electronically.
  • Bluetooth integration with common milk-analysers and dot-matrix printers to remove even CSV as a middle step.
  • Union-level cloud sync with per-society dashboards for the bulk milk cooler and lorry planning.
  • Bilingual UI (Tamil/English) and voice prompts for low-literacy entry contexts.
  • Route and can management for pour collection centres, and an animal-health advisory module for members.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.

BCACode included

Web Development

Smart Hostel Management System

Room allocation, complaints and mess billing without the register

  • Next.js
  • TypeScript
  • Node.js
  • +3

intermediate8 wk2 students