# Electrik > Electrik is a Laravel SaaS starter kit: authentication, teams, and Stripe billing as a Composer package (`electrik/electrik` 5.x). Built on Electrik Slate 3. Docs: https://electrik.dev/docs ## Get started - [Introduction](https://electrik.dev/docs/getting-started/introduction): What Electrik 5.x is. - [Quickstart](https://electrik.dev/docs/getting-started/quickstart): Fastest path to a running app. - [Installation](https://electrik.dev/docs/getting-started/installation): `electrik:install` deep dive. - [Architecture](https://electrik.dev/docs/getting-started/architecture): Package vs App, teams as tenant. - [AI & agents](https://electrik.dev/docs/getting-started/ai): Cursor/Claude with Electrik — AGENTS.md, llms.txt, skills, package-safe rules. - [AGENTS.md on GitHub](https://github.com/electrikhq/electrik/blob/main/AGENTS.md): Package-root rules for coding agents. - [Install page](https://electrik.dev/install): Marketing quickstart. ## Core concepts - [Configuration](https://electrik.dev/docs/core-concepts/configuration): config/electrik.php and environment variables. - [Auth & security](https://electrik.dev/docs/core-concepts/auth-security): Login, Socialite, magic link, 2FA, passkeys, sessions, and login alerts. - [Teams & invites](https://electrik.dev/docs/core-concepts/teams-invites): Create and switch teams, branding, archive, invites, ownership, activity, webhooks. - [Roles & permissions](https://electrik.dev/docs/core-concepts/roles-permissions): Spatie permissions with team context and the Electrik catalog. - [Billing](https://electrik.dev/docs/core-concepts/billing): Stripe via Cashier on the team: plans, add-ons, usage, tax IDs, webhooks. - [Plan features & seats](https://electrik.dev/docs/core-concepts/plan-features-seats): Gate features and member limits by Stripe price; ops editor for flags and add-ons. - [Onboarding](https://electrik.dev/docs/core-concepts/onboarding): First-run wizard, env toggle, and helper commands. - [Customization](https://electrik.dev/docs/core-concepts/customization): Override views carefully and lean on Slate for UI. ## Guides & reference - [Local sandbox](https://electrik.dev/docs/guides/local-sandbox): Reset and run the Electrik sandbox app from the lab monorepo. - [Stripe test mode](https://electrik.dev/docs/guides/stripe-test-mode): Develop billing against Stripe test keys and the Stripe CLI. - [Feature gating](https://electrik.dev/docs/guides/feature-gating): Use plan_features to limit seats and capabilities. - [Upgrading](https://electrik.dev/docs/guides/upgrading): How to upgrade Electrik 5.x and migrate from older lines. - [Generators](https://electrik.dev/docs/guides/generators): Scaffold Livewire, models, and resources with electrik:make. - [API tokens](https://electrik.dev/docs/guides/api-tokens): Personal vs team-scoped Sanctum tokens, abilities, and Electrik API routes. - [Operator console](https://electrik.dev/docs/guides/operators-ops): ELECTRIK_OPERATOR_EMAILS and the /ops Slate console. - [Billing providers](https://electrik.dev/docs/guides/billing-providers): Stripe Cashier is the supported billing processor. - [Social login & magic link](https://electrik.dev/docs/guides/social-login): Google, GitHub, Apple, Microsoft Socialite and magic-link email sign-in. - [Outbound webhooks](https://electrik.dev/docs/guides/outbound-webhooks): Team HTTPS endpoints Electrik calls on workspace events. - [Internationalization](https://electrik.dev/docs/guides/i18n): Locales en/es/fr/ar/hi, Profile language, and RTL. - [Artisan commands](https://electrik.dev/docs/reference/artisan-commands): Electrik console commands reference. - [Routes & middleware](https://electrik.dev/docs/reference/routes-middleware): Route groups and middleware aliases Electrik registers. - [Permissions catalog](https://electrik.dev/docs/reference/permissions-catalog): Default permission keys shipped in config/electrik.php. - [Changelog](https://electrik.dev/docs/reference/changelog): Electrik release notes and where to find full history. - [Roadmap](https://electrik.dev/docs/reference/roadmap): What Electrik is building next, and what we are not chasing. - [Slate UI](https://electrik.dev/docs/ecosystem/slate-ui): Electrik is built on Slate — UI docs live on slate.electrik.dev. - [Teamwork](https://electrik.dev/docs/ecosystem/teamwork): Electrik's teams engine is a Teamwork fork. - [Agent / llms.txt](https://electrik.dev/docs/ecosystem/agent-llms): Machine-readable docs for coding agents — see AI & agents. ## Related - [Resources](https://electrik.dev/resources): Laravel SaaS starter kit, SaaS boilerplate, and build guides. - [Laravel SaaS starter kit](https://electrik.dev/resources/laravel-saas-starter-kit): Package-first starter guide. - [SaaS boilerplate](https://electrik.dev/resources/saas-boilerplate): Zip dump vs Composer package. - [Build a Laravel SaaS](https://electrik.dev/resources/build-laravel-saas): Package-first build path. - [Slate UI docs](https://slate.electrik.dev): Blade components and tokens (do not re-host here). - [License](https://electrik.dev/license): MIT (5.5+); older tags may be BSL. - [Pricing](https://electrik.dev/pricing): Free MIT kit + Electrik Launch delivery. - [GitHub](https://github.com/electrikhq/electrik) ## Machine-readable - [llms.txt](https://electrik.dev/llms.txt): This index. - [llms-full.txt](https://electrik.dev/llms-full.txt): Index plus concatenated markdown docs. - Prefer `.md` URLs under `/docs/...md` when pasting into models. --- # Full documentation dump Below is concatenated markdown from the docs site. Prefer individual `.md` URLs when possible. --- Source: https://electrik.dev/docs/core-concepts/auth-security.md --- title: "Auth & security" description: "Login, Socialite, magic link, 2FA, passkeys, sessions, and login alerts." sidebar_order: 2 sidebar_section: "Core Concepts" --- # Auth & security ![Login](/images/docs/docs-login.png) ## Flows - Login / logout - Registration (`ELECTRIK_REGISTRATION`) - Email verification (`ELECTRIK_EMAIL_VERIFICATION`) - Forgot / reset password - Remember me - Magic link email sign-in (`ELECTRIK_MAGIC_LINK`) - Socialite providers (`ELECTRIK_SOCIALITE_PROVIDERS`) - Passkeys (laravel/passkeys) when installed Details for social + magic link: [Social login & magic link](/docs/guides/social-login). ## Two-factor authentication Account **Security** settings include TOTP 2FA (enable, confirm, recovery codes) via `pragmarx/google2fa-laravel`. ## Passkeys When `laravel/passkeys` is present, users manage passkeys under Security and can sign in with a passkey button on login. Ensure `APP_URL` matches the origin browsers use (localhost vs 127.0.0.1). ## Sessions & devices ![Sessions](/images/docs/docs-sessions.png) **Settings → Sessions** lists database sessions (`SESSION_DRIVER=database`): - Rename a device (`session_labels`) - Revoke other sessions (password confirm) - Authentication log (rappasoft) with success / failed / suspicious filters ## Login alerts When `ELECTRIK_LOGIN_ALERTS=true` (default), a successful sign-in from a new IP sends mail + database notification. Familiar IPs (seen in the auth log) are skipped. ## Team IP allowlist Owners can set allowed IPs under **Teams → Settings**. When set, `electrik.team-ip` middleware blocks app/billing/team routes if the request IP is not listed. Empty allowlist = allow all. ## Suspended users Operators can suspend accounts from `/ops/users`. Suspended users cannot complete Socialite or password login. ## API tokens Sanctum personal + team-scoped tokens live under **Settings → API tokens**. See [API tokens](/docs/guides/api-tokens). ## Post-login destination `ELECTRIK_HOME` (default `/dashboard`) — subject to onboarding and subscription gates. --- Source: https://electrik.dev/docs/core-concepts/billing.md --- title: "Billing" description: "Stripe via Cashier on the team: plans, add-ons, usage, tax IDs, webhooks." sidebar_order: 5 sidebar_section: "Core Concepts" --- # Billing Electrik bills the **team** with Laravel Cashier. Only the **Stripe** driver is supported. ![Billing overview](/images/docs/docs-billing.png) ## Setup 1. Set `STRIPE_KEY`, `STRIPE_SECRET`, `STRIPE_WEBHOOK_SECRET` in `.env` 2. Create products/prices in Stripe (test mode first) 3. Sync into Electrik: ```bash php artisan electrik:stripe:sync ``` 4. Point Stripe webhooks at your Cashier endpoint (or Stripe CLI locally) ## App UI (`/billing`) | Screen | Purpose | | --- | --- | | Overview | Current subscription summary | | Plans | Base plans + add-ons | | Subscription | Cancel / resume / manage | | Payment methods | Cards via Cashier | | Address | Customer address + **tax IDs** | | Invoices | Past invoices | | Usage | Report metered usage | Checkout supports Stripe promotion codes. Past-due / unpaid subscriptions show a dunning banner and ops notifications. ## Subscription type Cashier 15 stores the subscription key in the `type` column (not legacy `name`). Default value: `electrik` (`ELECTRIK_DEFAULT_SUBSCRIPTION_NAME`). ## Add-ons Mark a synced plan as an add-on in **Ops → Plan features** (`is_addon`). On Plans, add-ons attach to an existing active subscription via Cashier `addPrice`. ## Metered usage Mark a plan `metered` in Ops. Teams report quantity from **Billing → Usage** or: ```bash curl -X POST https://your-app.test/api/electrik/usage \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"stripe_price_id":"price_xxx","quantity":10}' ``` ## Tax IDs **Billing → Address** can create/delete Stripe customer tax IDs (EU VAT, US EIN, GB VAT, etc.). ## Require subscription `ELECTRIK_REQUIRE_SUBSCRIPTION=true` gates the app behind an active subscription (onboarding/billing routes remain reachable as configured). ## Sync subscriptions ```bash php artisan electrik:stripe:sync-subscriptions php artisan electrik:stripe:sync-subscriptions --team=1 ``` More: [Stripe test mode](/docs/guides/stripe-test-mode), [Billing providers](/docs/guides/billing-providers), [Plan features & seats](/docs/core-concepts/plan-features-seats). --- Source: https://electrik.dev/docs/core-concepts/configuration.md --- title: "Configuration" description: "config/electrik.php and environment variables." sidebar_order: 1 sidebar_section: "Core Concepts" --- # Configuration Published file: `config/electrik.php`. ## Branding (app-level white-label) ```php 'name' => env('ELECTRIK_NAME', 'Electrik'), 'branding' => [ 'logo_url' => env('ELECTRIK_LOGO_URL'), 'logo_dark_url' => env('ELECTRIK_LOGO_DARK_URL'), 'primary' => env('ELECTRIK_BRAND_PRIMARY'), // CSS color for --slate-primary 'show_powered_by' => filter_var(env('ELECTRIK_SHOW_POWERED_BY', true), FILTER_VALIDATE_BOOL), ], ``` Per-team branding (logo + primary color) is set in **Teams → Settings** and overrides the app primary for that team's shell. ## Auth ```php 'auth' => [ 'home' => env('ELECTRIK_HOME', '/dashboard'), 'registration' => env('ELECTRIK_REGISTRATION', true), 'email_verification' => env('ELECTRIK_EMAIL_VERIFICATION', true), 'socialite' => [ 'providers' => /* ELECTRIK_SOCIALITE_PROVIDERS, default google,github */, ], 'magic_link' => [ 'enabled' => env('ELECTRIK_MAGIC_LINK', true), 'expire_minutes' => env('ELECTRIK_MAGIC_LINK_EXPIRE', 15), ], 'login_alerts' => env('ELECTRIK_LOGIN_ALERTS', true), ], ``` Supported Socialite keys: `google`, `github`, `apple`, `microsoft`. Apple/Microsoft need optional Composer packages — see [Social login & magic link](/docs/guides/social-login). ## Operators ```php 'operators' => [ 'emails' => /* ELECTRIK_OPERATOR_EMAILS comma list */, ], ``` Only listed emails can open `/ops`. See [Operator console](/docs/guides/operators-ops). ## Locales ```php 'locales' => ['en', 'es', 'fr', 'ar', 'hi'], ``` User Profile language wins; guests use `APP_LOCALE`. See [Internationalization](/docs/guides/i18n). ## Teams ```php 'teams' => [ 'roles' => ['owner', 'admin', 'member'], 'invite_expires_days' => (int) env('ELECTRIK_INVITE_EXPIRES_DAYS', 7), ], ``` ## Permissions catalog `permissions.catalog` and `permissions.role_permissions` define Spatie team-scoped permissions. Sync after changes: ```bash php artisan electrik:permissions:sync ``` ## API tokens ```php 'api_tokens' => [ 'default_expiration_days' => env('ELECTRIK_API_TOKEN_EXPIRATION_DAYS', '90'), 'abilities' => [ '*' => 'Full access', 'read' => 'Read', /* ... */ ], ], ``` ## Billing ```php 'billing' => [ 'driver' => env('ELECTRIK_BILLING_DRIVER', 'stripe'), // stripe only 'subscription_name' => env('ELECTRIK_DEFAULT_SUBSCRIPTION_NAME', 'electrik'), 'cc_required_for_free_plan' => env('ELECTRIK_CC_REQUIRED_FOR_FREE_PLAN', false), 'require_subscription' => filter_var(env('ELECTRIK_REQUIRE_SUBSCRIPTION', false), FILTER_VALIDATE_BOOL), 'plan_features' => [ 'default' => ['custom_roles' => false, 'max_members' => 5], 'by_price_id' => [ /* 'price_xxx' => [...] */ ], ], ], ``` Cashier stores the subscription type in the `type` column (value defaults to `electrik`). See [Billing](/docs/core-concepts/billing) and [Plan features & seats](/docs/core-concepts/plan-features-seats). ## Sample resources ```php 'sample' => [ 'projects' => env('ELECTRIK_SAMPLE_PROJECTS', true), ], ``` When enabled (default), Electrik registers the sample **Studio** micro-app: `/clients`, `/projects`, and project task boards. Set `ELECTRIK_SAMPLE_PROJECTS=false` once you ship your own models. --- Source: https://electrik.dev/docs/core-concepts/customization.md --- title: "Customization" description: "Override views carefully and lean on Slate for UI." sidebar_order: 8 sidebar_section: "Core Concepts" --- # Customization ## Prefer config first Most product toggles are in `config/electrik.php` and env vars. Change those before publishing or forking views. ## Views Publish or override Electrik Blade/Livewire views only when you must. Prefer extending with your own `App\` Livewire components and routes for product-specific screens. ## Slate UI Visual language comes from Slate. Tokens and components: [slate.electrik.dev](https://slate.electrik.dev). Do not re-implement a parallel component library inside Electrik docs or your app unless you are intentionally forking design. ## CSS Ensure Slate is imported and `@source` includes package views (install tries to wire this). Rebuild Vite after CSS changes. --- Source: https://electrik.dev/docs/core-concepts/onboarding.md --- title: "Onboarding" description: "First-run wizard, env toggle, and helper commands." sidebar_order: 7 sidebar_section: "Core Concepts" --- # Onboarding When `ELECTRIK_ONBOARDING=true` (default), users who have not finished onboarding are redirected to `/onboarding`. Exempt route name patterns live in `config/electrik.php` (`billing.*`, invitations, verification, logout, etc.). ## Disable ```env ELECTRIK_ONBOARDING=false ``` ## Artisan helpers ```bash php artisan electrik:onboarding:skip-existing php artisan electrik:onboarding:reset ``` Use skip-existing for apps that already have users before enabling the wizard; reset for testing the flow again. --- Source: https://electrik.dev/docs/core-concepts/plan-features-seats.md --- title: "Plan features & seats" description: "Gate features and member limits by Stripe price; ops editor for flags and add-ons." sidebar_order: 6 sidebar_section: "Core Concepts" --- # Plan features & seats `config/electrik.php` → `billing.plan_features`: ```php 'plan_features' => [ 'default' => [ 'custom_roles' => false, 'max_members' => 5, ], 'by_price_id' => [ // 'price_xxx' => ['custom_roles' => true, 'max_members' => 50], ], ], ``` Runtime merge order: **defaults → by_price_id → plan `features` JSON**. Seat-billed plans with `max_seats` also feed `max_members` when features omit it (`PlanFeatures`). ## Ops editor Operators can edit each synced plan's features JSON plus **Add-on** and **Metered** flags at `/ops/plans` without hand-editing the database. Use `electrik.plan:custom_roles` (and your own feature keys) with the `EnsurePlanFeature` middleware. See [Feature gating](/docs/guides/feature-gating). --- Source: https://electrik.dev/docs/core-concepts/roles-permissions.md --- title: "Roles & permissions" description: "Spatie permissions with team context and the Electrik catalog." sidebar_order: 4 sidebar_section: "Core Concepts" --- # Roles & permissions Electrik uses Spatie Laravel Permission in **team** context. ## Catalog keys (default) | Permission | Category | |---|---| | `teams.view` | Teams | | `teams.manage` | Teams | | `teams.invite` | Teams | | `teams.members` | Teams | | `billing.view` | Billing | | `billing.manage` | Billing | | `access.roles` | Access | ## Role defaults - **owner** — `*` (all) - **admin** — teams + billing + `access.roles` - **member** — `teams.view`, `billing.view` ## Sync ```bash php artisan electrik:permissions:sync ``` Custom roles can be gated behind plan feature `custom_roles` — see [Plan features & seats](/docs/core-concepts/plan-features-seats). Full table: [Permissions catalog](/docs/reference/permissions-catalog). --- Source: https://electrik.dev/docs/core-concepts/teams-invites.md --- title: "Teams & invites" description: "Create and switch teams, branding, archive, invites, ownership, activity, webhooks." sidebar_order: 3 sidebar_section: "Core Concepts" --- # Teams & invites Teams are the workspace unit in Electrik. Billing and many permissions attach to the **current team**. ![Teams](/images/docs/docs-teams.png) ## Capabilities - Create and switch teams - Team settings: name, avatar, branding, IP allowlist, archive/restore, delete - Invite members by email (`ELECTRIK_INVITE_EXPIRES_DAYS`, default 7) - Accept / deny invitations - Manage members, roles, leave team, transfer ownership - Impersonate members (`users.impersonate` via lab404/laravel-impersonate) - Activity log (filterable, paginated) - Outbound webhooks (signed HTTP deliveries) ![Members](/images/docs/docs-members.png) ## Branding ![Team settings](/images/docs/docs-team-settings.png) Under **Teams → Settings → Branding**: - Brand logo (public disk) - Primary color (native color picker + hex) Saved colors update `--slate-primary` / `--color-primary` (and contrast-aware foreground) for that team's shell without a full reload. ## Archive vs delete - **Archive** — hides the team from the switcher; restore later - **Delete** — cancels billing, removes members/roles (owner only) ## Activity ![Activity](/images/docs/docs-activity.png) Team events (invites, joins, branding, ownership, webhooks, archive, etc.) are stored via Spatie activitylog with `team_id`. ## Outbound webhooks **Teams → Webhooks** registers HTTPS endpoints. Electrik POSTs signed JSON (`X-Electrik-Signature`) for events such as `team.archived`, `team.deleted`. See [Outbound webhooks](/docs/guides/outbound-webhooks). ## Default roles Configured in `config/electrik.php`: `owner`, `admin`, `member`. See [Roles & permissions](/docs/core-concepts/roles-permissions). Teams engine: `electrik/teamwork` (Electrik’s Teamwork fork). --- Source: https://electrik.dev/docs/ecosystem/agent-llms.md --- title: "Agent / llms.txt" description: "Machine-readable docs for coding agents — see AI & agents." sidebar_order: 3 sidebar_section: "Ecosystem" --- # Agent / llms.txt Canonical guide: **[AI & agents](/docs/getting-started/ai)**. Quick links: - [/llms.txt](/llms.txt) — curated link index - [/llms-full.txt](/llms-full.txt) — index plus concatenated markdown - Per-page markdown: append `.md` to any docs URL - Slate: [AI & MCP](https://slate.electrik.dev/docs/ai) --- Source: https://electrik.dev/docs/ecosystem/slate-ui.md --- title: "Slate UI" description: "Electrik is built on Slate — UI docs live on slate.electrik.dev." sidebar_order: 1 sidebar_section: "Ecosystem" --- # Slate UI [Electrik Slate](https://slate.electrik.dev) is the Blade UI kit Electrik ships on: anonymous components, Tailwind v4 tokens, Alpine where needed. - Docs: [https://slate.electrik.dev](https://slate.electrik.dev) - Package: `electrik/slate` This site does **not** re-host Slate component docs. Link out for components, tokens, blocks, and examples. --- Source: https://electrik.dev/docs/ecosystem/teamwork.md --- title: "Teamwork" description: "Electrik's teams engine is a Teamwork fork." sidebar_order: 2 sidebar_section: "Ecosystem" --- # Teamwork Teams are powered by `electrik/teamwork`, Electrik's maintained fork of the Teamwork package (Laravel-ready). You normally consume it **through Electrik** — treat it as the teams engine under the hood, not a separate product to market beside Electrik and Slate. --- Source: https://electrik.dev/docs/getting-started/ai.md --- title: "AI & agents" description: "Use Cursor, Claude, and other coding agents with Electrik — llms.txt, skills, and package-safe rules." sidebar_order: 45 sidebar_section: "Getting Started" --- # AI & agents Electrik rides the **AI-first starter** trend the Laravel way: a Composer package agents can extend without treating your app as a disposable scaffold dump. We are **not** a prompt-to-app builder (Lovable / Bolt). We are the shell you keep when Cursor or Claude Code writes the product on top. ## Why this model fits agents | Scaffold dump (Jetstream-style) | Electrik package | | --- | --- | | Auth/teams/billing copied into `App\` | Stays under `Electrik\` | | Agent edits vendor-ish files you now own forever | Agent extends via config, your `App\`, published views when needed | | Upstream upgrades = merge pain | `composer update` on the major line | Point agents at the docs index before they invent routes or dump Jetstream patterns. ## AGENTS.md The package ships [`AGENTS.md`](https://github.com/electrikhq/electrik/blob/main/AGENTS.md) at the repo root (also under `vendor/electrik/electrik/AGENTS.md` after install). Coding agents should read it first: install sequence, package-vs-`App\` boundary, Stripe-on-the-team rule, and what not to invent. Slate has its own [`AGENTS.md`](https://github.com/electrikhq/slate/blob/main/AGENTS.md) for Blade UI. ## llms.txt - [/llms.txt](/llms.txt) — curated index - [/llms-full.txt](/llms-full.txt) — index + concatenated markdown - Per-page markdown: append `.md` (example: [/docs/getting-started/introduction.md](/docs/getting-started/introduction.md)) Prefer specific `.md` URLs over the full dump. ## Cursor skill Copy **electrik-install** from the Electrik repo (`.cursor/skills/electrik-install`) into your app’s `.cursor/skills/` so agents load install + Slate guidance when relevant. Slate UI has its own agent surface: [slate.electrik.dev/docs/ai](https://slate.electrik.dev/docs/ai) (`llms.txt`, MCP, Cursor rule). ## Prompt starter ```text Install and customize Electrik 5.x as a Composer package (not a scaffold dump). Read AGENTS.md in the Electrik package and https://electrik.dev/llms.txt first, then installation + architecture docs. Keep auth/teams/billing in the Electrik namespace; put product code in App\. UI: Electrik Slate anonymous components — see https://slate.electrik.dev/llms.txt (MCP: https://mcp.slate.electrik.dev) ``` ## What we are not shipping (on purpose) - Built-in LLM provider swap / AI chat product features (build those in `App\` if your SaaS needs them) - Prompt-to-app generation of the whole product - Competing with Next.js indie kits on their stack ## Related - [Introduction](/docs/getting-started/introduction) - [Installation](/docs/getting-started/installation) - [Architecture](/docs/getting-started/architecture) - [Slate AI & MCP](https://slate.electrik.dev/docs/ai) - [Pricing](/pricing) --- Source: https://electrik.dev/docs/getting-started/architecture.md --- title: "Architecture" description: "Package vs App, teams as tenant, middleware, and Slate shell." sidebar_order: 5 sidebar_section: "Getting Started" --- # Architecture ## Package vs application Electrik code lives under `vendor/electrik/electrik` in the `Electrik\` namespace. Your product code stays in `App\`. Prefer config and composition over forking package classes. ## Teams as tenant Billing, seats, and many permissions are scoped to the **current team**, not only the user. Cashier billable is the team. Switching teams switches workspace context. ## Request stack (mental model) Typical authenticated flow: 1. Auth middleware 2. Email verification (if enabled) 3. Team selected (`EnsureTeamSelected` and related) 4. Onboarding incomplete → `/onboarding` (unless exempt) 5. Optional subscription requirement → billing Exempt onboarding routes are listed in `config/electrik.php` under `onboarding.exempt_routes` (billing, invitations, verification, logout). ## UI shell Screens use Slate anonymous components (``) and Slate design tokens. Customize carefully; deep UI reference stays on [slate.electrik.dev](https://slate.electrik.dev). ## Related packages - `electrik/slate` — UI kit - `electrik/teamwork` — Electrik fork of Teamwork (teams engine) - `spatie/laravel-permission` — roles/permissions with teams - `laravel/cashier` — Stripe subscriptions --- Source: https://electrik.dev/docs/getting-started/demo-seed.md --- title: "Demo & seed-demo" description: "Seed demo personas and the sample Studio micro-SaaS (clients, projects, tasks)." sidebar_order: 4 sidebar_section: "Getting Started" --- # Demo & seed-demo ```bash php artisan electrik:seed-demo ``` Creates demo accounts, teams, and a sample **Studio** micro-app so you can click through a real product shape on top of Electrik’s shell (auth, teams, billing, ops). | Email | Password | Role | Teams | | --- | --- | --- | --- | | `demo@electrik.dev` | `password` | owner | Demo Team, Acme Team | | `admin@electrik.dev` | `password` | admin | Demo Team | | `member@electrik.dev` | `password` | member | Demo Team | ## Sample Studio After seed, open: | Path | What | | --- | --- | | `/dashboard` | Studio overview: clients, open/overdue tasks, my work | | `/clients` | Accounts you deliver for | | `/projects` | Delivery containers linked to clients | | `/projects/{id}` | Tasks with assignee, priority, status | Studio is **demo meat**: a replaceable Clients → Projects → Tasks product. Keep it, fork it, or turn it off with `ELECTRIK_SAMPLE_PROJECTS=false`. Build your own with `electrik:make:resource`. Use `--force` to reset passwords if the users already exist. After `electrik:install` (and migrations). For Stripe-backed billing UI, still set test keys and run `electrik:stripe:sync`. Public hosted demo: [demo.electrik.dev](https://demo.electrik.dev) with the same personas. --- Source: https://electrik.dev/docs/getting-started/installation.md --- title: "Installation" description: "What electrik:install does, flags, and post-install checklist." sidebar_order: 3 sidebar_section: "Getting Started" --- # Installation ## Composer ```bash composer require electrik/electrik:^5.4 ``` ## Artisan install ```bash php artisan electrik:install # or php artisan electrik:install --migrate --force ``` | Flag | Effect | |---|---| | `--force` | Overwrite published `config/electrik.php` if it exists | | `--migrate` | Run migrations, then `electrik:permissions:sync --teams` | ### What install configures - Publishes `config/electrik.php` - Wires Slate CSS import / `@source` in `resources/css/app.css` when possible - Ensures Teamwork, Spatie permission teams mode, User model traits - Sanctum, Cashier, session driver checks - Stripe env placeholders and webhook tip - Suggests `storage:link` for avatars ## After install 1. Copy Stripe keys into `.env` (`STRIPE_KEY`, `STRIPE_SECRET`, `STRIPE_WEBHOOK_SECRET`) 2. Set `ELECTRIK_OPERATOR_EMAILS` if you want `/ops` 3. Optional Socialite: `ELECTRIK_SOCIALITE_PROVIDERS=google,github` (+ `config/services.php`) 4. `php artisan electrik:stripe:sync` — pull products/prices into Electrik tables 5. `php artisan storage:link` 6. Point Cashier webhook at your app (or use Stripe CLI locally) 7. Optional: `php artisan electrik:seed-demo` Screenshots of the shell after install: ![Dashboard](/images/docs/docs-dashboard.png) ![Billing](/images/docs/docs-billing.png) ## Disable features via env | Env | Default | Purpose | |---|---|---| | `ELECTRIK_REGISTRATION` | `true` | Allow public registration | | `ELECTRIK_EMAIL_VERIFICATION` | `true` | Require verified email | | `ELECTRIK_ONBOARDING` | `true` | Force onboarding wizard | | `ELECTRIK_REQUIRE_SUBSCRIPTION` | `false` | Gate app behind active subscription | | `ELECTRIK_HOME` | `/dashboard` | Post-login home | | `ELECTRIK_MAGIC_LINK` | `true` | Email magic-link sign-in | | `ELECTRIK_LOGIN_ALERTS` | `true` | New-IP login notifications | | `ELECTRIK_OPERATOR_EMAILS` | _(empty)_ | Comma list for `/ops` | Full map: [Configuration](/docs/core-concepts/configuration). ## Optional: Slate Blocks Curated marketing/app sections (``): ```bash composer require electrik/slate-blocks:^0.1 ``` Add a Tailwind `@source` for `vendor/electrik/slate-blocks/resources/views/**/*.blade.php`. Gallery: [slate.electrik.dev/blocks](https://slate.electrik.dev/blocks). ## Agents (Cursor) If you use Cursor, copy the **electrik-install** skill from the Electrik repo (`.cursor/skills/electrik-install`) into your project so agents install Composer packages and Blade components instead of inventing React/shadcn. --- Source: https://electrik.dev/docs/getting-started/introduction.md --- title: "Introduction" description: "What Electrik 5.x is and how it fits a Laravel SaaS." sidebar_order: 1 sidebar_section: "Getting Started" --- # Introduction Electrik is a **Laravel SaaS starter kit** shipped as a Composer package: authentication, teams, Stripe billing, onboarding, and account settings — under the `Electrik\` namespace, not copied into `App\`. > Current package line: **5.4.0** on Laravel 12/13, Livewire 4, and [Electrik Slate](https://slate.electrik.dev) 3. **Already on Slate?** Electrik is the SaaS shell around the same UI kit — auth, teams, Stripe on the team. [Install](/install) or try the [demo](https://demo.electrik.dev) (`demo@electrik.dev` / `password`). ![Dashboard](/images/docs/docs-dashboard.png) ## What you get - **Auth** — login, register, verification, password reset, 2FA, passkeys, sessions, magic link, Socialite (Google / GitHub / Apple / Microsoft) - **Teams** — create/switch, invites, roles, Spatie permissions, activity log, branding, archive, outbound webhooks, IP allowlist - **Billing** — Laravel Cashier on the **team**, plans, add-ons, metered usage, invoices, tax IDs, payment methods, Stripe webhooks - **Shell** — Studio dashboard (stats + activity), onboarding, sample Clients → Projects → Tasks, profile (locale + timezone), API tokens, notifications - **Ops** — `/ops` operator console (allowlisted emails): users, teams, metrics, plan features, announcements, email preview - **UI** — anonymous `` components and Slate tokens - **i18n** — `en`, `es`, `fr`, `ar` (RTL), `hi` ## Package model Unlike Jetstream-style scaffolds that dump code into your app, Electrik stays vendor-owned. You require the package, run `php artisan electrik:install`, and customize via config, published views when needed, and your own `App\` code. That same model is why Electrik works with **Cursor / Claude / coding agents**: the shell stays a package; agents write product code in `App\` instead of forking dumped auth. See [AI & agents](/docs/getting-started/ai) and [/llms.txt](/llms.txt). ## Not included (on purpose) - Multi-database tenancy - Subdomain / custom-domain mapping (separate product line) - Paddle or multi-processor billing — **Stripe only** - Built-in “AI SaaS” product features (LLM chat, token meters) — add in `App\` if you need them ## License Business Source License is retired for current Electrik. **5.5.0+ is MIT** — personal or commercial use without a kit license. Prefer `composer require electrik/electrik:^5.5`. Older tags may still be BSL. Paid path: [Electrik Launch](/launch). ## Next steps 1. [Quickstart](/docs/getting-started/quickstart) or the marketing [Install](/install) page 2. [Architecture](/docs/getting-started/architecture) for the teams-as-tenant mental model 3. [Configuration](/docs/core-concepts/configuration) for `config/electrik.php` and env knobs 4. [Changelog](/docs/reference/changelog) and [Roadmap](/docs/reference/roadmap) --- Source: https://electrik.dev/docs/getting-started/quickstart.md --- title: "Quickstart" description: "Fastest path from a fresh Laravel app to a running Electrik install." sidebar_order: 2 sidebar_section: "Getting Started" --- # Quickstart Short path for a fresh Laravel 12/13 app. For a longer walkthrough see [Installation](/docs/getting-started/installation) or the marketing [Install](/install) page. ![Login](/images/docs/docs-login.png) ## Requirements - PHP 8.3+ - Laravel 12+ or 13+ - Livewire 4, Tailwind CSS v4 - Stripe test keys (for billing) ## Install ```bash composer require electrik/electrik:^5.4 php artisan electrik:install --migrate ``` Then set Stripe keys in `.env` and sync products: ```bash php artisan electrik:stripe:sync php artisan storage:link ``` Optional demo data: ```bash php artisan electrik:seed-demo ``` For the operator console, set: ```env ELECTRIK_OPERATOR_EMAILS=demo@electrik.dev ``` ## Smoke-check routes | Area | Paths | |---|---| | Auth | `/login`, `/register`, `/forgot-password` | | App | `/dashboard`, `/onboarding` | | Teams | `/teams`, settings, members, activity, webhooks | | Billing | `/billing`, plans, address, usage | | Settings | profile, security, sessions, API tokens | | Ops | `/ops` (operator emails only) | ![Dashboard](/images/docs/docs-dashboard.png) ## Local sandbox From the Electrik lab monorepo: ```bash ./scripts/reset-electrik-sandbox.sh cd electrik-sandbox composer dev ``` See [Local sandbox](/docs/guides/local-sandbox). ## UI Electrik uses Slate. Component docs: [slate.electrik.dev](https://slate.electrik.dev). --- Source: https://electrik.dev/docs/guides/ai-mcp.md --- Source: https://electrik.dev/docs/guides/api-tokens.md --- title: "API tokens" description: "Personal vs team-scoped Sanctum tokens, abilities, and Electrik API routes." sidebar_order: 6 sidebar_section: "Guides" --- # API tokens Electrik uses [Laravel Sanctum](https://laravel.com/docs/sanctum) personal access tokens. Users create and revoke tokens from **Settings → API tokens**. ## Personal vs team tokens A token is either: - **Personal** — scoped to the user only, no `team_id`. - **Team** — carries a `team_id`. Requests run through `electrik.token-team`, which switches current team + Spatie context before your route runs. Creating a team token requires `tokens.manage` (or ownership). Tokens support expiry presets (`never|7|30|90|365`) and show `last_used_at` when present. ## Abilities Abilities come from `config('electrik.api_tokens.abilities')`. Guard routes with: ```php Route::get('/reports', ReportsController::class) ->middleware('electrik.ability:read,*'); ``` A token with `*` always passes. Session/web auth (no token) also passes, so the same route works for browser and API clients. ## Built-in API routes Registered under `api` + prefix `api`: | Method | Path | Ability | | --- | --- | --- | | `GET` | `/api/electrik/me` | `read` or `*` | | `GET` | `/api/electrik/team` | `read` or `*` | | `GET` | `/api/electrik/members` | `read` or `*` | | `POST` | `/api/electrik/usage` | `write`, `billing:write`, or `*` | ### `/me` Returns id, email, name, token meta (abilities, last_used_at, expires_at), and current team. ```bash curl -H "Authorization: Bearer " https://your-app.test/api/electrik/me ``` ### `/usage` Reports metered Stripe usage for the current team: ```bash curl -X POST https://your-app.test/api/electrik/usage \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"stripe_price_id":"price_xxx","quantity":5}' ``` ## Throttling Electrik ensures `throttle:api` on the `api` group and registers a default 60/min limiter named `api` if the host app never defined one. ## OpenAPI (optional) ```bash composer require dedoc/scramble ``` Suggested in Electrik’s `composer.json`; not required. --- Source: https://electrik.dev/docs/guides/billing-providers.md --- title: "Billing providers" description: "Stripe Cashier is the supported billing processor." sidebar_order: 8 sidebar_section: "Guides" --- # Billing providers Electrik bills on the **Team** model via **Stripe** and `laravel/cashier`. ```env ELECTRIK_BILLING_DRIVER=stripe ``` Only `stripe` is supported. Other values throw at runtime. ```php use Electrik\Support\Billing\Billing; $driver = Billing::driver(); // StripeBillingDriver ``` Paddle is not supported. Stripe remains the only commercial path. ## Related - [Billing](/docs/core-concepts/billing) - [Stripe test mode](/docs/guides/stripe-test-mode) --- Source: https://electrik.dev/docs/guides/feature-gating.md --- title: "Feature gating" description: "Use plan_features to limit seats and capabilities." sidebar_order: 3 sidebar_section: "Guides" --- # Feature gating Define defaults and per-price overrides in `billing.plan_features` ([Plan features & seats](/docs/core-concepts/plan-features-seats)). Operators can also edit per-plan JSON + add-on/metered flags at `/ops/plans`. Example: ```php 'by_price_id' => [ 'price_pro_monthly' => [ 'custom_roles' => true, 'max_members' => 50, ], ], ``` ## Helpers ```php use Electrik\Support\PlanFeatures; PlanFeatures::has($team, 'custom_roles'); PlanFeatures::limit($team, 'max_members'); PlanFeatures::canAddMember($team); ``` ## Middleware ```php Route::middleware('electrik.plan:custom_roles')->group(function () { // … }); ``` Electrik's custom roles create screen already uses this gate. Keep feature keys boring and stable — treat them as part of your product API. --- Source: https://electrik.dev/docs/guides/generators.md --- title: "Generators" description: "Scaffold Livewire, models, and resources with electrik:make." sidebar_order: 5 sidebar_section: "Guides" --- # Generators Electrik stays in `vendor`. Product code still lives in your app. Use `electrik:make:*` to scaffold Livewire + Slate views, models, and policies without dumping the whole SaaS shell. ## Livewire ```bash php artisan electrik:make:livewire Posts/Index ``` Creates: - `app/Livewire/Posts/Index.php` (uses `electrik::components.layouts.app`) - `resources/views/livewire/posts/index.blade.php` (Slate card scaffold) ## Model ```bash php artisan electrik:make:model Post --team ``` Creates a model with `team_id` + `team()` relation and a migration. Omit `--team` for a plain model. Pass `--no-migration` to skip the migration file. ## Resource (convenience) ```bash php artisan electrik:make:resource Post --team ``` Runs model + migration, Livewire `Post/Index` and `Post/Show`, and `app/Policies/PostPolicy.php` with permissive stubs you should tighten. The package also ships **Studio**, a sample Clients → Projects → Tasks micro-app (see [Demo & seed-demo](/docs/getting-started/demo-seed)) so demos feel like a product. Turn it off with `ELECTRIK_SAMPLE_PROJECTS=false` once you have your own models. ## Notes - Generated files go in the **host app**, not under `Electrik\`. - Use `--force` to overwrite. - Register routes and Livewire components as you normally would in Laravel. - Full command list: [Artisan commands](/docs/reference/artisan-commands). --- Source: https://electrik.dev/docs/guides/i18n.md --- title: "Internationalization" description: "Locales en/es/fr/ar/hi, Profile language, and RTL." sidebar_order: 10 sidebar_section: "Guides" --- # Internationalization Electrik ships JSON translations for: | Locale | Notes | | --- | --- | | `en` | Default | | `es` | Spanish | | `fr` | French | | `ar` | Arabic — `dir="rtl"` on layouts | | `hi` | Hindi | ## Resolution 1. Authenticated user Profile locale (if set and allowed) 2. Else `APP_LOCALE` Guests always use `APP_LOCALE` (no cookie locale picker). There is **no** team default locale. ## Config ```php 'locales' => ['en', 'es', 'fr', 'ar', 'hi'], ``` Middleware `electrik.locale` (`SetLocale`) is pushed onto the `web` group. ## RTL Arabic sets document `dir="rtl"`. Prefer logical Tailwind classes (`text-start`, `border-e`, `ps-*`) in custom views so layouts stay mirrored. --- Source: https://electrik.dev/docs/guides/local-sandbox.md --- title: "Local sandbox" description: "Reset and run the Electrik sandbox app from the lab monorepo." sidebar_order: 1 sidebar_section: "Guides" --- # Local sandbox From the Electrik lab workspace root: ```bash ./scripts/reset-electrik-sandbox.sh cd electrik-sandbox php artisan serve ``` The script wipes `electrik-sandbox/`, creates a fresh Laravel app, path-links local `electrik` + `slate`, runs `electrik:install`, and builds assets. Useful smoke paths: `/login`, `/register`, `/billing` (with Stripe test keys + `electrik:stripe:sync`). --- Source: https://electrik.dev/docs/guides/operators-ops.md --- title: "Operator console" description: "ELECTRIK_OPERATOR_EMAILS and the /ops Slate console." sidebar_order: 7 sidebar_section: "Guides" --- # Operator console Electrik ships a platform ops UI at `/ops` for allowlisted emails — not Filament. ![Operations](/images/docs/docs-ops.png) ## Access ```env ELECTRIK_OPERATOR_EMAILS=you@example.com,ops@example.com ``` Middleware: `electrik.operator` (`EnsureOperator`). Non-operators get 403. ## Screens | Path | Purpose | | --- | --- | | `/ops` | Metrics: users, teams, past due, failed jobs, signups 7d/30d, active subs, est. MRR stub | | `/ops/users` | Search, suspend, impersonate | | `/ops/teams` | Team list | | `/ops/webhooks` | Inbound Stripe webhook event log | | `/ops/plans` | Edit plan features JSON, add-on / metered flags | | `/ops/failed-jobs` | Failed queue jobs | | `/ops/announcements` | CRUD + publish fan-out | | `/ops/mail-preview` | Preview package notification emails | ![Email preview](/images/docs/docs-mail-preview.png) ## Est. MRR Ops MRR is a **local catalog stub** (plan prices × active subscription items). It is not Stripe Reporting. Cashier uses the `type` column for subscription name filtering. ## Impersonation Ops (and team members UI) can impersonate via `lab404/laravel-impersonate`. A banner + leave route stop impersonation; activity is logged. --- Source: https://electrik.dev/docs/guides/outbound-webhooks.md --- title: "Outbound webhooks" description: "Team HTTPS endpoints Electrik calls on workspace events." sidebar_order: 9 sidebar_section: "Guides" --- # Outbound webhooks Teams can register HTTPS endpoints under **Teams → Webhooks**. When events fire, Electrik queues a signed POST. ## Payload ```json { "event": "team.archived", "team_id": 1, "payload": { "team_id": 1, "name": "Demo Team" }, "sent_at": "2026-08-29T09:30:00+00:00" } ``` Headers: - `Content-Type: application/json` - `X-Electrik-Event: team.archived` - `X-Electrik-Signature: ` Verify with HMAC-SHA256 of the raw body using the secret shown once at create time. ## Events Use `*` (default) or a comma-separated list. Built-in dispatches include: - `team.archived` - `team.restored` - `team.deleted` Extend by calling `Electrik\Support\TeamWebhookDispatcher::dispatch($team, $event, $payload)`. ## Deliveries Each attempt stores status code / success flag on `team_webhook_deliveries`. Failure count increments on the endpoint; successful delivery resets it. ## Inbound Stripe webhooks Separate from team outbound webhooks. Stripe → Cashier events are logged for ops at `/ops/webhooks` (`stripe_webhook_events`). --- Source: https://electrik.dev/docs/guides/privacy-gdpr.md --- Source: https://electrik.dev/docs/guides/social-login.md --- title: "Social login & magic link" description: "Google, GitHub, Apple, Microsoft Socialite and magic-link email sign-in." sidebar_order: 8 sidebar_section: "Guides" --- # Social login & magic link ## Magic link Enabled by default (`ELECTRIK_MAGIC_LINK=true`). Login page offers “Email me a link”; tokens expire after `ELECTRIK_MAGIC_LINK_EXPIRE` minutes (default 15). ## Socialite providers ```env ELECTRIK_SOCIALITE_PROVIDERS=google,github # optional: # ELECTRIK_SOCIALITE_PROVIDERS=google,github,apple,microsoft ``` Configure each provider’s client id/secret in `config/services.php` as usual for Laravel Socialite. ### Google & GitHub Built into `laravel/socialite` — no extra packages. ### Apple & Microsoft Optional packages (suggested in Electrik’s `composer.json`): ```bash composer require socialiteproviders/apple socialiteproviders/microsoft ``` Electrik registers `SocialiteWasCalled` extenders when those classes exist. Without the packages, enabling `apple` / `microsoft` in env returns 503 with a clear message. ## User columns Install migrations add `provider` / `provider_id` on users when present. Existing email accounts link on first social login if columns are empty. ## Registration off If `ELECTRIK_REGISTRATION=false`, social login only works for existing users (same as password login for unknown emails). --- Source: https://electrik.dev/docs/guides/stripe-test-mode.md --- title: "Stripe test mode" description: "Develop billing against Stripe test keys and the Stripe CLI." sidebar_order: 2 sidebar_section: "Guides" --- # Stripe test mode 1. Create a Stripe test-mode account / use test keys 2. Put `STRIPE_KEY`, `STRIPE_SECRET`, and `STRIPE_WEBHOOK_SECRET` in `.env` 3. Create products and recurring prices in the Stripe Dashboard (test mode) 4. Sync: ```bash php artisan electrik:stripe:sync ``` 5. Forward webhooks locally: ```bash stripe listen --forward-to localhost:8000/stripe/webhook ``` (Use the Cashier webhook path your app exposes.) Never use live keys in local sandboxes. Map price ids to plan features in `config/electrik.php`. --- Source: https://electrik.dev/docs/guides/upgrading.md --- title: "Upgrading" description: "How to upgrade Electrik 5.x and migrate from older lines." sidebar_order: 4 sidebar_section: "Guides" --- # Upgrading Electrik `5.4.0` is the current stable on the 5.x line. ## Checklist (5.x → newer 5.x) 1. Read the package [CHANGELOG](https://github.com/electrikhq/electrik/blob/5.x/CHANGELOG.md) 2. `composer update electrik/electrik electrik/slate` 3. Re-run migrations if new ones shipped (`php artisan migrate`) 4. `php artisan electrik:permissions:sync` if the catalog changed 5. `php artisan electrik:stripe:sync` if billing models changed 6. Diff `config/electrik.php` against the published stub (`electrik:install --force` only if you understand the overwrite) Prefer a caret range (`^5.4`) or an exact pin in production. ## 5.3 → 5.4 Notable new migrations: - `archived_at` / `allowed_ips` on teams - `session_labels` - `team_webhooks` + `team_webhook_deliveries` - `is_addon` / `metered` on `stripe_plans` New config knobs: `auth.login_alerts`, Socialite may include `apple,microsoft`, ops routes for plans + mail preview. Cashier subscription type column is `type` (not legacy `name`). Ops metrics already handle both. ## 5.0.0-alpha.* → 5.x ```bash composer require electrik/electrik:^5.4 electrik/slate:^3.0 php artisan migrate php artisan electrik:permissions:sync --teams php artisan electrik:stripe:sync ``` ## 4.x → 5.x 5.x is a new stack (Laravel 12+, Slate 3, Livewire 4, package-first). Treat migration as a **re-install** onto a fresh app rather than an in-place upgrade from Electrik 4. --- Source: https://electrik.dev/docs/license/bsl.md --- title: "MIT license" description: "Electrik 5.5+ is MIT. Notes on older BSL tags." sidebar_order: 1 sidebar_section: "License" --- # MIT license Electrik **5.5.0+** (current `5.x` default) is licensed under the **MIT License**. Use it for personal or commercial projects without a paid kit license. Prefer: ```bash composer require electrik/electrik:^5.5 ``` ## Older BSL releases Published tags that shipped under Business Source License 1.1 (for example `v5.0.0`) remain BSL for those specific releases. Upgrade to 5.5+ for MIT. ## Paid path Money path is [Electrik Launch](/launch) — fixed-price delivery — not kit licenses. Solo/Studio commercial licenses are retired. Marketing summary: [/license](/license). Full text: package `LICENSE` on GitHub. --- Source: https://electrik.dev/docs/license/commercial.md --- title: "Commercial / Launch" description: "Kit licenses retired. Electrik Launch is paid delivery on the MIT kit." sidebar_order: 2 sidebar_section: "License" --- # Commercial / Launch Solo and Studio **kit licenses are retired**. Electrik 5.5+ is MIT — no commercial permission purchase required to ship a product on the kit. ## Electrik Launch If you want us to build and hand off a multi-tenant Laravel SaaS shell in 14 days, see [Electrik Launch](/launch) ($6,900). That is paid **delivery**, not a license unlock. ## Prior purchases If you previously bought a Solo/Studio commercial license, email [hello@electrik.dev](mailto:hello@electrik.dev) — we will honor it. Marketing: [/pricing](/pricing) · [/license](/license). --- Source: https://electrik.dev/docs/reference/artisan-commands.md --- title: "Artisan commands" description: "Electrik console commands reference." sidebar_order: 1 sidebar_section: "Reference" --- # Artisan commands | Command | Purpose | |---|---| | `electrik:install` | Publish config and wire dependencies (`--force`, `--migrate`) | | `electrik:seed-demo` | Seed demo user/team data | | `electrik:make:livewire {Name}` | Livewire class + Slate Blade view (`--force`) | | `electrik:make:model {Name}` | Model + migration (`--team`, `--no-migration`, `--force`) | | `electrik:make:resource {Name}` | Model, migration, Livewire Index/Show, policy stub (`--team`, `--force`) | | `electrik:permissions:sync` | Sync Spatie permissions/roles from catalog | | `electrik:stripe:sync` | Sync Stripe products/prices into Electrik tables | | `electrik:stripe:sync-subscriptions` | Sync Cashier subscriptions (`--team=`) | | `electrik:onboarding:skip-existing` | Mark existing users as onboarded | | `electrik:onboarding:reset` | Reset onboarding state for testing | Also remember Laravel/Cashier standards: `migrate`, `storage:link`, queue workers for webhooks if you dispatch jobs. See [Generators](/docs/guides/generators) for `electrik:make:*` examples. --- Source: https://electrik.dev/docs/reference/changelog.md --- title: "Changelog" description: "Electrik release notes and where to find full history." sidebar_order: 4 sidebar_section: "Reference" --- # Changelog Electrik **5.4.0** is the current stable release. Install with: ```bash composer require electrik/electrik:^5.4 ``` ## 5.4.0 (2026-08-29) - Team brand color picker + live CSS var apply; contrast-aware primary foreground. - Team archive/restore; optional login IP allowlist (`electrik.team-ip`). - Session device rename; new-login email/database alerts (`ELECTRIK_LOGIN_ALERTS`). - Apple / Microsoft Socialite (optional `socialiteproviders/*` packages). - Stripe tax IDs; metered usage UI + `POST /api/electrik/usage`; plan add-ons (`is_addon` / `metered`). - Outbound team webhooks (signed POST + deliveries). - Ops: signup/MRR stubs, plan-features editor, email preview. - API: `GET /api/electrik/team`, `GET /api/electrik/members`; token expiry / last_used on `/me`. - Paddle remains unsupported; docs treat Stripe as the only billing path. ## 5.3.0 (2026-08-29) - Sanctum ability catalog; `tokens.manage`; `electrik.ability` middleware. - Auth-log filters/pagination; Checkout promotion codes; past_due dunning; Stripe webhook event log. - Socialite Google/GitHub + magic link; operator `/ops`; announcements; team branding; `GET /api/electrik/me`. ## 5.2.0 (2026-08-27) - MCP docs server (`@electrik/electrik-mcp`). - GDPR personal data export + account deletion. - Passkeys (laravel/passkeys). - Stripe billing via `laravel/cashier` (Team); unfinished Paddle stub removed. ## 5.1.0 (2026-08-27) - Generators: `electrik:make:livewire`, `electrik:make:model`, `electrik:make:resource`. - Multi-persona demo seed; white-label branding env knobs. - Member impersonation + activity filters. ## 5.0.0 (2026-08-26) - First stable release as a Composer package on Slate 3. Full notes: [CHANGELOG.md on GitHub](https://github.com/electrikhq/electrik/blob/5.x/CHANGELOG.md). ## Also see - [Upgrading](/docs/guides/upgrading) - [Roadmap](/docs/reference/roadmap) - Packagist: [electrik/electrik](https://packagist.org/packages/electrik/electrik) --- Source: https://electrik.dev/docs/reference/permissions-catalog.md --- title: "Permissions catalog" description: "Default permission keys shipped in config/electrik.php." sidebar_order: 3 sidebar_section: "Reference" --- # Permissions catalog Defaults from `config/electrik.php`: | Key | Display name | Category | |---|---|---| | `teams.view` | View teams | Teams | | `teams.manage` | Manage team settings | Teams | | `teams.invite` | Invite members | Teams | | `teams.members` | Manage members | Teams | | `billing.view` | View billing | Billing | | `billing.manage` | Manage billing | Billing | | `access.roles` | Manage roles | Access | | `users.impersonate` | Impersonate members | Access | ### Role map - `owner` → `*` - `admin` → all catalog keys above (including `users.impersonate`) - `member` → `teams.view`, `billing.view` Extend the catalog in config, then run `electrik:permissions:sync`. --- Source: https://electrik.dev/docs/reference/roadmap.md --- title: "Roadmap" description: "What Electrik is building next, and what we are not chasing." sidebar_order: 5 sidebar_section: "Reference" --- # Roadmap Electrik **5.4.0** ships operators metrics, outbound webhooks, metered usage, add-ons, tax IDs, Apple/Microsoft Socialite hooks, and richer team settings. This page lists what is next. Dates are directional, not promises. ## Shipped recently - **5.4** — branding picker, archive/IP allowlist, session rename, login alerts, usage/add-ons/tax IDs, outbound webhooks, ops plans + mail preview, API expansion - **5.3** — Sanctum abilities, Socialite Google/GitHub, magic link, `/ops`, announcements, team branding, `/api/electrik/me` - **5.2** — MCP docs, GDPR export/delete, passkeys, Stripe-only billing - **5.1** — generators, seed-demo, impersonation, branding env knobs ## Next 1. **Hosted demo tenants** (follow-up) - Short-lived or picker-based tenants on demo.electrik.dev without requiring visitor Stripe keys. Design note: `demo.electrik.dev/HOSTED_TENANTS.md`. 2. **Install Loom** (optional marketing) - Founder-recorded walkthrough when ready. ## Explicit non-goals (for now) - Becoming a Filament admin competitor or a hosted "Electrik Cloud" SaaS. - Paddle or multi-processor billing — Stripe (`laravel/cashier`) only. - Multi-database tenancy and subdomain / custom-domain mapping (separate product line if demand appears). ## How we ship Package changes land on the `5.x` branch with [CHANGELOG](/docs/reference/changelog) entries and GitHub Releases. Marketing and docs stay on electrik.dev. Questions or priorities: [hello@electrik.dev](mailto:hello@electrik.dev). --- Source: https://electrik.dev/docs/reference/routes-middleware.md --- title: "Routes & middleware" description: "Route groups and middleware aliases Electrik registers." sidebar_order: 2 sidebar_section: "Reference" --- # Routes & middleware Electrik registers route files for auth, app shell, teams, billing, settings, ops, and API. ## Common paths | Area | Examples | |---|---| | Auth | `/login`, `/register`, magic link, Socialite callbacks | | App | `/dashboard`, `/onboarding`, `/clients`, `/projects` (sample Studio), `/pricing` | | Teams | `/teams`, `/teams/{team}/settings`, members, roles, activity, webhooks | | Billing | `/billing`, plans, subscription, address, invoices, **usage** | | Settings | profile, security, sessions, API tokens | | API | `/api/electrik/me`, `/team`, `/members`, `POST /usage` | | Ops | `/ops`, users, teams, webhooks, plans, failed jobs, announcements, mail-preview | Exact paths can evolve between minors. Use `php artisan route:list` after install. ## Middleware aliases | Alias | Role | |---|---| | `electrik.locale` | Set locale from user / `APP_LOCALE` | | `electrik.plan` | Require plan feature (`electrik.plan:custom_roles`) | | `electrik.token-team` | Bind team from Sanctum token | | `electrik.ability` | Require Sanctum ability | | `electrik.operator` | Restrict to `ELECTRIK_OPERATOR_EMAILS` | | `electrik.team-ip` | Enforce team IP allowlist | Also used on route groups: team selected, onboarding complete, subscription active (when required). Customize by toggling config/env first; add product middleware in `App\`.