Pecus Logo

Pecus

Enterprise-Grade Multi-Tenant Farm Management System

Production Live β€’ https://farmerp.estimo.in
πŸ“Š View Detailed Milestones & Timeline
15
Microservices
Backend Complete
205
API Endpoints Built
Integration Test Pending
5/13
Kafka Services
35% Complete ⚑
65%
Platform Progress
Mobile Layout Started
πŸ—οΈ
System Architecture
Microservices

Multi-Tenant SaaS Architecture

🌐 Client Layer
React Web App React Native Mobile (In Progress) Progressive Web App Offline-First Support
↓
πŸ”’ Security & Gateway
Nginx + SSL API Gateway Rate Limiting JWT Auth CORS & Helmet
↓
⚑ Backend Services (12 Microservices)
Authentication Tenant Management Livestock Crops & Fields Inventory Tasks Finance CRM & Orders Traceability AI Analytics Sync Service Veterinary Healthcare
↓
πŸ’Ύ Data & Messaging Layer (Multi-Tenant)
PostgreSQL 16 Prisma ORM MongoDB (Logs) Redis Cache Kafka Event Bus RabbitMQ Schema Registry Schema Isolation
πŸš€
Backend Services & API
15 Services βœ“ β€’ 205 Endpoints β€’ Integration Test Pending
πŸ” Authentication
Live
User authentication with JWT tokens and demo credentials for testing.
API Endpoints 15/15
Login, Register, Logout, Refresh Token
User Management (CRUD)
Password Reset & Email Verification
Role-Based Access Control
πŸ„ Livestock Management
Live
Animal tracking and management with registration capabilities.
API Endpoints 21/24
Animal CRUD + Health Records
Breeding & Vaccination Tracking
QR Code Generation
Custom Fields Support (6 endpoints)
🌾 Crop & Field Management
Live
Field and crop tracking system with field information and crop lifecycle data.
API Endpoints 2/2
GET /api/crops (List crops)
GET /api/crops/fields (List fields)
Demo Data: Field & crop info
Status tracking
πŸ“¦ Inventory Management
Live
Stock management with alerts for low stock and expiring items.
API Endpoints 3/3
GET /api/inventory (All items)
GET /api/inventory/low-stock
GET /api/inventory/expiring
Demo Data: 2 inventory items
βœ… Task Management
Live
Task tracking and assignment system with priority and status management.
API Endpoints 1/1
GET /api/tasks (List tasks)
Demo Data: 2 tasks
Priority levels (high, medium, low)
Status tracking
πŸ’° Finance Management
Live
Financial management with invoice tracking and reporting.
API Endpoints 26/31
Invoice Management + PDF Generation
Expense Tracking
Financial Reports (P&L, Cash Flow, Tax)
Custom Fields Support (6 endpoints)
πŸ‘₯ CRM & Customers
Live
Customer relationship management with customer data and purchase history.
API Endpoints 24/30
Customer & Order Management
Lead Management & Conversion
Sales Pipeline Tracking
Custom Fields Support (6 endpoints)
πŸ” Traceability
Live
Product batch tracking for supply chain visibility and compliance.
API Endpoints 1/1
GET /api/traceability/batches
Demo Data: 1 batch
Batch number tracking
Stock status monitoring
πŸ€– AI Analytics Engine
Live
AI-powered predictions and analytics for farm operations and market insights.
API Endpoints 5/5
GET /api/ai/analytics/dashboard
POST /api/ai/predict/yield
GET /api/ai/predict/health-anomalies
POST /api/ai/predict/feed-optimization
POST /api/ai/predict/market-price
πŸ₯ Veterinary Healthcare
NEW
Complete veterinary and animal healthcare management with appointments, treatments, and health analytics.
API Endpoints 57/57
Appointments & Medical Records (10)
Treatments & Vaccinations (10)
Lab Results & Procedures (6)
Quarantine & Disease Tracking (6)
Veterinarian Management (5)
Health Alerts & Analytics (8)
πŸ’»
Frontend Application Pages
19 Pages Complete β€’ React + TypeScript
πŸ” Authentication
Live
User authentication and registration with JWT token management.
Pages 2/2
Login.tsx - User login with validation
Register.tsx - New user registration
Auto-redirect & protected routes
Persistent sessions with Zustand
πŸ“Š Dashboard
Live
Real-time analytics and overview with charts and statistics.
Pages 1/1
Dashboard.tsx - Main analytics view
Interactive charts (Recharts)
Key metrics cards
Alerts & productivity tracking
πŸ„ Livestock Management
Live
Comprehensive animal tracking and management system.
Pages 8/8
Livestock.tsx - Animal listing & CRUD
AnimalDetail.tsx - Detailed animal view
BuyLivestock.tsx - Purchase transactions
SellLivestock.tsx - Sale transactions
Herds.tsx - Herd management
Health.tsx - Health records tracking
Production.tsx - Production records
ManageSpecies.tsx - Species & breeds
πŸ₯ Veterinary
Live
Complete veterinary healthcare management system.
Pages 1/1
Veterinary.tsx - Comprehensive vet module
Appointments & scheduling
Medical records & treatments
Vaccinations & lab results
🌾 Crop Management
Live
Field and crop lifecycle management with GPS tracking.
Pages 1/1
Crops.tsx - Fields & crop management
GPS coordinates tracking
Planting to harvest workflow
Yield tracking & reporting
πŸ“¦ Inventory
Live
Stock tracking with low stock and expiry alerts.
Pages 1/1
Inventory.tsx - Stock management
Low stock alerts
Expiry date tracking
SKU & batch management
πŸ’° Finance
Live
Complete financial management with invoicing and reporting.
Pages 3/3
Finance.tsx - Invoices & billing
Expenses.tsx - Expense tracking
Reports.tsx - Financial reports
Profit/Loss & Tax reports
πŸ‘₯ CRM & Sales
Live
Customer relationship and sales order management.
Pages 3/3
Customers.tsx - Customer management
Leads.tsx - Lead tracking & conversion
Orders.tsx - Sales order processing
Custom fields support
βš™οΈ System & Tools
Live
System management and utility pages.
Pages 4/4
Tasks.tsx - Task management
Traceability.tsx - QR code tracking
Analytics.tsx - AI predictions
Users.tsx - User administration
TenantSettings.tsx - Tenant config
SyncStatus.tsx - Offline sync

