Step 1 of 10
Audit Existing Team, User, and Auth Models
Map the current app structure so the invite system integrates with real existing models and permission rules.
Ask the builder to inspect the current schema and auth flow before changing anything.
Review the existing codebase and identify the real models, routes, and UI related to users, teams, memberships, and authentication. Show me the current schema for users, teams, and team memberships, identify who currently has admin or owner privileges, and propose the minimal integration plan for adding team invitations. Do not implement anything yet; first give a concrete implementation plan tied to the actual files and models already in the app.
Expected after this step
A clear implementation plan showing current models, permissions, routes, and the exact insertion points for invites.
Should not happen
- ✕Building only an invite modal UI without any database table, token validation, or acceptance logic
- ✕Letting the frontend decide who can invite users without server-side authorization checks
- ✕Creating invite links that look real but do not actually map to stored invite records
- ✕Accepting the invite visually without creating a real membership row in the database
Verify before continuing
Do not move on until every check is true. The complete button stays locked until then.
Do not continue if…
- !Building only an invite modal UI without any database table, token validation, or acceptance logic
- !Letting the frontend decide who can invite users without server-side authorization checks
- !Creating invite links that look real but do not actually map to stored invite records
- !Accepting the invite visually without creating a real membership row in the database
- !Ignoring edge cases like duplicate invites, expired tokens, revoked invites, or existing team membership
If the AI messes this up
Use this when the AI fakes progress or breaks the feature. It forces a real fix.
You gave a generic plan instead of inspecting my actual app. Re-scan the current codebase and list the real files, models, routes, and components for users, teams, memberships, and auth. Base the invite implementation plan only on what already exists in this project.