-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
🚀 Proposal: Smart Feature Templates for Faster App Scaffolding
📌 Summary
Introduce a system of smart starter templates for feature creation within the framework.
Instead of always scaffolding a generic counter app, the framework should ask basic context questions and load a relevant template (e.g., auth screen
, list + API
, tabbed home screen
, etc.).
This improves real-world dev velocity and aligns better with the framework’s promise of "fast enterprise-grade Flutter development."
💡 Problem Statement
Currently, when creating a new feature using the framework CLI/tooling:
- A default counter template is scaffolded every time.
- Developers must delete boilerplate and manually set up common flows like:
- Auth screens
- Bottom navigation + home screens
- List views fetching data from APIs
- This adds repetitive work and slows down development.
🎯 Proposed Solution
-
Interactive Prompt During Feature Creation
- Ask the dev what type of feature they're creating (
Auth
,List
,Tabbed
,Blank
, etc.) - Optionally collect inputs (like list API endpoint or field names)
- Ask the dev what type of feature they're creating (
-
Load a Matching Starter Template
- Scaffold relevant screens with best practices already baked in
-
Use or Extend
mason
Bricks- Use Mason bricks for modular, reusable code generation
- Allow devs to extend and share bricks
-
Maintain a Template Registry
- Keep a catalog of common starter templates
- Continuously grow this list as new patterns emerge
✅ Benefits
- 🔥 Faster real-world feature bootstrapping
- 🧹 No more deleting boilerplate or counter examples
- 🤝 Better alignment with enterprise use cases
- 🧱 Encourages reusable patterns and shared conventions
- ⚙️ Scales well as the framework grows
🔗 References
- Mason Bricks Docs
- Initial Template Ideas:
- Auth Flow
- List View (API + UI)
- Bottom Navigation Layout
- Blank Feature
📝 Next Steps
- Define initial template types (Auth, List, Tabbed Home, Blank)
- Add prompt flow in CLI for feature generation
- Decide between custom implementation vs Mason bricks
- Setup versioned, extensible template registry
pavanpodila
Metadata
Metadata
Assignees
Labels
No labels