Project codespace compatibility#4
Conversation
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
…ceptions Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
…tions Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
…_URL Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
…cript Co-authored-by: Mqhele-dot <Mqhele-dot@users.noreply.github.com>
Standardize legacy procurement routes on sendOk/sendError, align logistics list filters via shared normalization (meta.appliedFilters vs client query), harden KPI deeplink script with test-http CSRF login, and document memStorage Tier-B plus production PO email warning. Co-authored-by: Cursor <cursoragent@cursor.com>
fix(test): return after fatal exitTest in procurement flow script - Run ALTER TYPE user_role ADD VALUE for planner so db:seed succeeds on older DBs - Stop main() after exitTest(1) to avoid reading undefined inventory rows - Unwrap GET /api/user envelope for createdBy Co-authored-by: Cursor <cursoragent@cursor.com>
- Add purchase_orders.currency_code (schema, migration, seed ZAR, validation on commercial PATCH) - Register PO list routes before operational mount so /records is not captured by /:po - Extend PO detail commercial UI, master-data cache invalidation, diagnostics buffer - Client: PurchaseOrderRecordSummary.currencyCode normalization - Tests: purchase-order-endpoints currency assertion; functional-audit adjustments Co-authored-by: Cursor <cursoragent@cursor.com>
…al_exceptions; CI smoke and reports e2e - Unwrap POST purchase-requisition and convert responses in test-procurement-flow and test-ap-workflow; clearer truncated JSON errors - register-analytics-routes: query operational_exceptions (not ops_exceptions) - test-smoke: assert GET /api/reports/analytics returns exceptionSummary array - e2e/reports: match inventory preview header (filtered rows + total value) - Include prior branch work: billing invoices, reference banners, analytics shell/KPI registry, reports charts/load-more, PO signed PDF currency, requisition date/tests, training panel, operations-routes Co-authored-by: Cursor <cursoragent@cursor.com>
…on script Co-authored-by: Cursor <cursoragent@cursor.com>
… RBAC catalog - Receive: validate putaway from warehouse master data; wire inventory adjustment and movements/batches/serials to resolved warehouse_id - AP: admin-only submit/approve/reject; withdraw PENDING_APPROVAL to DRAFT; admin bypass configured approver user ID; audit action for withdraw - RBAC: GET /api/rbac/permission-catalog; Role Manager search + collapsible groups from catalog - Plus: shared master currency fetch, supplier portal/PO commercial term alignment where touched Co-authored-by: Cursor <cursoragent@cursor.com>
… currency, requisitions) - AP: validate policy approver user; map policy errors to 4xx on invoice/batch routes - Invoices: domain invalidation + PO when linked - PO: shipment-aware send/receive client and receive panel wiring - PDF: format PO amounts in order currency with fallback - Reports: canonical query key for procurement PO records - Requisitions: commercial hint card, master fetches; convert copies dept + supplier currency - Approval policies: invalidate approval-suggestions queries - Master data integration migration, evidence doc, and test script Co-authored-by: Cursor <cursoragent@cursor.com>
Logistics integration audit requiredUser feedback: the logistics module still does not make business sense as an end-to-end workflow. The app has a Logistics page, but the structure feels disconnected: users need to be able to create/manage deliveries/shipments from POs, capture transport details, link shipments to receiving, and see logistics reflected in POs, inventory, AP, analytics, and reports. Current repo evidence to inspect
Key questions
Required build plan
Do not weaken existing tests or release gates. Start with an evidence report before editing. |
Cursor build prompt: fix ERP-style logistics, carriers, deliveries, receipts, and paymentsUse the following as the implementation prompt for the next Cursor/Composer pass. Acceptance criteria
|
Single createOperationalShipment path, richer DTOs and PATCH, direction/source DDL and filters, carrier master on forms, receive GRN and cross-domain invalidation; logistics tabs and extended filter tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Collapsible secondary filters and dialog for new shipments. Single logistics-create-shipment-button on submit; e2e opens More filters for advanced controls. Co-authored-by: Cursor <cursoragent@cursor.com>
Security build plan: npm supply-chain and vibe-coded app hardeningThis build plan is based on the npm supply-chain hardening research. The goal is to protect ISSSourcing / InvTrack against malicious npm packages, install-script malware, dependency confusion, typosquatting, leaked secrets, poisoned CI, unsafe AI-suggested dependencies, and weak runtime security. Build objectiveUpgrade the app from normal CI security to a stricter supply-chain security posture without breaking development velocity. Priority outcomes:
Phase 0 — Repo security evidence reportBefore editing, inspect:
Report:
Phase 1 — Quick-win CI supply-chain guardrailsImplement without changing runtime app behavior:
Phase 2 — Harden GitHub ActionsUpdate workflows safely:
Phase 3 — App-layer hardeningInspect Express/React/Postgres security and patch only real gaps. Server requirements:
Frontend requirements:
Phase 4 — SBOM, artifact integrity, and release provenanceFor protected branches/releases:
Phase 5 — Optional private registry/proxy foundationDo not force this if deployment environment is not ready. Plan and document:
Phase 6 — Super security mode for vibe-coded developmentAdd a developer gate for AI-generated or rapidly added dependencies. Create docs/checklist:
Rules:
Phase 7 — Tests and verificationRun:
Add test cases:
Acceptance criteria
|
Add Dependabot, dependency review, lifecycle/SBOM workflows with weekly cron; pin official actions to immutable SHAs (including Codespaces). Upgrade Electron/drizzle/cloudinary/express/nodemailer/sqlite3; streamline Cloudinary multer uploads; tighten production CSP script-src; document audit backlog and npm legacy-peer policy. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve Dependency Review blocker via filelist/readdir-glob overrides; npm audit fix clears high advisories. Add CI security-supply-chain-gate, PR dependency-review, and pr-security-merge-gate before release-gate; consolidate DR workflow; blocking npm audit in supply-chain. Node 24 in Actions; attestation after successful supply-chain workflow. Remove unused sharp. Update security docs and verification results. Co-authored-by: Cursor <cursoragent@cursor.com>
…r-data routes Extend suppliers UI/schema with defaultCarrierId; invoice paymentTermsId and currencyCode. Expand AP, operations, and procurement route registration; strengthen master-data propagation tests and HTTP test helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
Codex instruction: Suppliers integration + Diagnostics rebuildUse this as the Codex implementation instruction for the next build pass. Acceptance criteria:
|
Add GitHub Codespaces support by restoring project files, configuring the devcontainer, and fixing environment-specific runtime issues.
The repository's main branch was found to be empty, necessitating a restoration of the last complete project snapshot. Furthermore, the original project contained Replit-specific configurations, including a Neon WebSocket database driver and hardcoded hostnames, which prevented it from running correctly in a standard Codespaces environment. This PR addresses these issues to ensure seamless operation.