Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/rules/layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ path: "lib/src/ui/layouts/**/*.dart"
- Route transitions: guest routes use `RouteTransition.none` — no animation between auth screens
- Notification polling: `MagicStarterAppLayout` starts polling on mount when notifications feature is enabled — stop in `deactivate()` or `dispose()`
- Header builder: when `MagicStarter.manager.headerBuilder` is set, renders custom header instead of default — receives `(BuildContext context, bool isDesktop)`
- Sidebar footer builder: `MagicStarter.manager.sidebarFooterBuilder` — renders custom widget at bottom of sidebar (desktop) and drawer (mobile); receives `BuildContext`
- Logout: checks `MagicStarter.manager.onLogout` callback first — falls back to `MagicStarterAuthController.instance.logout()`
- Wind UI exclusively — no Material widgets in layout code; `Icons.*` only for icon data
7 changes: 5 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Magic Starter Plugin

<!-- Generated by Kodizm AI · Last updated: 2026-04-09 -->

Flutter starter kit for the Magic Framework. Pre-built Auth, Profile, Teams & Notifications — 13 opt-in features, every screen overridable via Wind UI.

**Version:** 0.0.1-alpha.13 · **Dart:** >=3.6.0 · **Flutter:** >=3.27.0
Expand Down Expand Up @@ -39,7 +41,7 @@ lib/
├── ui/
│ ├── layouts/ # AppLayout (authenticated), GuestLayout (auth pages)
│ ├── views/ # auth/, profile/, teams/, notifications/
│ └── widgets/ # 10 reusable Wind UI components
│ └── widgets/ # 13 reusable Wind UI components
└── cli/ # install, configure, doctor, publish, uninstall
bin/
└── magic_starter.dart # CLI entry point — registers commands with Kernel
Expand Down Expand Up @@ -105,11 +107,12 @@ Every feature, fix, or refactor must go through the red-green-refactor cycle:
| `brandBuilder` + `brandClassName` both set | `brandBuilder` wins — `brandClassName` is ignored when a builder is registered |
| Modal theme not affecting dialogs | `MagicStarter.useModalTheme()` must be called before any dialog is shown — ideally in `AppServiceProvider.boot()` |
| Hardcoding dialog classNames | All modal classNames must come from `MagicStarter.manager.modalTheme` — never hardcode in widget build methods |
| `Icons.*` in `build()` | Extract as `static const _iconName = Icons.xxx` — required for Flutter web tree-shaking |

## Skills & Extensions

- `fluttersdk:magic-framework` — Magic Framework patterns: facades, service providers, IoC, Eloquent ORM, controllers, routing. Use for ANY code touching Magic APIs.
- `fluttersdk:magic-starter-widgets` — Reusable standalone widgets exported from `package:magic_starter/magic_starter.dart`: `MagicStarterCard` (with `CardVariant` enum: surface/inset/elevated), `MagicStarterPageHeader` (title, subtitle, leading, actions, titleSuffix, inlineActions), `MagicStarterConfirmDialog` (with `ConfirmDialogVariant` enum: primary/danger/warning), `MagicStarterPasswordConfirmDialog`, `MagicStarterTwoFactorModal`, `MagicStarterDialogShell` (sticky header/footer + scrollable body shell; accepts `footerBuilder: Widget Function(BuildContext dialogContext)?` so callers can `Navigator.pop(dialogContext)` safely). All accept plain callbacks — no internal controller coupling required. All modals read `MagicStarterModalTheme` tokens at build time.
- `fluttersdk:magic-starter-widgets` — Reusable standalone widgets exported from `package:magic_starter/magic_starter.dart`: `MagicStarterCard` (with `CardVariant` enum: surface/inset/elevated), `MagicStarterPageHeader` (title, subtitle, leading, actions, titleSuffix, inlineActions), `MagicStarterConfirmDialog` (with `ConfirmDialogVariant` enum: primary/danger/warning), `MagicStarterPasswordConfirmDialog`, `MagicStarterTwoFactorModal`, `MagicStarterDialogShell` (sticky header/footer + scrollable body shell; accepts `footerBuilder: Widget Function(BuildContext dialogContext)?` so callers can `Navigator.pop(dialogContext)` safely), `MagicStarterHideBottomNav` (wrap route group to suppress mobile bottom nav bar). All accept plain callbacks — no internal controller coupling required. All modals read `MagicStarterModalTheme` tokens at build time.

## CI

Expand Down