Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilites sharing, maintenance, implementation & more #11

Open
yethiha-codigo opened this issue May 23, 2024 · 3 comments
Open

Utilites sharing, maintenance, implementation & more #11

yethiha-codigo opened this issue May 23, 2024 · 3 comments

Comments

@yethiha-codigo
Copy link
Collaborator

In Codigo we write utilites which can later be used in the on going or new projects of Codigo.

Example of utils codes are Form Components, Image Components, useQuery( which consists of query funcs ).

Currently, whenever we create a new project we copy the utilies from old project.

For example utilites from Trifecta are copied from Renonation.

This ☝️ approach work but it has own limitation. What happen when update the utils from Trifecta and continue the development while leaving Renonation behind. And later when Renonation need the utils which already developed in Trifecta, What should we do ?. Copy utils form Trifecta to Renonation or should we developed the new utils in Renonation? As we can see there is counter productive in this process. And the issue become much bigger when there is more projects which uses the same utils.

So which approach can we used to matain, sync, share this utils codes which will be used across through out the codigo projects.

My recommend is using Share Repo aka Github sub_modules
When we used GitHub sub_modules we get advantages such as

  • we can maintain the utils seperately
  • version controls for utils for example Trifecta can use v4 of the utils while Renonation use v3. Renonation can update to v4 whenever the project is ready.
@kyawzayarwin-codigo
Copy link
Collaborator

kyawzayarwin-codigo commented May 23, 2024

I would like to understand more about shared repo.
Can you please kindly demonstrate in the next meeting by using another github repo or something?
I have seen proof of concepts in current github repo for mono repo but I haven't seen the details how shared repo will be look like when we're going to implement it.

So I can't decide yet and give voting for it.

@yethiha-codigo

@yethiha-codigo
Copy link
Collaborator Author

@kyawzayarwin-codigo
Sure bro, next meeting is going to be "Comparing Shared Repo with Monorepo".
In the mean time plz explore the shared_repo when u got the time

@yethiha-codigo
Copy link
Collaborator Author

after doing the meeting on Jun 5 2024

We explored the difference between shared business logic and shared utilities

Business logic example
"Checkout" func share between 7E CMS & 7E Website can be consider as share business logic.

Share utiilies example
useFetchQuery hook share between all the app of codigo can be consider as shared utilies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment