bootstrap-accounts

Bootstrap multi-tenant account-scoped dashboards in Phoenix apps with roles and routing.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/agoodway/GoodSkills --skill bootstrap-accounts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bootstrap-accounts
Source: https://github.com/agoodway/GoodSkills/tree/main/skills/bootstrap-accounts
Command: npx skills add https://github.com/agoodway/GoodSkills --skill bootstrap-accounts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the problem of adding multi-tenant, account-scoped navigation and authorization in a Phoenix app that already uses phx.gen.auth, so users can switch between organizations/accounts safely.

Core Features & Use Cases

  • Multi-tenant data model: creates accounts and account_users (membership) with roles and slug-based accounts.
  • Account-scoped access layer: adds an AccountContext facade to list accessible accounts, validate account access per user, and pick a default account from session.
  • Authenticated dashboard UX: provides a dashboard layout with sidebar navigation, breadcrumbs, and an account switcher LiveComponent, including theme toggle support via DaisyUI.
  • Routing + redirect flow: implements an account-scoped dashboard route (/dashboard/accounts/:account_id) with LoadAccount plug and a /dashboard redirect controller to the user’s default account.

Quick Start

Install the skill and run the bootstrap workflow for your existing Phoenix 1.8 + phx.gen.auth + DaisyUI app by telling the assistant: bootstrap accounts for my Phoenix app so users can switch between multiple accounts with an account-scoped dashboard.

Frequently Asked Questions about bootstrap-accounts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add multi-tenant account switching to a Phoenix LiveView app?

Multi-tenant account switching is bootstrapped by generating accounts, memberships, and account-aware routing with a LoadAccount plug, enabling users to navigate multiple organizations via a dashboard account switcher.

Can I implement role-based access control for multiple accounts in Phoenix?

Role-based access control for multiple accounts is implemented by creating an account_users membership schema with roles and an AccountContext facade that validates per-user account access and retrieves accessible accounts.

How do I set up account-scoped dashboard routing with Phoenix phx.gen.auth?

Account-scoped dashboard routing works by adding a LoadAccount plug to the /dashboard/accounts/:account_id route and a redirect controller that sends users from /dashboard to their default account stored in the session.

Does this multi-tenant Phoenix setup work with DaisyUI for the dashboard layout?

The multi-tenant Phoenix setup works with DaisyUI by wiring LiveView layout components that include sidebar navigation, breadcrumbs, an account switcher LiveComponent, and theme toggle support for the dashboard UX.

What is the best way to structure multi-tenancy in a Phoenix app with slugs?

Structuring multi-tenancy with slugs involves creating accounts with slug-based identifiers and an account_users membership table, managed through an AccountContext facade that handles default account loading from the session.

Do I need existing phx.gen.auth authentication before adding multi-tenant accounts?

Existing phx.gen.auth authentication is required because the multi-tenant account bootstrap preserves the auth session while loading the user's selected account, building account access securely on top of authenticated users.