Initial commit of the Flutter Cursor Generator project, including the core generator tool, project brief schema, example project setup, and CI configuration. Added README documentation outlining repository structure, quick start guide, and detailed descriptions of features and architecture pillars.

This commit is contained in:
2026-05-12 22:29:55 +05:30
commit 6dfb9a8aa5
72 changed files with 4542 additions and 0 deletions
@@ -0,0 +1,40 @@
---
description: "Core Flutter conventions for {{PROJECT_NAME}} — always applied"
alwaysApply: true
---
# Flutter Core Standards — {{PROJECT_NAME}}
## Const and performance
- Use `const` constructors wherever possible — compile-time guarantee of no rebuild
- Prefer `const` widgets at the leaf level: `const SizedBox.shrink()`, `const Padding(...)`
- Never use `const` with mutable values; lint: `prefer_const_constructors` is enabled
## Null safety
- Never use `!` (bang operator) unless you have a 100% safe runtime guarantee with a comment
- Prefer `??`, `?.`, and `if (x != null)` guards
- Use `required` for all non-nullable named parameters
- Never use `late` without a guarantee of initialisation before first access
## Widget lifecycle
- Override `dispose()` in every `StatefulWidget` that uses controllers, streams, or timers
- Cancel `StreamSubscription` in `dispose()`, not in `didUpdateWidget`
- Use `WidgetsBinding.instance.addPostFrameCallback` for post-build logic, not `Future.delayed(Duration.zero)`
## Naming conventions
- Files: `snake_case.dart`
- Classes: `PascalCase`
- Variables/functions: `camelCase`
- Constants: `kCamelCase` or `SCREAMING_SNAKE` for true compile-time constants
- Private members: `_camelCase`
## Imports
- Order: dart: → package: → relative
- Use relative imports within a feature; absolute for cross-feature
- Never import a feature's internal files from outside that feature
## Code quality
- Max function length: 40 lines. Extract widgets and helpers aggressively
- No `print()` in production code — use a logging package
- All `TODO:` comments must include a ticket number: `// TODO: PROJ-123 — fix this`
- Run `dart format` before every commit
@@ -0,0 +1,45 @@
---
description: "Project context for {{PROJECT_NAME}} — always applied"
alwaysApply: true
---
# Project Context — {{PROJECT_NAME}}
## Project identity
- **Name:** {{PROJECT_NAME}}
- **Package:** {{PACKAGE_ID}}
- **Description:** {{DESCRIPTION}}
- **Scale:** {{SCALE}}
## Technology stack
- **State management:** {{STATE_MANAGEMENT}}
- **Architecture:** {{ARCHITECTURE}}
- **Routing:** {{ROUTING}}
- **Backend:** {{BACKEND}}
- **Auth:** {{AUTH}}
- **Platforms:** {{PLATFORMS_LIST}}
- **Code generation:** {{CODEGEN_LIST}}
## Feature modules
{{FEATURES_LIST}}
## Special capabilities
{{SPECIAL_FEATURES}}
## Environments / flavors
- Flavors: {{FLAVORS_LIST}}
- CI/CD: {{CICD_TOOL}}
## Design & API references
- Design source: {{DESIGN_SOURCE}}
- API docs: {{API_DOCS_FORMAT}} at `{{API_DOCS_PATH}}`
## Architecture boundaries
{{ARCH_IMPORT_RULES}}
## When generating code for this project
1. Always use {{STATE_MANAGEMENT}} patterns — never suggest alternatives
2. Always follow {{ARCHITECTURE}} folder structure
3. Always use {{ROUTING}} for navigation — never `Navigator.push` directly
4. Always target platforms: {{PLATFORMS_LIST}}
5. If code generation tools are used ({{CODEGEN_LIST}}), follow their conventions
@@ -0,0 +1,41 @@
---
description: "UI/UX standards for {{PROJECT_NAME}} — always applied"
alwaysApply: true
---
# UI / UX Standards — {{PROJECT_NAME}}
## Loading states
- Every async operation MUST show a loading skeleton (shimmer), NOT a spinner unless < 300ms
- Use `shimmer` package with a shimmer that matches the final layout shape
- Never show a blank screen during loading — skeleton must fill the same space as the content
## Empty states
- Every list/grid MUST have a distinct empty state widget: illustration + headline + CTA
- Empty state is different from error state — never reuse the same widget for both
- Empty state copy: positive framing ("No items yet — add your first one")
## Error states
- Every async failure MUST show: error message + retry button
- Never swallow errors silently
- Error text: user-friendly, never expose stack traces or raw API messages
## Navigation & transitions
- Use `IndexedStack` for bottom nav tabs — preserves scroll position
- Named routes only — never `Navigator.push(context, MaterialPageRoute(...))`
- Page transitions: use `CustomTransitionPage` with `FadeTransition` for modal sheets
## Responsive layout
- Use `LayoutBuilder` or `MediaQuery` for breakpoints, not hardcoded pixel values
- Minimum touch target: 48×48 logical pixels (Material guideline)
- Test on 375px (iPhone SE) and 414px (iPhone Pro Max) widths minimum
## Haptics
- Use `HapticFeedback.lightImpact()` on primary CTAs
- Use `HapticFeedback.selectionClick()` on toggle/checkbox interactions
- Never add haptics to destructive actions without confirmation
## Accessibility
- All interactive widgets must have a `Semantics` label or `tooltip`
- Minimum contrast ratio: 4.5:1 (WCAG AA)
- Test with TalkBack / VoiceOver before each release