Skip to content

Add Teams variant to the API starter kit#80

Open
WendellAdriel wants to merge 18 commits into
feat/api-starter-kitfrom
api-teams
Open

Add Teams variant to the API starter kit#80
WendellAdriel wants to merge 18 commits into
feat/api-starter-kitfrom
api-teams

Conversation

@WendellAdriel

Copy link
Copy Markdown
Member

The API starter kit now ships a Teams variant so API-first apps get the same team management feature set (members, invitations, permissions, roles) that the Inertia and Livewire Teams kits already offer.

A new API/Teams layer sits on top of Shared/Teams/Base, skipping the Fortify layer in favour of its own RegisterController, User model, and HasTeams trait that omit the session-based "current team" concept — stateless APIs pass team context per request instead. The five Team form requests moved from Inertia/Teams/Base up to Shared/Teams/Base so both stacks reuse them. Orchestrator, manifest, and workflows were wired to build and CI-check the new api-teams variant.

@WendellAdriel WendellAdriel force-pushed the api-teams branch 3 times, most recently from 59ea28f to b5b22b7 Compare April 27, 2026 14:50
Comment thread kits/API/Teams/app/Http/Controllers/Teams/TeamMemberController.php
Comment thread kits/API/Teams/routes/api.php
Comment thread kits/API/Teams/database/factories/UserFactory.php

@pushpak1300 pushpak1300 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Having a test to check test_non_member_cannot_access_team will be great.

@pushpak1300 pushpak1300 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM !

@nicobleiler

Copy link
Copy Markdown

I was wondering if this PR is close enough to final to already base a new project on?

@WendellAdriel WendellAdriel force-pushed the feat/api-starter-kit branch 2 times, most recently from dffbd39 to 153376d Compare May 20, 2026 16:54
@WendellAdriel WendellAdriel force-pushed the api-teams branch 3 times, most recently from 0d8fc7f to f871ec3 Compare June 1, 2026 14:16
@WendellAdriel WendellAdriel force-pushed the feat/api-starter-kit branch from a9f93c2 to b4554a3 Compare June 3, 2026 11:34
@WendellAdriel WendellAdriel marked this pull request as ready for review June 3, 2026 12:02
@RasmusPJustesen

Copy link
Copy Markdown

So cool! Will this go live together with the parent PR (API starter kit) or will it come later?

@WendellAdriel

Copy link
Copy Markdown
Member Author

@RasmusPJustesen the idea is to release together with the base API starter kit.

@WendellAdriel WendellAdriel force-pushed the feat/api-starter-kit branch from b4554a3 to c060ddc Compare June 12, 2026 17:17
BuildCommand, StarterKit enum, kit-manifest, check-kits, and
kit-helpers updated to handle the new API kit. GitHub Actions
workflows include the API variant in test and push matrices.
README, CLAUDE.md, AGENTS.md, and SKILL.md reflect the new
variant count (22) and --api flag.
Move verification.verify back outside auth:sanctum so signed links work
without a bearer token. Block self-role changes in TeamMemberController
so an owner cannot demote themselves. Authenticate TeamMemberTest
through Sanctum tokens and assert ownership stability on every update
and remove path. Generate the personal-team slug from the overridden
name in UserFactory so fixtures stay consistent.
Make TeamMemberController@destroy 404 when the targeted user has no
membership instead of silently returning 204. Move invitation accept
to GET /invitations/{invitation}/accept under signed middleware with
a 3-day TTL, validate state inline, and resolve the user by
case-insensitive email match. Add a kit-local TeamInvitation
notification override that emits the signed URL via
URL::temporarySignedRoute, leaving Inertia/Livewire variants on the
original GET link. Drop the manual Str::slug build in UserFactory's
afterCreating block to match the Fortify and WorkOS variant
convention.
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.

4 participants