This document serves as the master tracking index and operational roadmap for the goal-integration-docs project, ensuring full alignment across engineering teams, systems administrators, and autonomous AI agents.
goal-integration-docs is the centralized knowledge hub for the GOAL ecosystem, organized into three documentation segments:
goal-cli, SAP B1 / BEES / SIRE / GPrint integrations, Docker/DB operations)./guides/*).GOAL Backend operations are structured along two distinct planes:
REST API (Phase 1 — Current Focus):
/v1/....ActionResult response envelopes.Authorization, x-app-stage, x-app-uid.Command Line / CLI (Phase 2 & Phase 3):
php artisan ...), background workers, queue consumers, and cron schedules.goal-cli Go Executable): Standalone cross-platform binary written in Go enabling remote devices, edge servers, and operators to execute CLI actions remotely via an authenticated gateway without local PHP or SSH dependencies.scripts/deploy.sh and scripts/import-docs.js utilizing Wiki.js native markdownCore (with Prism syntax highlighting) and htmlCore rendering pipelines to compile Markdown to rich HTML with automatic Table of Contents.scripts/check-docs.sh to enforce Wiki.js front-matter compliance across all .md files..github/workflows/deploy-main.yml and lint-and-validate.yml) for self-hosted runner automated CD and CI validation.ActionResult envelope, ID vs UUID resolution, soft-delete conventions.routes/v1/backend/base/base.php)14 dedicated, comprehensive entity specification pages created with full request/response schemas:
goal-cli specification.routes/v1/backend/inventory/inventory.php)12 dedicated, comprehensive entity specification pages created with full request/response schemas:
/{id}/stock), incoming POs, SAP B1 OWHS sync, and map upload./{id}/lines), bulk renewals, and SAP B1 OPLN/ITM1 synchronization.stock-transfers), dispatch validation, and adjustments/entries/exits (goods-movements).product_lines) for reporting and ERP grouping.product_categories), parent-child nesting, subcategories, and gallery image codes.product_clasifications), hierarchical classifications, and autocomplete search.product_attributes), attribute groups, and presentation measures for technical specifications.unit_measures), KPI volumetric conversion ratios (HL hectoliters), and product packaging rows.OITB), General Ledger account mappings for inventory valuation, COGS, variance, and revenues.routes/v1/backend/sales/sales.php)Master architectural portal and 4 dedicated sub-module specification pages with full request/response schemas:
DRAFT → CONFIRMED → APPROVED → CANCELLED), discount workflows, remote authorization, order line operations, and tracking.sales/master/master.php covering Territories & GIS polygons, Delivery Zones, Sales Teams, Portfolios, Sellers, Routes, Schedules, Catalog rules, and Channels./v1/sales/draft/customers)./v1/sales/store/*)./v1/sales/invoices).routes/v1/backend/pre-sale/pre-sale.php)Master architectural portal and 2 dedicated sub-module specification pages with full request/response schemas:
/master-data), bulk orders upload (orders-bulk), no-sale visits (nosales-bulk), and presale orders management (/orders)./monitoring), territory map polygons, customer on-site GPS updates, and live credit balance lookups.routes/v1/backend/financial/financial.php)Master architectural portal and complete REST API specifications for General Ledger and double-entry bookkeeping:
/journals/{id}), multi-entry CSV file import (/journals/import), reversal cancellation (/journals/{id}/cancel), staged drafts CRUD (/journal-entry-drafts), bulk drafts ingestion (/journal-entry-import/bulk), and asynchronous confirmation dispatch (/journal-entry-import/confirm/{id}) via LegacyJournalImportJob.routes/v1/backend/purchase/purchase.php)Master architectural portal and complete REST API specifications for procurement vendor master data, taxonomy, and ERP integration:
/purchase/master/suppliers), dual ID/UUID resolution, boolean role matrix (CastToBoolean), soft-delete/restore lifecycle, gallery media synchronization (/upload-image), supplied SKU catalogs (/products), brand and category lookups (/brands, /categories), and real-time SAP Business One purchase invoices (/documents) via ListSAPPurchaseInvoiceAction.Follow this strict phased order for upcoming development and documentation tasks:
Document all remaining backend routes from routes/v1/backend/backend.php with the same depth as the Base Module:
electronic-documents/electronic-documents.php): Facturación electrónica, XML/CDR generation, PDF dispatch.promotion/promotion.php, contest/contest.php): Wizard step configurations, volume bonuses, BEES coupons.survey/survey.php): Field trade audit questions, store inspections.payroll/payroll.php): Seller commissions, attendance, route allowances.reports/reports.php): Kardex balances, sales summaries, PLE SUNAT exports.Expand the /cli section to document every Artisan command present in app/Console/Commands/ and scheduled in app/Console/Kernel.php:
everyMinute, dailyAt, cron), queue name, and concurrency locks (withoutOverlapping).goal-cli (Go Binary)Develop the standalone remote CLI client in Go:
goal-backend (/v1/management/cli/execute) guarded by IP whitelist and administrative API keys.goal-cli project in Go with cobra for command parsing and resty / grpc for transport.--json raw streaming./processes)Document end-to-end operational and cross-system workflows using templates/process.md:
HRep) → Invoicing./manuals & /guides)Author role-based, step-by-step UI guides in Spanish using templates/user-manual.md: