Architecture
Boundaries
Laravel owns authentication, organization authorization, validation and SQL persistence. Inertia renders the React application. React Flow is a design surface; it never changes real devices. The simulator is a pure TypeScript module with no network I/O. Public demo data is synthetic, held in the browser, and does not share authenticated topology records.
Organizations → Sites → Topologies → topology nodes and edges. Physical Devices → Interfaces are separate SQL entities for future inventory integrations. A node is currently a design object and carries no assumed binding to a physical device. Ports are stored in each validated topology node; real interface information will live in device_interfaces.
Workspace provisions an organization atomically on first authenticated visit. Membership determines access. TopologyPolicy permits reads to members and writes to owners, administrators and engineers. Viewers and operators cannot change diagrams. Tenant identifiers and site identifiers cannot be assigned across organizations.
Saving uses a transaction and SQL row lock. The client sends its known revision; an outdated revision gets 409. Graph rows are replaced atomically, a version snapshot is appended, and an audit event is created. Neither client-supplied organization IDs nor credential fields are used.
Session API
These endpoints are under the web middleware for Sanctum-style first-party session behavior, but Sanctum token authentication is not installed in this release. They require login, same-origin cookies and CSRF on mutations. They are rate-limited to 60 requests per minute.
- GET
/api/v1/topologies/{id} - PUT
/api/v1/topologies/{id}:{name, mode, revision, nodes, edges} - GET
/api/v1/topologies/{id}/versions - POST
/api/v1/topologies:{name, site_id} - POST
/api/v1/sites:{name, location} - PATCH
/api/v1/organization:{name} - POST
/api/v1/subnets:{name, cidr, gateway, site_id} - POST
/api/v1/vlans:{name, tag, color}
Modes accepted by this release are designer and simulator. Live and hybrid cannot be enabled until real integrations exist. Validation errors return 422; unauthorized tenant accesses return 403; stale revisions return 409.
Future live integration
Add independently authorized jobs, paired agent identities, range allowlists, signed/rotatable tokens, fixed diagnostic job handlers and server-side result validation. The public demo must remain disconnected. Do not accept arbitrary commands. Network targets need explicit policy and DNS-rebinding protections before enabling HTTP/TLS diagnostics. Network changes need separate capabilities and approval records. Reverb private channels and queue jobs must carry server-validated organization scope.
Configuration backups need encrypted credentials, secret redaction, retention and audited restore workflows. Device drivers must declare capabilities; unsupported actions should be absent or visibly unavailable. Live monitoring needs ingestion limits, metric retention and actual timestamped observations instead of design status.