Skip to main content

Claude/ChatGPT Prompt to Build a SaaS Team Members & Permissions UI

Team and roles UI prompt: invite modal, role matrix, search/filter, bulk actions, and a per-user audit log side panel; keyboard accessible.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt

                                

What this prompt does

This prompt designs a team members and permissions screen for multi-tenant SaaS and returns concrete components and interaction states. It specifies a members table with role dropdowns and status, an invite modal with duplicate-email validation, a roles matrix, search and filter, bulk actions with confirmation, and a per-user audit log in a side panel. The standout safety requirement is locking the current user from self-demotion — and preventing last-owner removal — so no one can accidentally lock the whole team out.

The variables fit the screen to your tenancy model. [roles] defines the dropdown options and the rows of the permissions matrix. [stack] (for example, Next.js with TanStack Table) sets the component conventions. [invite_method] shapes the invite modal — an email magic-link flow differs from a token-based one. [audit_events] populates the side panel, so the log shows the exact events you track, like role changes, logins, invites, and removals.

When to use it

  • You are building team management for a multi-tenant SaaS app
  • You need a members table with roles, status, and last-active info
  • You want an invite modal with role selection and duplicate-email validation
  • You need a roles-to-permissions matrix mapped from your role list
  • You must prevent self-demotion and last-owner removal lockouts
  • You want a per-user audit log panel showing the events you track

Example output

The model returns a component tree with state notes for your stack: a members table (avatar, name, email, role dropdown, status, last active), an invite modal using your invite method, a roles matrix mapping your roles to permissions with self-demotion locked, search and filter by role/status, bulk actions with confirmation, and a side panel showing a per-user audit log of your tracked events. Empty, loading, and permission-denied states plus full keyboard accessibility are included.

Pro tips

  • List every role in [roles]; the dropdown and the permissions matrix are generated from it, so omissions leave gaps
  • Lock self-demotion and last-owner removal (deliverable 3) before shipping — that edge case is the one that becomes a 2am lockout call
  • Set [invite_method] to your real flow so the modal's validation and success path match
  • Populate [audit_events] with the events you actually log so the side panel is useful, not decorative
  • Match [stack] to your table library; TanStack Table conventions differ from a plain table implementation
  • Keep the permission-denied state; users without rights should see an intentional screen, not a broken one
  • Put confirmation dialogs on bulk actions like role changes and removals, since a single mis-click across selected rows is hard to undo
  • Surface last-active in the members table so admins can spot dormant accounts before a routine permissions cleanup

Frequently Asked Questions

How does it prevent locking everyone out of a tenant?
Deliverable 3 locks the current user's role from self-demotion and the prompt specifically guards against the last owner removing or demoting themselves. That edge case is the one that turns into a lockout and a 2am support call, so it is handled before anything else ships.
Does the audit log show my specific events?
Yes, the side panel is populated from the `[audit_events]` variable. Set it to the events you actually track, such as role change, login, invite sent, and member removed, and each entry appears with a timestamp so the log reflects your real activity.
Can I customize the roles and permissions?
Yes, the roles matrix is built from whatever you put in `[roles]`. The dropdown options and the matrix rows both come from that list, so defining roles like Owner, Admin, Member, and Viewer maps them to permissions in the generated screen.
Does the invite flow check for duplicate emails?
Yes, the invite modal uses your `[invite_method]` and includes duplicate-email validation along with role selection. That stops you from sending a second invite to someone already on the team and keeps the members list clean.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in Tech & SaaS UI Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support