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

[BREAKING] Migrate to Monorepo #359

Merged
merged 16 commits into from
Aug 23, 2022
Merged

[BREAKING] Migrate to Monorepo #359

merged 16 commits into from
Aug 23, 2022

Conversation

saenyakorn
Copy link
Member

Why did you create this PR

  • จากการประชุมรอบก่อน เราตัดสินใจว่าจะย้ายมา maintain code ใน monorepo ซึ่งจะรวม frontend backend scraper เข้าด้วยกัน เพื่อ share type / share utility function / share theme ซึ่งจะเขียนเป็น documentation ต่อไป

What did you do

  • ใช้ Nx เป็นตัวจัดการ monorepo
  • ย้ายไปใช้ pnpm เพื่อความรวดเร็วในการ install deps
  • ใช้ Nx Cloud เพื่อใช้งาน distributed caching เพื่อให้การ build / lint / test ทำงานได้เร็วขึ้น
  • ในการ run frontend ใช้ command nx run cugetreg-web:serve
  • ในการ run backend ใช้ command nx run cugetreg-api:serve

Demo

https://dev.cugetreg.com

Checklist

  • Deploy a demo
  • Check browsers compatibility
  • Wrote coverage tests

initialize Nx workspace

add docker build command

install nest nx cli

revert project schema

generate cugetreg-api app

add docker build command for cugetreg-api

add docker compose file

run import order format

migrate backends to monorepo

complete migrate frontend

format all files

fix web run-time error

add docker build command for api

optimize api docker image

remove unknown file

fix docker-build command

add github action

fix deploy action

remove reusable workflow

enable parallel command

remove testing branch

apply semi dynamic tag for docker build

remove testing branch

add project automation workflow
@saenyakorn saenyakorn added enhancement Improve existing features new feature New feature refactor Refactor code to be more maintainable labels Aug 17, 2022
@saenyakorn saenyakorn force-pushed the yu/breaking/monorepo branch 3 times, most recently from 7830767 to a71cf3f Compare August 17, 2022 03:42
@saenyakorn saenyakorn force-pushed the yu/breaking/monorepo branch from a71cf3f to 2f10a65 Compare August 17, 2022 03:46
@suphon-t
Copy link
Member

Do we want to try @saengowp's suggestion to merge the commit tree from the backend repo?

@suphon-t
Copy link
Member

Do we want to try @saengowp's suggestion to merge the commit tree from the backend repo?

Ping! @saenyakorn

@bombnp
Copy link
Member

bombnp commented Aug 18, 2022

Do we want to try @saengowp's suggestion to merge the commit tree from the backend repo?

is it worth it though? most of the commits are mine anyways

seems like a lot of effort, but not really any benefits

@saenyakorn
Copy link
Member Author

How to review:

  1. Checkout the branch
  2. Initialize apps/cugetreg-web/.env.local and apps/cugetreg-api/.env.local
  3. Try nx run cugetreg-web:serve to run the web
  4. Try nx run cugetreg-api:serve to run the server
  5. Try nx run-many --target=serve to run both
  6. Then check all paths / functions / features for both frontend and backend

@new5558
Copy link
Member

new5558 commented Aug 23, 2022

I may miss something from the last meeting, but why we don't also merge computation into monorepo?
@saenyakorn @saengowp

@saenyakorn
Copy link
Member Author

will do it later, including scraper

@saenyakorn
Copy link
Member Author

@saenyakorn saenyakorn changed the base branch from master to beta August 23, 2022 15:00
@saenyakorn saenyakorn merged commit be3069c into beta Aug 23, 2022
@saenyakorn saenyakorn deleted the yu/breaking/monorepo branch August 23, 2022 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing features new feature New feature refactor Refactor code to be more maintainable
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants