这是indexloc提供的服务,不要输入任何密码
Skip to content

Smart Feature Templates for Faster App Scaffolding #50

@ayushmehre

Description

@ayushmehre

🚀 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

  1. 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)
  2. Load a Matching Starter Template

    • Scaffold relevant screens with best practices already baked in
  3. Use or Extend mason Bricks

    • Use Mason bricks for modular, reusable code generation
    • Allow devs to extend and share bricks
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions