clupilot/app
Boban Blaskovic 555101c993 Step 1/5: Workspace multi-tenancy foundation
User accepted 5-step plan: Workspace → Sub-Sidebar → Switcher → Plan/
Quota → Billing.

This step adds the workspace layer underneath everything:
- Workspace model with HasUuids + relations (sites/servers/clusters/
  backups/members/invitations/activities) + plan-based quotas + feature
  flags + isOverQuota() + hasFeature() helpers.
- Plan presets: free/starter/pro/agency/enterprise with sites,
  servers, team, storage_gb, features map (audit/monitoring/
  email_relay/multi_workspace/white_label/reports/sso).
- BelongsToWorkspace trait: global scope filters by app('current
  Workspace'), creating-hook auto-fills workspace_id from container.
  Falls back to no-scope when no workspace bound (tests, console).
- Migrations: workspaces table + workspace_id foreignUuid added to
  all 10 domain tables (clusters/servers/sites/backups/team_members/
  invitations/security_events/certificates/activities/crons).
- users gets current_workspace_id nullable FK.
- team_members unique changed to composite (workspace_id, user_id) so
  one user can belong to multiple workspaces.
- ResolveCurrentWorkspace middleware: resolves active workspace from
  ?workspace=slug → session → user.current_workspace_id → first owned.
  Wired into web middleware group via bootstrap/app.php.
- WorkspaceFactory + workspace_id added to all 10 domain factories
  so tests/seed work without explicit workspace context.
- DatabaseSeeder rewritten: creates Marie Weber as owner of 'Acme
  Agency' (Pro plan) workspace + 'Marie · Personal' (Free) workspace
  for switcher demo. Binds app('currentWorkspace') so seeded sites/
  servers/backups/etc. land in the right workspace.
- Sidebar component reads auth user's current workspace for the ws-
  switch panel — no more hard-coded 'Acme Cluster' string.

Full Pest regression: 47/47 green. 2 workspaces seeded:
- Acme Agency (pro): 87 sites, 6 servers, 128 sec events, 102 backups
- Marie · Personal (free): 0 sites
2026-06-01 01:12:00 +02:00
..
app Step 1/5: Workspace multi-tenancy foundation 2026-06-01 01:12:00 +02:00
bootstrap Step 1/5: Workspace multi-tenancy foundation 2026-06-01 01:12:00 +02:00
config Initial CluPilot stack setup 2026-05-27 23:00:14 +02:00
database Step 1/5: Workspace multi-tenancy foundation 2026-06-01 01:12:00 +02:00
public Initial CluPilot stack setup 2026-05-27 23:00:14 +02:00
resources Step 1/5: Workspace multi-tenancy foundation 2026-06-01 01:12:00 +02:00
routes Pages: Cluster Wizard (4-step) + Site Details (6 tabs) — final 12/12 2026-05-31 23:08:15 +02:00
storage Portainer-ready compose stack + app changes 2026-05-31 17:04:03 +02:00
tests Site Details: exact template rebuild + xterm.js logs + fileContents tree 2026-05-31 23:49:48 +02:00
.editorconfig Portainer-ready compose stack + app changes 2026-05-31 17:04:03 +02:00
.env.example Initial CluPilot stack setup 2026-05-27 23:00:14 +02:00
.env.testing Fix tailwind build + test-DB isolation 2026-05-31 22:47:34 +02:00
.gitattributes Initial CluPilot stack setup 2026-05-27 23:00:14 +02:00
.gitignore Initial CluPilot stack setup 2026-05-27 23:00:14 +02:00
README.md Portainer-ready compose stack + app changes 2026-05-31 17:04:03 +02:00
artisan Initial CluPilot stack setup 2026-05-27 23:00:14 +02:00
composer.json Foundation + Login Glass page from template 2026-05-31 22:18:51 +02:00
composer.lock Foundation + Login Glass page from template 2026-05-31 22:18:51 +02:00
package-lock.json Site Details: exact template rebuild + xterm.js logs + fileContents tree 2026-05-31 23:49:48 +02:00
package.json Site Details: exact template rebuild + xterm.js logs + fileContents tree 2026-05-31 23:49:48 +02:00
phpunit.xml Portainer-ready compose stack + app changes 2026-05-31 17:04:03 +02:00
vite.config.js Initial CluPilot stack setup 2026-05-27 23:00:14 +02:00

README.md

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. You can also check out Laravel Learn, where you will be guided through building a modern Laravel application.

If you don't feel like reading, Laracasts can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Partners program.

Premium Partners

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.