https://github.com/purelledhand/sq-intern-practice-ground
๐ ์ธํด์ํ ์ค ์
๋ฌด๊ด๋ จ ์ด์์ ๋ฆฌ ๋ฐ ์ฐ์ต์ฉ ์ ์ฅ์
https://github.com/purelledhand/sq-intern-practice-ground
Last synced: 3 months ago
JSON representation
๐ ์ธํด์ํ ์ค ์ ๋ฌด๊ด๋ จ ์ด์์ ๋ฆฌ ๋ฐ ์ฐ์ต์ฉ ์ ์ฅ์
- Host: GitHub
- URL: https://github.com/purelledhand/sq-intern-practice-ground
- Owner: purelledhand
- Created: 2020-04-07T07:02:02.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T19:02:01.000Z (over 2 years ago)
- Last Synced: 2025-02-08T02:44:23.804Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 2.85 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 40
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
๐ฉ๐ปโ๐ป
Intern : Practice Ground
์ ๋ฌด๊ด๋ จ ์คํฐ๋๊ฐ ํ์ํ ๋ ์ฌ์ฉํ๋ ์ฐ์ต์ฉ ์ ์ฅ์. 2020.03.02 ~ 2020.06.30
๋๋ ํ ๋ฆฌ ๋ณ๋ก ๋ด๋นํ๋ ์ ๋ฌด, ํด๋น ์ ๋ฌด์์ ํ์ํ๋ ์คํฐ๋ ๊ธฐ๋กํ๊ธฐ
Typescript
CL: Routing code base restructuring
์คํฐ๋: ์์ ์ค TS object ์ฐธ์กฐ ๊ด๋ จ ์๋ฌ ํธ๋ค๋ง
https://cheatsheets.joshuatz.com/cheatsheets/typescript/
TS Error ํธ๋ค๋ง ์ค Top-down์ ๋์ฒ๋ง๊ณ Bottom-up์ผ๋ก ์ ๋๋ก ๊ณต๋ถํด์ผ๊ฒ ๋ค๋ ์๊ฐ์ด ๋ค์ด์ ์คํฐ๋ ์์
์ปจ์ ์ด ํ์ฐํ ๋ค์ด๋ ์ ์๋ micro ์์ ์ค์ฌ์ผ๋ก ์ ๋ฆฌํ ์์
Gerrit
https://github.com/purelledhand/sq-intern-practice-ground/blob/master/gerrit/README.md
๋ชจ๋ ธ๋ ํฌ๊ธฐ๋ฐ์ ๋ธ๋์น๋ฅผ ๋ฐ์ง ์์ผ๋ฉฐ gerrit ๊ธฐ๋ฐ์ผ๋ก ์ฝ๋๋ฆฌ๋ทฐ๋ฅผ ์งํํ๋ ํ๊ฒฝ์ ์ ์ํ๋ฉด์ ๊ฒช์ ์ด์๋ค์ ์ ๋งํฌ์ ์ ๋ฆฌํด ๋์๋ค.
์ ๋ฆฌํ ์ด์๋ค ๐ฅ
1. Gerrit ๋ฐ Jenkins ํ๊ฒฝ ์ ๋ฆฌ
2. Relation Chain๊ณผ Jenkins ๋ฐฐํฌ ๊ด๋ จ ์ด์
3. ๋ก์ปฌ์์ ์์ธ Relation Chain ๋น์ฐ๊ธฐ
react-hook-form์ ์ด์ฉํ ํผ ์ ํจ์ฑ ๊ฒ์ฆ
React-Hook-Form + MUI ๋์ ์์ ์ฑ ํ ์คํธ)
CL: Add AddUserDialog Component in Users page
์๋ก ๋งก๊ณ ์๋ ์ ๋ฌด์์ form๊ณผ ๊ด๋ จํ์ฌ react-hook-form ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋์ ์ ์ ์ํ๋ค.
๋ค์ํ handler ํจ์๋ค์ useForm ํ ์ ํตํด ์ ๊ณตํด์ฃผ๊ธฐ๋ ํ๊ณ , Typescript์ผ๋ก ์ ์๋์ด์ ํผ ๋ด ๊ฐ value type์ ๋ํด typesafeํ๊ฒ ์ฌ์ฉํ ์ ์์ผ๋ฉฐ ๋ ๋๋ง ํ์ ๋ฐ ๋ง์ดํธ ์๊ฐ๋ ๋ค๋ฅธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋นํด ํจ์ฌ ์ ์ต์ ํ๋์ด์๊ธฐ ๋๋ฌธ์ด๋ค.
์๋์ด ์์ง๋์ด ๋ถ๊ป์๋ ๊ฐ๋ฐ์ด ๊ฐํธํด์ง๋ ์ด์ ์ด ์๋ค๋ฉด ์ฐฌ์ฑํ์ง๋ง, ํด๋น ํ๋ก์ ํธ์์ ์ฌ์ฉํ๊ณ ์๋ MUI ์ปดํฌ๋ํธ์ ํจ๊ป ์ฌ์ฉํ๋ ๋ฐ์๋ ์ง์ฅ์ด ์๋์ง ์ฌ์ญค๋ณด์ จ๋ค.
Contents
1. ๊ทธ๋์ MUI ์ปดํฌ๋ํธ ํผ๊ณผ react-hook-form ์ฌ์ฉ์ด ์ฉ์ดํ์ง ํ์ธํด๋ณด๋ ํ ์คํธ์ฉ ํ๋ก์ ํธ
2. native select tag์ inputRef๊ฐ ์ง์ ์ ์ฉ๋์ง ์๋ MUI select ํ๊ทธ์์ value๊ฐ์ registerํ๊ณ ์ํ๊ด๋ฆฌ ์์ด ํจ์จ์ ์ผ๋ก ๊ด๋ฆฌํ๋ ๋ฒ
3. password validation
Snackbar with notistack
CL: Add Snackbar component and use-case in login page
snackbar ๋๋ toast๋ฅผ ์์์ ๋์คํ๋ ์ดํ ์ ์๋๋ก ๋์์ฃผ๋ ์ปค์คํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ notistack์ ์ฌ์ฉํ์ฌ ์ปดํฌ๋ํธํํ๋ค.
https://iamhosseindhv.com/notistack
gRPC ํ๊ฒฝ์์ protobufjs ์ฌ์ฉํ๊ธฐ
์ด ๊ณณ์ ์๋ฒ ํ๊ฒฝ์ด MSA๋ก ๊ตฌ์ฑ๋์ด ์์ด์ internal ํต์ ์ ์๋ ํฅ์์ ์ํด gRPC๋ฅผ ์ฌ์ฉํ๋ค.
๋๋ฌธ์ ํด๋ผ์ด์ธํธ๋ protobuf ๊ธฐ๋ฐ์ผ๋ก ํต์ ์ ํ๋๋ฐ, ์๋ฒ์์ gRPC-gateway๋ฅผ ์ ๊ณตํ๊ธฐ ๋๋ฌธ์ JSON์ผ๋ก๋ ํต์ ์ด ๊ฐ๋ฅํ๋ค.
ํ์ฌ ๊ฐ๋ฐ์ค์ธ ์๋น์ค๋ ๋ฐฑ์คํผ์ค ์๋น์ค์ด๊ธฐ ๋๋ฌธ์ ํต์ ์๋์ ์ค์์ฑ์ด ๋ค๋ฅธ ํ๋ก๋ํธ๋ค์ ๋นํด์ ๋ฎ์ ํธ์ด๋ผ JSON์ผ๋ก ์๋ฒ์ ์์ฒญํ๊ธฐ๋ก ์ค๊ณ๋์๋๋ฐ,
xprotobuf/JSON ๋ฑ์ ์์ฒญ ํฌ๋งท๋ฟ๋ง์ด ์๋๋ผ TypeScript ์ ๋๋ฆญ ์ฌ์ฉ ๋ฑ์๋ protobuf๊ฐ ์ฌ์ฉ๋์๋ค.
gRPC๋ก JSON์ ์์ฒญํ๊ณ ๋ฐ๋ก protobuf๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ์๋ ํต์ ์๋์๋ ์ ํ ์ด์ ์ด ์๋๋ฐ, ์ protobuf๊ฐ ์ฌ์ฉ๋๋์ง ๊ถ๊ธํ๋ค.
๊ฐ์ฅ ํฐ ์ด์ ๋ IDL ์ ์์ ์๋ฒ์์ ์ฌ์ฉํ๋ ์ ์๋ฅผ ํด๋ผ์ด์ธํธ์์๋ ๊ณตํต์ ์ผ๋ก ์ฌ์ฉํ์ฌ source of truth๋ฅผ ํ๋๋ก ๊ด๋ฆฌํ๊ธฐ ์ํจ์ด์๋ค.
์ถ๊ฐ๋ก TypeScript์ ํจ๊ป ์ฐ๋๋ฐ ์์ด ์ ๋ง ์ข์ ์กฐํฉ์ด๋ผ๊ณ ์๊ฐ๋๋ค.
yarn protoc ์ปค๋งจ๋์ ์๋ ์คํฌ๋ฆฝํธ๋ฅผ ๋ฃ์ด์ฃผ๊ณ , smoke, deploy, test ์ปค๋งจ๋์ yarn protoc๋ฅผ ์ถ๊ฐ์์ผ์ฃผ์๋ค.
$ pbjs --keep-case -t static-module -w es6 -o src/model/proto/index.js externalProto/**/*.proto && pbts -o src/model/proto/index.d.ts src/model/proto/index.js