React

Workspaces, members and invites

64 files3 packages1 dependency

This pack adds workspaces to your app, so your users can work together with their team in shared spaces.

  • Workspaces with members and roles, powered by the Permissions package.
  • A personal workspace for every new user, created at signup.
  • Users can belong to as many workspaces as they need.
  • Every route and query scoped to the current workspace.
  • Email invites. New users accept them by signing up, and existing users by signing in.
  • Member management. Owners can change roles and remove members, and any member can leave.
  • Workspace settings, where owners can rename the workspace.

Depends on Auth

This pack builds on the Auth pack's User model, login, signup and email setup, so apply the Auth pack first.

Apply the workspaces pack with Flow. Start a new session in your selected coding agent and execute the following slash command inside it.

$ npx @adonisplus/flow apply --pack=workspaces --agent=claude

After applying, Flow will make the following changes to your app.

  • Find the page users land on after login, and make it open the workspace they used last.
  • Add a page layout with a header and a layout for the settings pages, if your app doesn't have them yet.
  • Install the packages the pack needs.
  • Add the workspace tables, models and roles, and the authorization checks that decide who can do what.
  • Add the workspace, members and invite pages, plus the invite email.
  • Create a personal workspace at signup, and let users accept an invite when they sign up or log in.
  • Restyle the new pages to match your app's design.
  • Run the tests, walk through each flow in the browser, and show you the result.