Skip to content

Commit d257c8f

Browse files
WendellAdrieljoetannenbaumtaylorotwell
authored
feat: Teams support (#14)
* Data model changes for teams functionality * Create personal team when creating a new user * Update Team to use soft delete * Refactor current/default team to align with Cloud approach * Add events, notifications, policies and middleware for team feature * Add actions and config for team feature * Update structure for Teams files for Inertia kits * Update build command, watch script, workflow and docs for Team feature * Refactor Membership to remove polymorphic relationship and add user model config * Add new layer for shared controllers for Inertia kits teams * Add validation for team name to avoid reserved names * Initial integration for Vue UI (Fortify) * Refactor to deprecate teams actions and add default values for current team on URLs * Refactor Team Switcher component * Add feature test cases for Teams * Improve Team deletion flow * Small refactor to the watch script * Update tests for changes in deletion * Revert refactor for watch script * Refactor team invitations * Refactor team roles * Add missing layout for WorkOS Teams * Fix issues with dashboard route on WorkOS variant * Refactor to use switchTeam from HasTeams * Add isCurrentTeam helper method on HasTeams trait * Remove not used method * Fix issue with tests on WorkOS variant * React teams feature implementation and team switcher added to header layout * Livewire teams implementation * Fix issue with tests for livewire team test * Improvements to invites, permissions and team deletion * General minor improvements * Apply linter changes for Teams implementation * Apply linter/formatter changes for Teams React implementation * Update to Inertia globals and applied linter/formatter on Vue Teams implementation * Apply linter/formatter changes for Teams Vue implementation * Fix issue on removing needed changes * Improve SKILL and create minimal guidelines files pointing to skill * Updated watch script and components mapping for Svelte Teams * Improve Skill and guidelines * Organize GH actions * Svelte Teams Feature implementation * TeamSwitcher component refactor for React and Vue * Update EnsureMembership.php * Update SetTeamUrlDefaults.php * formatting * First batch of fixes for code review * Improved Pint configuration for Maestro and applied it in both orchestrator and kits * Update empty constructors * Another batch of changes for code review * Lint workflow improvement * Improved import lint rules * Child routes fix and UI improvements * Update how to handle titles in Livewire starter kits to match Inertia ones * team settings styling * Update Edit.vue * Update index.tsx * wip * Update Index.svelte * Update global.d.ts * wip * wip * Linter changes * Create UserTeam DTO * Add TeamPermissions DTO * Refactor dialog/modal components * Applied Linter changes * Fix tooltip for icons in Teams edit page * Update agents skill file to match claude one * Add teams variants for tests workflow * Update check kit script to add teams variants * Apply linter changes * Apply sentence case to all user-facing text in Teams kits and align sidebar icon/title with base kits * Update global types for teams * wip * dto method consistency and reduce number of queries * Update HasTeams.php * Update HasTeams.php * Update TeamRole.php * Update TeamController.php * Update TeamInvitationController.php * Update TeamMemberController.php * Update TeamMemberController.php * Update TeamMemberController.php * Update app-header.tsx * Update welcome.tsx * eslint * do not allow the team owner to remove themselves * rely on assignable for updating team member * tests * typo * Update TeamController.php * Update TeamInvitationController.php * ensure no stale data on non-happy path * processing indicators for destructive actions * use wayfinder object with verb instead of verb * copy update * Update TeamRole.php * toUserTeams * Update edit.blade.php * no single line curlies * fix variant counts, variant label, and docs after rebase * Add missing config * Update Pint config and apply linter changes * Fix issue with invite modal * formatting * Refactor migrations and remove MembershipFactory * Rename team invitation rule * Updated invitation code to 64 chars * Update Delete team flow * formatting (#45) * formatting * remove need for config file * test formatting * working on livewire * update livewire * formatting * Linter fixes --------- Co-authored-by: Wendell Adriel <wendelladriel.ti@gmail.com> * changes for security page on teams variants * Add --teams to variant filtering flags in orchestrator scripts The teams variants in check-kits and lint-kits were missing the `variant` property, so they couldn't be targeted with the selective execution flags. This adds `--teams` to the recognized variant flags and tags all teams entries so they can be filtered independently. * adjust method order on policy * update invitation * update Teams welcome page SVG to Laravel 13 illustration * use Fillable and Hidden attributes on teams models * restore Current badge and Star icon on teams index page Replace the CheckCircle/Circle icon approach with a green "Current" badge next to the team name and a Star icon button for switching teams, matching the Livewire variant's existing UX across React, Svelte, and Vue Inertia kits. * remove current team badge and switch button from teams index page Team switching is already available in the sidebar, so the redundant "Current" badge and star switch button are no longer needed on the teams list page. The "Personal" badge and edit/view buttons are kept. * Add teams variants to CI test matrix * Remove stale pr_branch fields from push workflow teams entries * Align teams kits with Inertia 3 layout pattern Teams pages were manually wrapping with AppLayout/SettingsLayout instead of using the createInertiaApp layout callback. This converts all teams pages (React, Vue, Svelte) to the declarative layout property pattern matching non-teams kits, adds bootstrap overrides with teams/ route handling, removes unnecessary .url from wayfinder route helpers, and fixes pre-existing Svelte 5 type issues ($page store syntax, currentUrl import path, missing isCurrentOrParentUrl). * Add teams browser test suite and expand matrix to 8 variants Introduces a dedicated browser test suite for Teams covering registration, team CRUD, switching, invitations, member management, and permission-based UI visibility across all four stacks. Browser tests are reorganized into three layers (bootstrap, common, teams) so each variant runs exactly one suite. The runner script and CI workflow are expanded from 4 to 8 jobs accordingly. Adds data-test selectors to the Teams UI across Livewire, React, Svelte, and Vue. Renames the Livewire team-switcher wire:model from "name" to "teamName" to avoid input name collisions with other pages sharing the sidebar layout. --------- Co-authored-by: Joe Tannenbaum <joe.tannenbaum@laravel.com> Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent 4796892 commit d257c8f

File tree

205 files changed

+15763
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+15763
-180
lines changed

.agents/skills/maestro/SKILL.md

Lines changed: 131 additions & 40 deletions
Large diffs are not rendered by default.

.claude/skills/maestro/SKILL.md

Lines changed: 131 additions & 40 deletions
Large diffs are not rendered by default.

.github/workflows/browser-tests.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,35 @@ jobs:
2020
include:
2121
- name: Livewire Kit
2222
kit: Livewire
23+
teams: false
2324

2425
- name: React Kit
2526
kit: React
27+
teams: false
2628

2729
- name: Svelte Kit
2830
kit: Svelte
31+
teams: false
2932

3033
- name: Vue Kit
3134
kit: Vue
35+
teams: false
36+
37+
- name: Livewire Teams Kit
38+
kit: Livewire
39+
teams: true
40+
41+
- name: React Teams Kit
42+
kit: React
43+
teams: true
44+
45+
- name: Svelte Teams Kit
46+
kit: Svelte
47+
teams: true
48+
49+
- name: Vue Teams Kit
50+
kit: Vue
51+
teams: true
3252

3353
steps:
3454
- name: Checkout Maestro
@@ -52,10 +72,13 @@ jobs:
5272

5373
- name: Build ${{ matrix.name }}
5474
working-directory: orchestrator
55-
run: php artisan build --kit=${{ matrix.kit }}
75+
run: php artisan build --kit=${{ matrix.kit }}${{ matrix.teams && ' --teams' || '' }}
76+
77+
- name: Copy Browser Test Bootstrap to Build
78+
run: cp -r browser_tests/bootstrap/* build/
5679

57-
- name: Copy Browser Tests to Build
58-
run: cp -r browser_tests/* build/
80+
- name: Copy Browser Test Suite to Build
81+
run: cp -r browser_tests/${{ matrix.teams && 'teams' || 'common' }}/* build/
5982

6083
- name: Install Build Composer Dependencies
6184
working-directory: build

.github/workflows/push-kit-changes.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@ jobs:
5050
branch: workos
5151
node: false
5252

53+
- name: Livewire Kit (Teams)
54+
kit: Livewire
55+
build_flags: '--teams'
56+
repository: laravel/livewire-starter-kit
57+
path: livewire-starter-kit-teams
58+
branch: teams
59+
node: false
60+
61+
- name: Livewire Kit (WorkOS Teams)
62+
kit: Livewire
63+
build_flags: '--teams --workos'
64+
repository: laravel/livewire-starter-kit
65+
path: livewire-starter-kit-workos-teams
66+
branch: workos-teams
67+
node: false
68+
5369
# React variants
5470
- name: React Kit (Blank)
5571
kit: React
@@ -75,6 +91,22 @@ jobs:
7591
branch: workos
7692
node: true
7793

94+
- name: React Kit (Teams)
95+
kit: React
96+
build_flags: '--teams'
97+
repository: laravel/react-starter-kit
98+
path: react-starter-kit-teams
99+
branch: teams
100+
node: true
101+
102+
- name: React Kit (WorkOS Teams)
103+
kit: React
104+
build_flags: '--teams --workos'
105+
repository: laravel/react-starter-kit
106+
path: react-starter-kit-workos-teams
107+
branch: workos-teams
108+
node: true
109+
78110
# Svelte variants
79111
- name: Svelte Kit (Blank)
80112
kit: Svelte
@@ -100,6 +132,22 @@ jobs:
100132
branch: workos
101133
node: true
102134

135+
- name: Svelte Kit (Teams)
136+
kit: Svelte
137+
build_flags: '--teams'
138+
repository: laravel/svelte-starter-kit
139+
path: svelte-starter-kit-teams
140+
branch: teams
141+
node: true
142+
143+
- name: Svelte Kit (WorkOS Teams)
144+
kit: Svelte
145+
build_flags: '--teams --workos'
146+
repository: laravel/svelte-starter-kit
147+
path: svelte-starter-kit-workos-teams
148+
branch: workos-teams
149+
node: true
150+
103151
# Vue variants
104152
- name: Vue Kit (Blank)
105153
kit: Vue
@@ -125,6 +173,22 @@ jobs:
125173
branch: workos
126174
node: true
127175

176+
- name: Vue Kit (Teams)
177+
kit: Vue
178+
build_flags: '--teams'
179+
repository: laravel/vue-starter-kit
180+
path: vue-starter-kit-teams
181+
branch: teams
182+
node: true
183+
184+
- name: Vue Kit (WorkOS Teams)
185+
kit: Vue
186+
build_flags: '--workos --teams'
187+
repository: laravel/vue-starter-kit
188+
path: vue-starter-kit-workos-teams
189+
branch: workos-teams
190+
node: true
191+
128192
steps:
129193
- name: Checkout Maestro
130194
uses: actions/checkout@v6

.github/workflows/tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,23 @@ jobs:
2323
- Livewire Kit
2424
- Livewire Kit (Components)
2525
- Livewire Kit (WorkOS)
26+
- Livewire Kit (Teams)
27+
- Livewire Kit (WorkOS Teams)
2628
- React Kit (Blank)
2729
- React Kit
2830
- React Kit (WorkOS)
31+
- React Kit (Teams)
32+
- React Kit (WorkOS Teams)
2933
- Svelte Kit (Blank)
3034
- Svelte Kit
3135
- Svelte Kit (WorkOS)
36+
- Svelte Kit (Teams)
37+
- Svelte Kit (WorkOS Teams)
3238
- Vue Kit (Blank)
3339
- Vue Kit
3440
- Vue Kit (WorkOS)
41+
- Vue Kit (Teams)
42+
- Vue Kit (WorkOS Teams)
3543
include:
3644
# Livewire variants
3745
- name: Livewire Kit (Blank)
@@ -58,6 +66,18 @@ jobs:
5866
path: livewire-starter-kit-workos
5967
node: false
6068

69+
- name: Livewire Kit (Teams)
70+
kit: Livewire
71+
build_flags: '--teams'
72+
path: livewire-starter-kit-teams
73+
node: false
74+
75+
- name: Livewire Kit (WorkOS Teams)
76+
kit: Livewire
77+
build_flags: '--teams --workos'
78+
path: livewire-starter-kit-workos-teams
79+
node: false
80+
6181
# React variants
6282
- name: React Kit (Blank)
6383
kit: React
@@ -77,6 +97,18 @@ jobs:
7797
path: react-starter-kit-workos
7898
node: true
7999

100+
- name: React Kit (Teams)
101+
kit: React
102+
build_flags: '--teams'
103+
path: react-starter-kit-teams
104+
node: true
105+
106+
- name: React Kit (WorkOS Teams)
107+
kit: React
108+
build_flags: '--teams --workos'
109+
path: react-starter-kit-workos-teams
110+
node: true
111+
80112
# Svelte variants
81113
- name: Svelte Kit (Blank)
82114
kit: Svelte
@@ -96,6 +128,18 @@ jobs:
96128
path: svelte-starter-kit-workos
97129
node: true
98130

131+
- name: Svelte Kit (Teams)
132+
kit: Svelte
133+
build_flags: '--teams'
134+
path: svelte-starter-kit-teams
135+
node: true
136+
137+
- name: Svelte Kit (WorkOS Teams)
138+
kit: Svelte
139+
build_flags: '--teams --workos'
140+
path: svelte-starter-kit-workos-teams
141+
node: true
142+
99143
# Vue variants
100144
- name: Vue Kit (Blank)
101145
kit: Vue
@@ -115,6 +159,18 @@ jobs:
115159
path: vue-starter-kit-workos
116160
node: true
117161

162+
- name: Vue Kit (Teams)
163+
kit: Vue
164+
build_flags: '--teams'
165+
path: vue-starter-kit-teams
166+
node: true
167+
168+
- name: Vue Kit (WorkOS Teams)
169+
kit: Vue
170+
build_flags: '--workos --teams'
171+
path: vue-starter-kit-workos-teams
172+
node: true
173+
118174
steps:
119175
- name: Checkout Maestro
120176
uses: actions/checkout@v6

AGENTS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
Maestro is the monorepo orchestrator for the official Laravel starter kits. Use the local maestro skill before making changes:
44

5-
- **Skill**: `.claude/skills/maestro/SKILL.md` — project structure, commands, kit inheritance, placeholder system, and workflow rules.
5+
- **Skill**: `.claude/skills/maestro/SKILL.md` — project structure, commands, kit inheritance, teams feature, placeholder system, and workflow rules.
66

77
## Quick Reference
88

9-
- Build: `cd orchestrator && php artisan build` (interactive) or use `--kit`, `--blank`, `--workos`, flags
9+
- Build: `cd orchestrator && php artisan build` (interactive) or use `--kit`, `--blank`, `--workos`, `--teams` flags
1010
- Dev: `composer kit:run` (from `orchestrator/`)
1111
- Test: `composer setup && composer ci:check` (from `build/`)
12-
- Test all kits: `composer kits:check` (from `orchestrator/`) — builds and runs CI checks for all 13 variants
12+
- Test all kits: `composer kits:check` (from `orchestrator/`) — builds and runs CI checks for all 21 variants
1313
- Pint only: `composer kits:pint` (from `orchestrator/`) — runs Pint on `kits/` and `browser_tests/`
1414
- Lint: `composer kits:lint` (from `orchestrator/`) — runs `kits:pint`, then frontend lint/format for Inertia variants
15-
- Browser tests (all kits): `composer kits:browser-tests` (from `orchestrator/`)
15+
- Browser tests (all 8 kits): `composer kits:browser-tests` (from `orchestrator/`)
1616
- Edit in `build/` (when available), commit in `kits/`
1717

1818
### Selective Execution
1919

2020
Pass `--livewire`, `--react`, `--svelte`, and/or `--vue` to target specific frameworks.
21-
Pass `--blank`, `--fortify`, `--workos`, and/or `--components` to target specific variants.
21+
Pass `--blank`, `--fortify`, `--workos`, `--components`, and/or `--teams` to target specific variants.
2222
Combine both to narrow down exactly which kit variants to run:
2323

2424
```bash

CLAUDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
Maestro is the monorepo orchestrator for the official Laravel starter kits. Use the local maestro skill before making changes:
44

5-
- **Skill**: `.claude/skills/maestro/SKILL.md` — project structure, commands, kit inheritance, placeholder system, and workflow rules.
5+
- **Skill**: `.claude/skills/maestro/SKILL.md` — project structure, commands, kit inheritance, teams feature, placeholder system, and workflow rules.
66

77
## Quick Reference
88

9-
- Build: `cd orchestrator && php artisan build` (interactive) or use `--kit`, `--blank`, `--workos`, flags
9+
- Build: `cd orchestrator && php artisan build` (interactive) or use `--kit`, `--blank`, `--workos`, `--teams` flags
1010
- Dev: `composer kit:run` (from `orchestrator/`)
1111
- Test: `composer setup && composer ci:check` (from `build/`)
12-
- Test all kits: `composer kits:check` (from `orchestrator/`) — builds and runs CI checks for all 13 variants
12+
- Test all kits: `composer kits:check` (from `orchestrator/`) — builds and runs CI checks for all 21 variants
1313
- Pint only: `composer kits:pint` (from `orchestrator/`) — runs Pint on `kits/` and `browser_tests/`
1414
- Lint: `composer kits:lint` (from `orchestrator/`) — runs `kits:pint`, then frontend lint/format for Inertia variants
15-
- Browser tests (all kits): `composer kits:browser-tests` (from `orchestrator/`)
15+
- Browser tests (all 8 kits): `composer kits:browser-tests` (from `orchestrator/`)
1616
- Edit in `build/` (when available), commit in `kits/`
1717

1818
### Selective Execution
1919

2020
Pass `--livewire`, `--react`, `--svelte`, and/or `--vue` to target specific frameworks.
21-
Pass `--blank`, `--fortify`, `--workos`, and/or `--components` to target specific variants.
21+
Pass `--blank`, `--fortify`, `--workos`, `--components`, and/or `--teams` to target specific variants.
2222
Combine both to narrow down exactly which kit variants to run:
2323

2424
```bash

0 commit comments

Comments
 (0)