Skip to content

feat: platform foundation, catalogue & inventory on Laravel 12 / Next.js 15 - #22

Merged
flamescreatioon merged 6 commits into
mainfrom
feature/framework-upgrade
Oct 23, 2026
Merged

flamescreatioon merged 6 commits into
mainfrom
feature/framework-upgrade

Conversation

@flamescreatioon

Copy link
Copy Markdown
Owner

Summary

Lands the accumulated platform and domain work in four ordered commits:

  1. chore(upgrade) — Laravel 10 -> 12, Sanctum 4, PHPUnit 11, Spatie multitenancy 4; Next.js 14 -> 15.5, React 19, Jest 30 (ADR 0031)
  2. feat(platform) — memberships & invitations (ADR 0029), organization-scoped RBAC (ADR 0030), TOTP MFA with verified-email-for-writes (ADR 0032), device registration, append-only audit events, idempotency keys, rate-limit and error-envelope hardening
  3. feat(inventory) — catalogue & inventory foundation: products, categories, units of measure, locations, movement-based stock with exact scaled-decimal quantity/price value objects (ADR 0033); includes API routes for both feature commits
  4. docs(contracts) — ADRs 0029-0033, membership/RBAC engineering guides, architecture and security doc refresh, OpenAPI contract growth with a route-diff script, tracked agent skill packs

Verification

  • API suite: 247 passed, 1 skipped (892 assertions); Pint clean (235 files)
  • Upgrade commit verified in isolation via stash: 89 passed, 1 skipped (282 assertions)
  • Web: typecheck, ESLint, 8 Jest tests, and production build all pass
  • Contracts: Redocly lint valid; contract-route diff reports 0 mismatches

Notes for review

  • Commits are ordered upgrade -> platform -> inventory -> docs. Intermediate commits are not individually green (the shared routes/api.php lands with the inventory commit); the PR head is fully green.
  • Squash-merge per repository convention.
  • Follow-ups (separate PRs): web client UI for auth/org/inventory, database seeders, and the queued Dependabot major upgrades (Next 16 / React 16 / TS 7).

Laravel 10 -> 12 in one step (Laravel 11 is itself out of support),
Sanctum 3 -> 4, PHPUnit 10 -> 11, spatie/laravel-multitenancy 3 -> 4
with the v4 single-database config migration. Next.js 14 -> 15.5 with
React 19, Jest 30, and Testing Library 16. Removes the stray
check_config.php and flowos artifacts.

Verified at this state: API suite 89 passed, 1 skipped (282 assertions).

Refs docs/adr/0031-framework-version-upgrade.md
…it and idempotency

Invitations are bearer-secret workflows with hashed, expiring tokens
whose acceptance transactionally creates an active membership (ADR 0029).
Authorization moves from temporary active-member rules to
organization-scoped roles attached to memberships, with a canonical
platform permission catalogue and dynamic Owner semantics (ADR 0030).
Authenticator-app TOTP MFA with recovery codes gates session and token
issuance, and write routes require verified email (ADR 0032). Device
registration and revocation, an append-only audit event log, idempotency
keys for safe mutation retries, and rate-limit/error-envelope contract
hardening round out the platform slice.

Refs docs/engineering/{membership-lifecycle,authorization-rbac}.md
First business domain slice (Sprint 2). Products with categories,
units of measure, and archive/restore semantics; inventory locations;
movement-based stock with receipts, issues, transfers, and counts as
idempotent operations. Quantities and prices use exact scaled-decimal
value objects rather than floating point (ADR 0033).

Includes the API routes for the platform and inventory features and
the tests covering domain rules and HTTP behavior.
…acts and agent skills

Adds ADRs 0029-0033 (membership/invitation lifecycle, organization-
scoped RBAC, framework upgrade, TOTP MFA, catalogue and inventory
foundation), engineering guides for membership lifecycle and RBAC, and
refreshes architecture, development, and security docs for Laravel 12 /
Next.js 15 and the new platform features.

Grows the OpenAPI v1 contract with the new endpoints plus a route-diff
script. Tracks the installed agent skill packs under .agents/ with
skills-lock.json and ignores local agent state (.claude/).

Also corrects the stale debt-register remote status and README
implementation status lines.
Copilot AI balanced review requested due to automatic review settings October 23, 2026 16:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

The lockfile was resolved with npm 11 semantics; npm ci on CI's
Node 20 / npm 10 rejected it as out of sync with package.json
(missing @emnapi entries), failing the Web job and the CodeQL
javascript autobuild, which also runs npm ci.

Regenerated with npm 10 and verified with a full npm@10 ci install
followed by typecheck locally.
The function cast bigint expressions to bytea, which PostgreSQL 16
does not support, so it failed at first call and the Infrastructure
CI job has been red since it was added. The bytea-to-uuid return cast
was invalid as well.

Build the timestamp half with substring(int8send(ts) from 3 for 6)
(low 48 bits, big-endian) and return via encode(..., 'hex')::uuid.
Verified against the local PostgreSQL 16 container: version nibble 7,
RFC 4122 variant, 5000/5000 unique ids, ms-epoch timestamp prefix.
@flamescreatioon
flamescreatioon merged commit 3370ca1 into main Oct 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants