Flutist : Flutter Modular Architecture को मैनेज करने के लिए बनाया गया फ़्रेमवर्क! (feat. Tuist)
(flutist-1pn8eqs9s-seonwookes-projects.vercel.app)जब Flutter प्रोजेक्ट का आकार बढ़ता है, तो build performance और layer isolation के लिए modularization (पैकेज अलग करना) चुनना पड़ता है। लेकिन जैसे-जैसे modules की संख्या बढ़ती है, दर्जनों pubspec.yaml को मैनेज करने का resource cost भी बढ़ता है, और केवल code review के ज़रिए architecture rules को enforce करना मुश्किल हो जाता है.
Flutist, iOS के Tuist से प्रेरित, Dart 3.6+ के pub workspaces के ऊपर बनाया गया एक framework है, जिसे इस तरह डिज़ाइन किया गया है कि प्रोजेक्ट की specification और rules को code के रूप में declare और manage किया जा सके।
"Flutist क्यों?"
-
declarative project configuration
हर module केpubspec.yamlको सीधे edit करने के बजाय,package.dartमें package version औरproject.dartमें modules के बीच dependency graph declare किया जाता है। एक बार define करने पर सभी modules केpubspec.yaml,flutist generateकमांड से sync हो जाते हैं। -
architecture rules का automatic enforcement
Clean Architecture में अगर domain सीधे data को refer करे या circular dependency बन जाए, तो भी pub उसे नहीं रोकता।flutistमेंstrictModeenable करने पर ऐसा rule violate होने परgenerateके समय error दिखता है। जो principles पहले सिर्फ documentation/code review तक सीमित थे, वे executable rules बन जाते हैं। -
type safety और productivity
string-based package references की जगह, auto-generated accessors के ज़रिए IDE autocomplete और compile-time type checking मिलती है। साथ ही, repetitive layer structure या boilerplate generation के लिए scaffolding feature दिया गया है, जिससे initial setup cost कम होती है। -
developer experience का optimization
module-wise parallel/individual test execution के अलावा,flutist graphके ज़रिए जटिल module dependencies को browser में visual रूप से तुरंत देखा जा सकता है।
समर्थित module types के 4 प्रकार
clean— Clean Architecture 3-layer (domain / data / presentation)micro— Microfeature 5-layer (interface / implementation / testing / tests / example)lite—microसेexampleहटाया गया 4-layersimple— single package (utils, shared models, app shell के लिए)
CLI कमांड्स
flutist init/create/generate/check/pub/scaffold/test/graphflutist checkबिना file generate किए केवल architecture को inspect करता है → CI pipeline के लिएflutist graph --openसे mermaid dependency graph को सीधे browser में देखा जा सकता है
लिंक
- Docs: https://flutist-web.vercel.app/docs
- pub.dev: https://pub.dev/packages/flutist
- GitHub: https://github.com/seonwooke/flutist
अगर आप Flutter multi-module architecture पर विचार कर रहे हैं, तो flutist अपनाने की सिफारिश है। आप feedback देंगे तो मैं उसे सक्रिय रूप से शामिल करने की कोशिश करूंगा! धन्यवाद🙏
अभी कोई टिप्पणी नहीं है.