Yam Agri Core
See CONTRIBUTING.md for the full contribution guide.
- Author: YasserAKareem
- Repository: https://github.com/YasserAKareem/yam_agri_core
- GitHub stars: 0
- Forks: 0
- License: CC0-1.0
- Category: Localization
- Maintenance: Minimally Maintained
Install Yam Agri Core
bench get-app https://github.com/YasserAKareem/yam_agri_core
Add the Frappe Gems badge to your README
Maintain Yam Agri Core? Paste this into your README:
[](https://frappegems.com/gems/apps/YasserAKareem/yam_agri_core)
About Yam Agri Core
YAM Agri Core
Infrastructure and configuration layer for the YAM Agri Platform — a cereal-crop supply chain quality and traceability system built on Frappe and ERPNext.
Overview
YAM Agri Core provides:
- Lot traceability — splits, merges, and blends across the cereal supply chain
- QA/QC tests and certificates — FAO GAP Middle East + HACCP/ISO 22000
- Scale tickets — weight measurements linked to devices and lots
- Sensor observations — universal model for bins, refrigerators, weather, irrigation, and remote sensing
- Evidence packs — audit-ready bundles for a date range and site
- Site isolation — users only see data for their permitted sites
- Hybrid AI assistance — assistive only; AI never executes risky actions automatically
Requirements
| Component | Version |
|---|---|
| Frappe | v16 |
| ERPNext | v16 |
| MariaDB | 10.6+ |
| Redis | 6+ |
| Docker | 24+ |
Quick Start (Dev)
# Clone with submodules
git clone --recurse-submodules https://github.com/YasserAKareem/yam_agri_core.git
cd yam_agri_core
# Copy and configure environment
cp environments/dev/.env.example environments/dev/.env
# Edit environments/dev/.env with your values
# Start the stack
bash infra/docker/run.sh up
# Initialise site + install apps
bash infra/docker/run.sh init
Runtime Contract (Canonical)
- Use
infra/docker/run.shas the primary entrypoint for dev runtime operations. - Treat
infra/docker/docker-compose.ymlas the canonical compose file for local operations. - Use WSL or Git Bash on Windows for shell workflows to avoid path translation drift.
- For MCP stdio servers, use
.vscode/mcp.jsonwithtools/mcp/launch_mcp.py(not directnpx).
Core DocTypes (V1.1)
| DocType | Purpose |
|---|---|
| Site | Farm, silo, store, or office location |
| Storage Bin | Physical bin within a site |
| Device | IoT sensor or scale device |
| Lot | Harvest, storage, or shipment lot |
| Transfer | Split, merge, or blend between lots |
| Scale Ticket | Weight measurement record |
| QC Test | Quality control test result |
| Certificate | Compliance certificate (expiry-checked) |
| Nonconformance | CAPA record |
| Evidence Pack | Audit evidence bundle |
| Complaint | Customer complaint record |
| Observation | Universal sensor/derived signal model |
Development
# Install pre-commit hooks
pip install pre-commit
pre-commit install
# Run pure-Python tests (fast, no DB)
cd apps/yam_agri_core && python -m pytest yam_agri_core/yam_agri_core/tests/ -v
# Run Frappe integration tests (requires Docker stack)
bash infra/docker/run.sh bench --site localhost run-tests --app yam_agri_core
# Lint
cd apps/yam_agri_core && ruff check .
See CONTRIBUTING.md for the full contribution guide.
Non-Negotiable Business Rules
- Every record must belong to a Site.
- Users do not see other sites' data by default (site isolation via User Permissions).
- High-risk actions (Lot accept/reject, Transfer approval) require QA Manager role.
- AI is assistive only — no automatic lot accept/reject, recalls, or unsupervised customer communications.
- Never commit secrets — use
.env.exampleonly; never commit.envwith real credentials.
License
Related Localization apps for Frappe & ERPNext
- Wiki — Free and Open Source Wiki built on top of Frappe
- India Compliance — Simple, yet powerful compliance solutions for Indian businesses
- Nepal Compliance — Open source ERP for Nepal with HR, Payroll & Accounting compliance, based on ERPNext by Frappe Technologies.
- Erpnextswiss — ERPNext application for Switzerland-specific use cases
- Erpnext Germany — ERPNext customizations for German companies
- Ksa Compliance — KSA Compliance App for KSA E-invoice
- Kamra Pms — Free open-source hotel & short-term rental PMS (AGPL). Front desk, folios, POS, housekeeping, booking engine + governed MCP so Claude can run the property. Built on Frappe v16.
- Zatca Erpgulf — Implementation of Zatca Phase-2 E-Invoicing - for FrappeCLoud