✨ Frontend Technology Stack

βš›οΈ Framework
React 18 + TypeScript
🎨 Styling
Tailwind CSS 3
πŸ”„ State Management
Zustand Store
🌐 Routing
React Router v6
πŸ“‘ API Client
Axios with Interceptors
πŸ“‹ Forms
React Hook Form
πŸ“Š Charts
Recharts Library
🎭 Icons
Lucide React
⚑ Build Tool
Vite 5
πŸ”” Notifications
React Hot Toast
πŸ“± Responsive
Mobile-First Design
πŸš€ Production
PM2 + Nginx
πŸ”Œ
API Endpoints Overview (205 Built)
80% Complete

πŸ” Authentication (15)

POST /api/auth/register
POST /api/auth/login
POST /api/auth/refresh
POST /api/auth/logout
GET /api/auth/me
POST /api/auth/change-password
POST /api/auth/forgot-password
POST /api/auth/reset-password
POST /api/auth/verify-email
GET /api/auth/users
GET /api/auth/users/:id
PUT /api/auth/users/:id
DELETE /api/auth/users/:id
PATCH /api/auth/users/:id/role
GET /api/auth/roles

πŸ„ Livestock (21)

POST /api/livestock
GET /api/livestock
GET /api/livestock/:id
GET /api/livestock/tag/:tagId
PUT /api/livestock/:id
DELETE /api/livestock/:id
POST /api/livestock/:id/health
POST /api/livestock/:id/weight
GET /api/livestock/:id/qr
GET /api/livestock/:id/health-history
POST /api/livestock/:id/breeding
GET /api/livestock/:id/breeding-history
POST /api/livestock/:id/vaccination
GET /api/livestock/:id/vaccinations
GET /api/livestock/stats
Custom Fields (6):
POST /api/livestock/custom-fields
GET /api/livestock/custom-fields
PUT /api/livestock/custom-fields/:fieldId
DELETE /api/livestock/custom-fields/:fieldId
POST /api/livestock/:id/custom-fields
GET /api/livestock/:id/custom-fields

🌾 Crops (11)

Fields:
POST /api/crops/fields
GET /api/crops/fields
GET /api/crops/fields/:id
PUT /api/crops/fields/:id
DELETE /api/crops/fields/:id
Crops:
POST /api/crops/crops
GET /api/crops/crops
GET /api/crops/crops/:id
PUT /api/crops/crops/:id
DELETE /api/crops/crops/:id
PATCH /api/crops/crops/:id/harvest

πŸ“¦ Inventory (9)

POST /api/inventory
GET /api/inventory
GET /api/inventory/:id
GET /api/inventory/sku/:sku
PUT /api/inventory/:id
DELETE /api/inventory/:id
PATCH /api/inventory/:id/adjust
GET /api/inventory/low-stock
GET /api/inventory/expiring

βœ… Tasks (9)

POST /api/tasks
GET /api/tasks
GET /api/tasks/:id
PUT /api/tasks/:id
DELETE /api/tasks/:id
PATCH /api/tasks/:id/assign
PATCH /api/tasks/:id/status
PATCH /api/tasks/:id/complete
GET /api/tasks/overdue

πŸ’° Finance (26)

Invoices (9):
POST /api/finance/invoices
GET /api/finance/invoices
GET /api/finance/invoices/:id
PUT /api/finance/invoices/:id
DELETE /api/finance/invoices/:id
POST /api/finance/invoices/:id/items
DELETE /api/finance/invoices/:id/items/:itemId
POST /api/finance/invoices/:id/payment
GET /api/finance/invoices/customer/:customerId
Expenses (5):
GET /api/finance/expenses
POST /api/finance/expenses
GET /api/finance/expenses/:id
PUT /api/finance/expenses/:id
DELETE /api/finance/expenses/:id
Reports (3):
GET /api/finance/reports/profit-loss
GET /api/finance/reports/cash-flow
GET /api/finance/reports/tax
Invoice Custom Fields (6):
POST /api/finance/invoices/custom-fields
GET /api/finance/invoices/custom-fields
PUT /api/finance/invoices/custom-fields/:fieldId
DELETE /api/finance/invoices/custom-fields/:fieldId
POST /api/finance/invoices/:id/custom-fields
GET /api/finance/invoices/:id/custom-fields
Other (3):
GET /api/finance/invoices/:id/pdf
POST /api/finance/invoices/:id/send
PATCH /api/finance/invoices/:id/status

πŸ‘₯ CRM (24)

Customers (6):
POST /api/crm/customers
GET /api/crm/customers
GET /api/crm/customers/:id
PUT /api/crm/customers/:id
DELETE /api/crm/customers/:id
GET /api/crm/customers/:id/history
Orders (6):
POST /api/crm/orders
GET /api/crm/orders
GET /api/crm/orders/:id
PUT /api/crm/orders/:id
DELETE /api/crm/orders/:id
PATCH /api/crm/orders/:id/status
Leads (7):
POST /api/crm/leads
GET /api/crm/leads
GET /api/crm/leads/:id
PUT /api/crm/leads/:id
DELETE /api/crm/leads/:id
PATCH /api/crm/leads/:id/convert
PATCH /api/crm/leads/:id/status
Lead Custom Fields (6):
POST /api/crm/leads/custom-fields
GET /api/crm/leads/custom-fields
PUT /api/crm/leads/custom-fields/:fieldId
DELETE /api/crm/leads/custom-fields/:fieldId
POST /api/crm/leads/:id/custom-fields
GET /api/crm/leads/:id/custom-fields

πŸ” Traceability (10)

POST /api/traceability/batches
GET /api/traceability/batches
GET /api/traceability/batches/:id
GET /api/traceability/batches/qr/:qrCode
PUT /api/traceability/batches/:id
DELETE /api/traceability/batches/:id
PATCH /api/traceability/batches/:id/status
GET /api/traceability/batches/:id/qrcode
GET /api/traceability/batches/:id/origin
GET /api/traceability/compliance/report

πŸ€– AI Analytics (6)

GET /api/ai/analytics/dashboard
POST /api/ai/predict/yield
POST /api/ai/predict/health
POST /api/ai/optimize/feed
POST /api/ai/predict/prices
GET /api/ai/analytics/trends

πŸ”„ Sync Service (9)

