Skip to content

GameOnAnil/vanilla-stacked-bricks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VanillaStackedBricks

This repository contains Mason bricks for clean architecture projects. It includes modules, views, integration tests, services, network components, and more.

Mason Demo

Table of Contents

View Brick

Mason Brick to create a new view in already existing feature or a as a new feature.

Setup Brick 🚀

  1. Install mason_cli:
dart pub global activate mason_cli
  1. Activate view bricks
  • Using mason add command
mason add view
  --git-url https://github.com/GameOnAnil/vanilla-stacked-bricks.git
  --git-path bricks/view
  • Add directly to mason.yaml
bricks:
  view:
    git:
      url: 'https://github.com/GameOnAnil/vanilla-stacked-bricks.git'
      path: 'bricks/view'

How to use 🚀

Command Line

Mason Demo

mason make view

The you will get prompt

modulename?
filename?

Variables for the Command Line ✨

Variable Description Type
modulename The name of feature / module this view belongs to String
filename Name of the view String

Generate File Structure

login_feature
 ┗ views
 ┃ ┗ login
 ┃ ┃ ┣ view_model
 ┃ ┃ ┃ ┗ login_viewmodel.dart
 ┃ ┃ ┗ login_view.dart

Integration Test Brick

Mason Brick to create a template for integration test

  1. Activate view bricks
  • Using mason add command
mason add view
  --git-url https://github.com/GameOnAnil/vanilla-stacked-bricks.git
  --git-path bricks/integration_test
  • Add directly to mason.yaml
bricks:
  view:
    git:
      url: 'https://github.com/GameOnAnil/vanilla-stacked-bricks.git'
      path: 'bricks/integration_test'

Variables for the Command Line ✨

Variable Description Type
modulename The name of feature / module this integration test belongs to String

Generate File Structure

integration_test
 ┗ sample
 ┃ ┣ common
 ┃ ┃ ┗ sample_common.dart
 ┃ ┣ finders
 ┃ ┃ ┗ sample_finders.dart
 ┃ ┗ sample_test.dart

Feature/Module Brick

Mason Brick to create a template for feature/module in our MVVM flutter architecture.

  1. Activate v_module bricks
  • Using mason add command from
mason add v_module
  • Add directly to mason.yaml from git
bricks:
  v_module:
    git:
      url: 'https://github.com/GameOnAnil/vanilla-stacked-bricks.git'
      path: 'bricks/v_module'

Variables for the Command Line ✨

Variable Description Type
module_name The name of feature / module this integration test belongs to String

Generate File Structure

 ┗ 📂ui
 ┃ ┗ 📂login
 ┃ ┃ ┣ 📂models
 ┃ ┃ ┃ ┗ 📜hello.md
 ┃ ┃ ┣ 📂repository
 ┃ ┃ ┃ ┗ 📜login_repository.dart
 ┃ ┃ ┣ 📂services
 ┃ ┃ ┃ ┗ 📜login_service.dart
 ┃ ┃ ┗ 📂views
 ┃ ┃ ┃ ┗ 📜hello.md

About

A repository for easily generating well-structured Flutter projects based on the Stacked framework, using Mason Bricks for efficient setup and consistency.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages