Project Overview
Al Watania Poultry is the largest poultry facility in the Middle East — producing 1,000,000+ chickens and 1,500,000 eggs per day across 150+ product lines. With 42+ years of operation, their scale demanded an enterprise-grade system to replace fragmented manual processes.
Two major systems: (1) full Java + Spring Boot ERP — production, cold-chain inventory, finance, HR, sales — via Next.js portal; and (2) نظام المناديب — complete field sales-force platform tracking rep routes, client visits, orders, cash collection, and real-time KPIs across the Kingdom.
System Components
🏭
Enterprise ERP — Java Backend
Spring Boot · MySQL · REST API
Java
Spring Boot
MySQL
REST API
Core ERP — production planning, cold-chain inventory, purchase orders, financial accounting, payroll, enterprise reporting — served via REST API to the Next.js frontend.
🗺️
نظام المناديب — Field Sales Force
Real-time rep tracking & order management
Java
Next.js
GPS API
Android
Complete field sales — route planning, GPS-tracked visits, online/offline order capture, cash & cheque collection, returns, live KPI dashboards for regional managers.
🌐
Next.js Web Portal
Server-Side Rendering · Arabic RTL
Next.js
React
TypeScript
Arabic RTL
SSR management portal — ERP dashboards, production reports, sales analytics, HR self-service, and regional managers' sales-force command centre. Arabic-first RTL.
📱
Mandoob Android App
Offline-capable field operations
Java
Android
SQLite
GPS
Native Java Android app — offline-first SQLite order capture, GPS check-in per client, route sheet, barcode scanning, automatic background sync on reconnection.
ERP Modules
🚚
Distribution & Logistics
Mandoob Daily Workflow
1
Morning Route Assignment
Regional manager assigns daily route with ordered visits — auto-generated by geography, frequency rules, pending orders. App downloads route offline.
2
GPS Check-in at Each Client
GPS check-in on arrival — visit time and location logged. Geofencing alerts manager if rep marks visit without being at the location.
3
Order Capture — Online or Offline
Browse catalogue with live ERP pricing and stock, create order — instant sync if online or SQLite queue if offline. Barcode scanning supported.
4
Cash & Cheque Collection
Record cash and cheque details in app — syncs to ERP finance module in real time, automatic reconciliation against outstanding invoices.
5
End-of-Day Report & Manager Review
End-of-day summary: visits done vs. planned, orders, collections, missed clients. Manager reviews in Next.js portal with GPS trail map replay and exception flags.
Key Features
✓
Offline-First Android App
Reps in poor coverage areas still capture all data — SQLite local storage syncs to Java backend automatically on reconnect.
✓
Live Production Dashboard
Real-time production throughput — chickens/hour, cold-storage levels, line efficiency, deviation alerts when output falls below target.
✓
Cold-Chain Inventory — FEFO & Zone Control
FEFO inventory rules enforced by ERP — each batch has production date, shelf-life, zone assignment. Auto-alerts for batches nearing expiry before dispatch.
✓
Rep Performance KPIs & Targets
Monthly targets per product category, visit frequency targets per client tier, collection KPIs — tracked live with historical charts and per-rep manager drill-downs.
✓
Financial Module — Invoicing & Reconciliation
Auto-generates invoices on order confirmation, posts to receivables, reconciles against mandoob app collections. Overdue alerts and aging reports per client.
✓
Arabic-First — Full Bilingual RTL
Both Next.js portal and Android app Arabic-first RTL — reports, forms, dashboards switch seamlessly AR/EN, including RTL PDF generation.
✓
Role-Based Access — ERP & Mandoob
Granular RBAC — ERP roles: production, warehouse, finance, HR, executive. Mandoob roles: field rep, zone manager, national director — each with scoped data.
✓
Distribution Route Optimisation
Optimised delivery routes factoring client windows, vehicle capacity, cold-chain requirements, and traffic — auto-exported to driver apps.
Project Highlights
2Major Systems Built
8ERP Modules
1M+Chickens / Day
JavaSpring Boot Backend
Next.jsSSR Web Portal
RTLArabic-First RTL
Technical Challenges
Offline sync consistency for hundreds of reps across Saudi Arabia
SQLite local source-of-truth during offline periods. On reconnect, conflict engine: server wins for pricing/stock, client wins for new orders/visits — full audit trail for all resolved conflicts.
Java ERP performance at 1M+ production-event scale
1M+ events/day via Spring Batch — bulk INSERT with MySQL partitioned tables per production shift, async event queue decoupling production from financial posting, preventing lock contention.
Next.js SSR with Arabic RTL — dynamic locale switching without re-render
i18n routing with Next.js built-in i18n, RTL CSS variables swapping on locale change, direction context provider updating HTML dir client-side — preserving component state across locale switches.