Block · Teams and access
Organisations and teams
Adds organisations, teams, memberships with roles and email invitations, private to the members of each organisation: Postgres row-level security shows a person only the organisations they belong to and everything in them. Whoever creates an organisation becomes its owner; owners and admins invite people by email, create teams and change roles. An invited person who already has an account joins straight away; anyone else gets an email and joins when they sign up with that address. Optionally makes one of your tables (projects, accounts) belong to an organisation, private to its members too.
use_template { slug: "organisations-and-teams" } adds
- Tables
- organisation, team, membership, invitation
- Fields
- ‹attach_to›.organisation_id
- Components
- OrganisationConsole
- Pages
- /organisations, /organisations/:id, /organisations-admin
- Workflows
- organisation-owner, invitation-send, invitation-join
- Rules
- 1 on organisation, 1 on team, 2 on membership, 1 on invitation
What it adds to your app
Tables organisation, team, membership and invitation. Organisations list and an organisation console (members, roles, teams, invites). A staff overview of every organisation. Workflows: owner membership, invite or add by email, join on signup.
Tables
organisationname, about, website, owner_idteamorganisation_id, name, descriptionmembershiporganisation_id, member_id, team_id, role, statusinvitationorganisation_id, email, role, team_id, status, invited_by
Fields added to your tables
‹attach_to›.organisation_id
Pages
/organisationsOrganisations (‹member_role›)/organisations/:idOrganisation (‹member_role›)/organisations-adminAll organisations (@staff)
Workflows
organisation-ownerMake the creator the organisation's owner. On organisation createdinvitation-sendAdd or email the person invited. On invitation createdinvitation-joinAdd new signups to the organisations that invited them. On ‹member_role› created
Components
OrganisationConsoleOne organisation: members with roles, teams, and invitations, managed by its owner and admins
Rules on every write
organisationGive the organisation a name of 2 to 80 characters.teamOnly the organisation's owner or admins can do that.membershipOnly the organisation's owner or admins can do that.membershipA membership stays with its person and organisation.invitationOnly the organisation's owner or admins can do that.
Where it attaches
Params point the template at your own tables and roles. Leave out the ones with defaults; a wrong one is refused with the options your app has.
| Param | What it is | Example |
|---|---|---|
member_role | The role whose people create and join organisations (their own table holds the members). Optional. | member |
email_field | Optional: the email field on that role's table, used to match invitations to people. Optional. | email |
attach_to | Optional: a table of yours (projects, accounts) whose rows then belong to an organisation: it gets organisation_id, and that role sees and changes only its organisations' rows. Optional. | project |
Use with your coding agent
- Connect the Appbricx MCP server to Claude Code, Cursor or any MCP client (quickstart).
- Paste the prompt. The agent reads the template, previews the merge with dry_run and shows you the diff.
- It applies to dev. Check it, then deploy when you are happy.
Add the Organisations and teams template (slug "organisations-and-teams") to my Appbricx project. Read it with get_template, run use_template with dry_run first and show me the diff, then apply it. Ask me where it attaches if you can't tell from my contract (member_role: who joins organisations; email_field: their email field; attach_to: records that belong to an organisation).{
"tool": "use_template",
"arguments": {
"slug": "organisations-and-teams",
"project_id": "<your project id>",
"params": {
"member_role": "member",
"email_field": "email",
"attach_to": "project"
},
"dry_run": true
}
}appbricx templates use organisations-and-teams --param member_role=member --param email_field=email --param attach_to=project --dry-runGoes well with
Booking calendar
Block. Bookable time slots with capacity, a day picker, my bookings with cancel, and rules that stop double-booking.
slotreservationSlotPickerMyReservationsreservation-countStripe subscriptions
Block. Monthly or yearly plans paid through Stripe Checkout, with a billing page and Stripe's own billing settings.
plansubscriptionBillingPanelsubscription-checkoutstripe-subscription-eventsComments
Block. Threaded comments on any record, with replies, @mentions, edits and live updates.
commentCommentThreadcomment-notify