How ronak99/majestic-ui-flutter works
Project type and purpose
• This is a monorepo for “Majestic UI”, a Flutter UI widget library plus a CLI tool (majestic_ui) that lets developers install and publish individual widgets.
• The repo contains:
• src/ – a folder of independent Flutter packages (one per widget) ready for publication.
• app/ – a sample Flutter application that demonstrates all widgets.
• demo/ – a more focused demo application showcasing each widget in isolation.
• CI workflows under .github/workflows/ to automate tasks (widget count, widget updates).
File structure
• Top‑level:
• .github/ – CI (GitHub Actions) definitions (file_count.yml, update_all_widgets.yml)
• src/ – each widget is a separate Dart package with its own pubspec.yaml, lib/, docs, and tests.
• app/ – a full Flutter app (multi-platform: Android, iOS, Linux, macOS, Windows, Web) consuming these packages.
• demo/ – similar multi‑platform Flutter apps but organized per widget for isolated demos.
• all_widgets.json – a manifest of available widgets (used by the CLI).
• Notice the Flutter platform folders under app/ and demo/: Android, iOS, macOS, Linux, Windows, Web.
Readme insights
• Confirms: Majestic UI is a “Flutter UI library/collection of widgets.”
• CLI command: dart pub global activate majestic_ui and majestic_ui add <widget>
• CI ensures widget metadata is up to date.
Main components
a. Developer Workstation
• Terminal/CLI (majestic_ui)
• Local Monorepo Clone
b. Monorepo (GitHub)
• src/ – individual widget packages
• app/ – sample app
• demo/ – widget demos
• CI (GitHub Actions)
c. Pub.dev (Dart package registry)
d. Flutter Engine / Platform Runtimes
• iOS, Android, Web, macOS, Windows, Linux
e. Documentation Site (majesticui.com)
Relationships & data flows
• Developer uses the CLI to:
1. Read all_widgets.json from the repo (or remote manifest)
2. majestic_ui add <widget> → CLI fetches that widget’s package from src/<widget> (locally) or from Pub.dev (if published)
3. Inserts code/asset files into the developer’s own project
• CI workflow:
• file_count.yml reads src/ folders → updates all_widgets.json
• update_all_widgets.yml can publish packages to Pub.dev or push updates to docs
• Sample apps (app/, demo/) import packages from src/ (path dependencies) to render demos on multiple platforms.
• Documentation site (external) pulls metadata from the manifest or the GitHub repo.
Architectural patterns & design principles
• Monorepo of loosely coupled packages – each widget is independently versioned and tested.
• CLI-driven workflow – manifests drive code scaffolding.
• Platform abstraction via Flutter – single codebase runs on 6 platforms.
• CI automation – keeps manifest and publications in sync.
Final advice
• Be very detailed: list each major folder as a sub‑component.
• CI workflows and how they feed into the manifest and publishing.
• How one source widget (e.g., src/star_rush_background) flows through CLI, into demo, into a real app, and ultimately to end‑users via Pub.dev.