Sync Operations (6):
POST /api/sync/upload
GET /api/sync/download
GET /api/sync/status
POST /api/sync/logs
GET /api/sync/logs
GET /api/sync/logs/:id
Conflict Resolution (3):
GET /api/sync/conflicts
POST /api/sync/conflicts/:conflictId/resolve
GET /api/sync/conflicts/:id

🏒 Tenant Service (8)

POST /api/tenants
GET /api/tenants
GET /api/tenants/:id
PUT /api/tenants/:id
DELETE /api/tenants/:id
PATCH /api/tenants/:id/subscription
PATCH /api/tenants/:id/activate
GET /api/tenants/:id/stats

πŸ₯ Veterinary Healthcare (57 NEW)

Appointments (6):
POST /api/veterinary/appointments
GET /api/veterinary/appointments
GET /api/veterinary/appointments/:id
PUT /api/veterinary/appointments/:id
PATCH /api/veterinary/appointments/:id/cancel
PATCH /api/veterinary/appointments/:id/reschedule
Medical Records (4):
POST /api/veterinary/records
GET /api/veterinary/animals/:animalId/records
GET /api/veterinary/records/:id
PUT /api/veterinary/records/:id
Vital Signs (2):
POST /api/veterinary/animals/:animalId/vital-signs
GET /api/veterinary/animals/:animalId/vital-signs
Treatments (5):
POST /api/veterinary/treatments
GET /api/veterinary/treatments
GET /api/veterinary/treatments/:id
PUT /api/veterinary/treatments/:id
PATCH /api/veterinary/treatments/:id/complete
Vaccinations (5):
POST /api/veterinary/vaccinations
GET /api/veterinary/animals/:animalId/vaccinations
GET /api/veterinary/vaccinations/:id
PUT /api/veterinary/vaccinations/:id
GET /api/veterinary/vaccinations/upcoming
Prescriptions (4):
POST /api/veterinary/prescriptions
GET /api/veterinary/prescriptions
GET /api/veterinary/prescriptions/:id
PUT /api/veterinary/prescriptions/:id
Lab Results (3):
POST /api/veterinary/lab-results
GET /api/veterinary/animals/:animalId/lab-results
GET /api/veterinary/lab-results/:id
Procedures (3):
POST /api/veterinary/procedures
GET /api/veterinary/procedures
GET /api/veterinary/procedures/:id
Quarantine & Disease (6):
POST /api/veterinary/quarantine
GET /api/veterinary/quarantine
PATCH /api/veterinary/quarantine/:id/release
POST /api/veterinary/diseases
GET /api/veterinary/diseases
PUT /api/veterinary/diseases/:id
Veterinarians (5):
POST /api/veterinary/veterinarians
GET /api/veterinary/veterinarians
GET /api/veterinary/veterinarians/:id
PUT /api/veterinary/veterinarians/:id
DELETE /api/veterinary/veterinarians/:id
Health Alerts & Analytics (8):
POST /api/veterinary/alerts
GET /api/veterinary/alerts
PATCH /api/veterinary/alerts/:id/resolve
GET /api/veterinary/analytics/health
GET /api/veterinary/analytics/diseases
GET /api/veterinary/analytics/treatment-effectiveness
GET /api/veterinary/analytics/costs
GET /api/veterinary/analytics/mortality

✨ Custom Fields (18 NEW)

Leads Custom Fields (6)
Invoice Custom Fields (6)
Livestock Custom Fields (6)
Types: text, number, date, select
Dynamic field definitions
✨
Custom Fields Feature
NEW

Dynamic Data Capture for Leads, Invoices & Livestock

Tenants can now define and manage their own custom fields to capture business-specific data without code changes. Perfect for extending the platform to fit unique farm operations.

πŸ“Š Field Types

  • βœ“ Text (Single line)
  • βœ“ Textarea (Multi-line)
  • βœ“ Number (Numeric values)
  • βœ“ Date (Date picker)
  • βœ“ Boolean (True/False)
  • βœ“ Select (Dropdown)

🎯 Use Cases

  • βœ“ Lead: Industry, Budget, Source
  • βœ“ Invoice: PO Number, Tax ID
  • βœ“ Livestock: Breed Certificate
  • βœ“ Custom: Any business need

⚑ Features

  • βœ“ Required/Optional fields
  • βœ“ Default values
  • βœ“ Type validation
  • βœ“ Tenant isolation
  • βœ“ Unlimited fields
πŸ› οΈ
Technology Stack
Core Technologies
🟒
Node.js v20
πŸ“˜
TypeScript
πŸš‚
Express.js
βš›οΈ
React 18
⚑
Vite
🎨
Tailwind CSS
🌐
Nginx
πŸ”’
Let's Encrypt SSL
πŸ”
JWT Tokens
πŸ›‘οΈ
Helmet.js
πŸ”„
CORS
⏱️
Rate Limiting
🐘
PostgreSQL 16
πŸ”·
Prisma ORM
πŸƒ
MongoDB
πŸ”΄
Redis Cache
🐰
RabbitMQ
οΏ½
Apache Kafka
οΏ½πŸ“‹
OpenAPI/Swagger
🐳
Docker
☸️
Kubernetes
πŸ”„
Kafka Event Bus Integration
35% Complete β€’ 5/13 Services

βœ… Completed

  • βœ“ Core Kafka Package setup
  • βœ“ Topic definitions (85+)
  • βœ“ Docker Compose config
  • βœ“ Kafka UI (port 8080)
  • βœ“ Schema Registry (port 8081)

⚑ Service Event Buses

βœ“ Auth Service
βœ“ Tenant Service
βœ“ Livestock Service
βœ“ Crop Service
βœ“ Inventory Service
⏳ Tasks Service
β—‹ Finance Service
β—‹ CRM/Order Service
β—‹ Traceability Service
β—‹ Veterinary Service
β—‹ AI Engine
β—‹ Sync Service
β—‹ API Gateway

⏳ Pending

  • β—‹ 8 more service integrations
  • β—‹ Kubernetes deployment
  • β—‹ Integration testing
  • β—‹ Consumer groups setup
  • β—‹ Dead letter queues
πŸ“±
Mobile App Development
15% β€’ Layout & Structuring Started
πŸ“² App Core & Setup
Layout Started
React Native project setup with TypeScript, navigation structure, and component library foundation.
React Native + TypeScript setup
Navigation structure defined
Screen layouts in progress
Component library foundation
πŸ” Authentication Module
Pending
Secure login with biometric support (Face ID/Touch ID), JWT token management.
Login & Registration screens
Biometric authentication
Secure token storage
🏠 Dashboard & Home
Pending
Real-time farm overview with KPI widgets, quick actions, and alerts.
KPI summary cards
Quick action buttons
Alert notifications
πŸ„ Livestock Module
Pending
Animal registration, health records, weight tracking, and QR code scanning.
Animal CRUD operations
QR/Barcode scanning
Health record logging
🌾 Crop Management
Pending
Field mapping with GPS, crop lifecycle tracking, and yield logging.
GPS field mapping
Planting & harvest logs
Yield tracking
πŸ“¦ + 7 More Modules
Pending
Inventory, Tasks, Health/Vet, Sales/CRM, Reports, Push Notifications, Offline Sync
Barcode scanning
FCM/APNs integration
SQLite offline storage
1
LAYOUT STARTED
11
PENDING
12
TOTAL MODULES
15%
MOBILE PROGRESS
πŸ“…
Development Timeline & Roadmap
Phase 1: Core Platform βœ…
November - December 2025 | 100% Complete
Deployed with 15 microservices, 205 API endpoints, PostgreSQL with Prisma ORM, multi-tenant architecture, JWT authentication, custom fields system, veterinary healthcare module, and comprehensive analytics. Frontend UI complete with 19 pages.
Kafka Event Bus Integration ⚑
Started February 6, 2026 | 35% Complete
Core Kafka package setup complete. 5/13 service event buses created (Auth, Tenant, Livestock, Crop, Inventory). Docker Compose configured. Remaining 8 services and integration testing pending.
Mobile App Development ⚑
Started February 2026 | 15% - Layout & Structuring
React Native mobile application with offline-first architecture. Project setup and navigation structure complete. Screen layouts and component library in progress. 11 modules pending.
API Integration Testing ⏳
Pending - Post Kafka Completion
Complete end-to-end integration testing across all services. Depends on Kafka event bus completion. Will include cross-service tests, load testing, and security testing.
Pending Features ⏳
To Be Started
IoT Sensor Integration, E-Invoicing (ZATCA/GST), Advanced Farm Mapping, Third-Party Integrations (Tally, QuickBooks, Payment Gateways).