GoRouter Modular은 모듈식 라우팅과 종속성 주입을 통해 GoRouter를 강화하는 Flutter 패키지로, 확장 가능한 앱 아키텍처를 가능하게 합니다. 모듈 간 이벤트 기반 통신을 지원하며 마이크로 프론트엔드 패턴을 촉진합니다. 대규모 애플리케이션을 위한 설계로, 코드 분리, 재사용성 및 독립적인 모듈 개발을 장려합니다. GoRouter와 원활하게 통합되며, 복잡한 탐색 및 모듈 컴포넌트 간 상태 관리를 위한 기능을 확장합니다.
사용 사례
대규모 플러터 애플리케이션
마이크로 프론트엔드 아키텍처
모듈러 앱 개발
독립 모듈 배포
이벤트 기반의 모듈 간 통신
확장 가능한 탐색 시스템
주요 기능
GoRouter를 사용한 모듈형 라우팅
내장된 종속성 주입
이벤트 기반 모듈 통신
마이크로 프론트엔드 지원
모듈 통합이 쉬움
크로스 플랫폼 호환성
적합한 대상
복잡한 Flutter 앱을 개발하는 개발자
모듈러 아키텍처를 사용하는 팀
재사용 가능한 UI 구성 요소가 필요한 프로젝트
여러 기능 모듈을 가진 앱
확장성을 우선시하는 엔지니어링 팀
고려 사항
GoRouter에 대한 이해 필요
초보자를 위한 학습 곡선이 더 가파릅니다
모듈 등록을 위한 추가 설정
빌드 복잡성을 증가시킬 수 있습니다
작은 앱보다는 큰 프로젝트에 적합
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
🧩 GoRouter Modular 💉
Modular architecture, dependency injection & route management on top of GoRouter.
GoRouter Modular brings a modular architecture on top of GoRouter, with per-module dependency injection and automatic dispose. Split a large app into independent, lazy-loaded feature modules — perfect for micro frontends and scalable, team-friendly codebases. 🚀
💡 Inspired by flutter_modular by Flutterando — we're grateful for their contribution to the Flutter ecosystem.
✨ Features
🧩 Modular Architecture
Independent, reusable feature modules
💉 Dependency Injection
Built-in DI with automatic dispose
🛣️ GoRouter Integration
Type-safe, declarative navigation
🎭 Event System
Decoupled, event-driven communication between modules
🚀 Lazy Loading
Modules load on demand with efficient memory management
context.goNamed('profile'); // replace the stack
context.pushNamed('home'); // push on topfinal controller = Modular.get<HomeController>(); // resolve a dependency
🤖 Agent Skill
This repo ships an Agent Skill that teaches AI coding agents (Claude Code, Cursor, Codex, OpenCode, and others) the recommended conventions for this package — per-feature route files, named-only navigation, typed binds via the .. cascade, synchronous modules, and kDebugMode-gated logs. The agent then applies them automatically when you scaffold routes, modules, or navigation.
Install it into your project with one command (via the skills CLI):
The CLI detects your installed agents and drops the skill into the right place (e.g. .claude/skills/). Add -g to install it globally for every project.
Optional — events add-on
If your app uses the event system (EventModule, ModularEvent, ModularEventMixin) for decoupled cross-module communication, install the separate events skill too: