A comprehensive web-based management system designed for poultry farms to streamline operations, track inventory, manage finances, and automate day-to-day farm activities.
- Overview
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Configuration
- Usage
- API Documentation
- Database Schema
- Contributing
This Chicken Farm Management System is designed to help poultry farm owners digitize their operations. The system supports farms with chickens that produce eggs, manage chick incubation, track inventory, handle transactions, and maintain comprehensive records.
Traditional poultry farms rely on manual record-keeping and inventory management, leading to:
- Inefficient tracking of livestock and egg production
- Manual financial record keeping
- Difficulty in monitoring inventory levels
- Limited insights into farm profitability
A web-based management system that provides:
- Automated inventory tracking and alerts
- Financial management with profit/loss reporting
- Order management
- Employee and customer management
- Real-time dashboard with analytics
- Real-time overview of farm operations
- Financial summaries and inventory status
- Visual charts and graphs for data insights
- Performance metrics and key indicators
- Track chickens, chicks, and egg production
- Record deaths, diseases, and treatments
- Track feed, medication, and supplies
- Automatic low-stock alerts and thresholds
- Expiration date monitoring
- CRUD operations for all inventory items
- Record income and expense transactions
- Generate profit and loss statements
- Track payments to suppliers and from customers
- Export financial reports in multiple formats
- Role-based access control (Admin/Employee)
- Manage buyer and seller information
- Secure authentication and authorization
- Create and track orders
- Set delivery deadlines and priorities
- Update order status and completion
- Generate comprehensive reports
- Export data in PDF and Excel formats
- Inventory summaries and financial statements
- Custom date range filtering
- Node.js - Runtime environment
- Express.js - Web application framework
- MySQL - Relational database
- JWT - Authentication tokens
- bcrypt - Password hashing
- express-validator - Input validation
- helmet - Security middleware
- cors - Cross-origin resource sharing
- React - User interface library
- Vite - Build tool and development server
- React Router - Client-side routing
- Tailwind CSS - Utility-first CSS framework
- Phosphor Icons - Icon library
- Recharts - Chart components
- axios - HTTP client
- React Toastify - Notifications
- ESLint - Code linting
- Prettier - Code formatting
- nodemon - Development server auto-restart
chicken-farm-management-system-II/
βββ backend/ # Node.js backend API
β βββ src/
β β βββ config/ # Database configuration
β β βββ controllers/ # Business logic controllers
β β βββ middleware/ # Authentication & validation
β β βββ models/ # Database models
β β βββ routes/ # API route definitions
β β βββ utils/ # Utilities and seed data
β β βββ index.js # Application entry point
β βββ package.json
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # React components
β β βββ context/ # React context providers
β β βββ utils/ # API utilities
β β βββ assets/ # Static assets
β β βββ main.jsx # Application entry point
β βββ package.json
βββ projectInfo/ # Documentation and diagrams
βββ diagrams/ # System diagrams
βββ *.md # Project documentation
Before running this project, make sure you have:
- Node.js (v18 or higher)
- npm or yarn package manager
- MySQL (v8.0 or higher)
- Git for version control
git clone https://github.com/ChathurK/Chicken-Farm-Management-System.git
cd Chicken-Farm-Management-System# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Modify environment variables file (Current .env file consists of my environment's configurations)
# Edit backend/.envNote: The current .env file contains the developer's environment configurations. You'll need to modify it with your own database credentials and settings. See Configuration section below βοΈ for detailed setup instructions.
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install- Create a MySQL database named
chicken_farm_db - Run the database setup script:
npm run db- Seed the database with initial data:
npm run seedModify the .env file in the backend directory:
# Database Configuration
DB_HOST=localhost
DB_PORT=3306
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=chicken_farm_db
# JWT Configuration
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRE=24h
# Server Configuration
PORT=5000
NODE_ENV=development
# CORS Configuration
FRONTEND_URL=http://localhost:5173Update the API base URL in src/utils/api.js if needed:
const API_BASE_URL = 'http://localhost:5000/api';- Start the Backend Server:
cd backend
npm run devThe backend will run on http://localhost:5000
- Start the Frontend Development Server:
cd frontend
npm run devThe frontend will run on http://localhost:5173
-
Admin:
- Email:
admin@chickenfarm.com - Password:
admin123
- Email:
-
Employee:
- Email:
employee@chickenfarm.com - Password:
employee123
- Email:
# Backend
cd backend
npm start
# Frontend
cd frontend
npm run build
npm run previewPOST /api/auth/login- User loginPOST /api/auth/register- User registrationGET /api/auth/profile- Get user profile
/api/chickens- Chicken management/api/chicks- Chick management/api/eggs- Egg inventory/api/inventory- General inventory/api/orders- Order management/api/transactions- Financial transactions/api/buyers- Buyer management/api/sellers- Seller management/api/employees- Employee management
The system uses a MySQL database with the following main entities:
- Users - System users (Admin/Employee)
- Chickens - Adult chicken records
- Chicks - Young chicken records
- Eggs - Egg inventory and production
- Inventory - Feed, medication, supplies
- Orders - Customer orders
- Transactions - Financial records
- Buyers/Sellers - Customer information
- Employees - Staff records
Refer to backend/src/utils/dbSetup.sql for the complete schema.
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Create a Pull Request
ChathurK
- GitHub: @ChathurK
- Mobile application development
- Advanced analytics and forecasting
- IoT integration for automated data collection
- Multi-farm support
- Automated backup system
- Email notification system
- Advanced reporting with custom filters
While the proposed system provides a comprehensive solution for managing chicken farm operations, it does have certain limitations:
- Limited scope for future expansion - Some advanced features like real-time market price integration and comprehensive disease management systems were not included to keep the project manageable within given time and resource constraints
- Missing automated integrations - The system lacks integration with external APIs for market data, weather information, or veterinary databases
- No IoT device integration - Currently doesn't support automated data collection from sensors or smart farming equipment
- Manual order deadline setting - Order delivery deadlines must be set manually by administrators, which may lead to scheduling conflicts
- Manual inventory transitions - Some inventory status updates (expiration, damage, livestock deaths) require manual entry, potentially introducing human error
- Limited automation - Many processes that could be automated still require manual intervention and data entry
- Client-specific design - The system is designed specifically for KTM AGRI and may require significant customization for other farm operations with different needs, scales, or business models
- Limited scalability testing - Performance with larger datasets (100+ chickens, thousands of transactions) has not been thoroughly tested
- Single-farm architecture - Current design doesn't support multi-farm operations or franchise management
- Basic reporting features - Advanced analytics and predictive modeling capabilities are limited
- Manual backup process - Database backups are not automated and require manual intervention
Happy Farming! ππ₯