# Ksheera Sagara - Dairy Profit/Loss Calculator
## Project Title: 29 - Android App Development using GenAI - Ksheera Sagara (Agriculture)
---
## About The App
*Ksheera Sagara* is a simple Android app designed for dairy farmers to track their daily milk income and expenses. It calculates net profit/loss and helps farmers understand their financial health at a glance.
Many dairy farmers receive a Milk Slip every day but do not have a way to track their monthly profit after subtracting costs like feed, medicines, and labor. This app solves that problem.
---
## Features
| Feature | Description |
|---------|-------------|
| Income Log | Enter liters, fat percent, rate per liter, and cow name |
| Expense Log | Record expenses with categories: Fodder, Medical, Labor, Electricity, Other |
| Profit Dashboard | Green/Red financial health indicator showing net profit or loss |
| Cow-wise Analysis | Shows income per cow to identify most profitable ones |
| Expense Breakdown | Displays spending by category |
| Clear Income | Delete all income records with confirmation dialog |
| Clear Expenses | Delete all expense records with confirmation dialog |
| Clear All Data | Reset entire app data with confirmation dialog |
| Home Screen Icon | App appears on home screen with a green icon |
---
## Tech Stack
- Language: Java
- IDE: Android Studio
- Database: Room (SQLite)
- UI: Material Components, CardView
- Min SDK: API 24 (Android 7.0)
- Target SDK: API 34 (Android 14)
---
## Project Structure
KsheeraSagara/
├── app/
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/main/
│ ├── AndroidManifest.xml
│ ├── java/com/ksheera/sagara/
│ │ ├── MainActivity.java
│ │ ├── data/
│ │ │ ├── AppDao.java
│ │ │ ├── AppDatabase.java
│ │ │ ├── ExpenseEntry.java
│ │ │ └── IncomeEntry.java
│ │ └── ui/
│ │ ├── AddIncomeActivity.java
│ │ ├── AddExpenseActivity.java
│ │ └── …