rensawamo / melos-app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Melos Dart App

melos

Powered by Mason

Powered by Dart Frog

Dart Frog is an excellent tool for building a backend with Dart. I’ve already covered the basics in this article, so if you want to follow along, I recommend you read this one first.

What is Melos? It is a CLI tool to support management of Dart projects with multiple packages (also called monorepo).

Splitting a large project into version-controlled packages is very effective for code sharing.

It provides a simple and efficient way to manage multiple packages and libraries in a single code base. Melos is designed to help manage these challenges by providing a streamlined workflow for building, testing, and managing dependencies across all projects in a mono repository.

Melos also provides a plugin system (for Intellij and VS Code )

Why Use??

☑️ Consistent development environment

☑️ Linking and installation of local packages

☑️ Simultaneous command execution on multiple packages

☑️ Multiple developers can work on the same code base at the same time

Demerit

☑️ Flexibility Limitations

☑️ Increased complexity

Melos Command

All package dependencies are installed (internally pub get is used) All packages are linked locally.

$ melos bootstrap
# or 
$ melos bs

Clean up temporary project files. Can be run before bootstrap, for example, to start completely fresh.

$ melos clean

project app

ex) Chrome. You can build android ios emulater!

image

image

Use the Dart backend too!

image

environment

macOS Home Brew

project directry tree

root
├── app
│   ├── TaskApp
│ 
├── backend
│   ├── dartfrog(server)
│  
├── packages
│   ├──  core
│   │      ├── analytics
│   │      └── data
│   │      └── database
│   │      └── domain
│   │      └── model
│   │
│   └── feature
│          └── auth
│          
├── infrastructure
│
├── mason
│
├── Dockerfile
├── dockercompose.yaml
├── meson.yaml   
├── melos.yaml  
├── pubspec.yaml 
└── README.md

bootstrap

set up project server

$ make bs
....
Running "flutter pub get" in workspace packages...
  ✓ model
    └> packages/core/model
  ✓ repository
    └> packages/core/repository
  ✓ backend
    └> backend
  ✓ app
    └> app
  > SUCCESS

Generating IntelliJ IDE files...
  > SUCCESS
....
Starting Dart Frog server on Docker
[+] Building 376.0s (18/18) FINISHED                                                                                                                                                                                                                                          docker:desktop-linux
....

✓ Running on http://:::8080

app start

set up project frontend

$ make app-start-chrome
...
A Dart VM Service on Chrome is available at: http://127.0.0.1:53308/vuiIiX9KTZs=

You can get backend info

http://localhost:8080/tasks

if you want to create a new package

$ dart create -t package FOLDERNAME

reference

https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqa3liTklwNWJWRDhnUXZHek54OVM0ZDhEQy1zZ3xBQ3Jtc0tuS3ZiR3QxUXNtRUhMMl9PdHdBRFNzRGpFSHhKQmJJSzEzZTRoaG1oNmdZbzdoU0FZYzlNdEwzUmY4WVZQV0tQdUFDdWFvUjZhTlFrMHk1d0tISVBLUUZGV3Q5OXRYTHhYTUJZdEhpRTlSM0ZPbjg5aw&q=https%3A%2F%2Fgithub.com%2Fiampawan%2FFullStackTaskApp&v=_LhSRbekY5k

About


Languages

Language:Dart 77.8%Language:Shell 5.8%Language:Makefile 5.7%Language:Swift 5.6%Language:Dockerfile 1.9%Language:Java 1.8%Language:Kotlin 1.0%Language:Objective-C 0.3%Language:Bicep 0.1%