Skip to content

e1-mslee/reactProject

Repository files navigation

SpringBoot & React Project & typeScript

πŸ–₯️ ν”„λ‘œμ νŠΈ μ†Œκ°œ

E1μ •λ³΄κΈ°μˆ  BS 3νŒ€ UDA μ‹œμŠ€ν…œ 관리 ν”„λ‘œμ νŠΈ μž…λ‹ˆλ‹€.
Springboot 와 react & typescriptλ₯Ό 톡해 κ°œλ°œμ„ μ§„ν–‰ν•˜μ˜€κ³  ubuntu server에 jenkins μ„œλ²„λ₯Ό μ„€μΉ˜ν•˜μ—¬ docker composeλ₯Ό 톡해 배포λ₯Ό ν•˜μ˜€μŠ΅λ‹ˆλ‹€

πŸ•°οΈ 개발 κΈ°κ°„

  • 25.07.16 ~

βš™οΈ 개발 ν™˜κ²½

  • node v22.17.1
  • react v18.2.1
  • typescirpt v5.9.2
  • spring boot v3.4.7
    • openjdk 17
  • jenkins v2.516.1
  • redis v8.2.1
  • docker v27.5.1
    • docker compose v2.35.1
  • IDE : Visual Studio Code
  • Database : mysql 8.0

πŸ› οΈ μ£Όμš” 라이브러리

react & typescript

ꡬ뢄 νŒ¨ν‚€μ§€/기술λͺ… 버전
μƒνƒœκ΄€λ¦¬ Zustand 5.0.4
λ²ˆλ“€λŸ¬ Vite 7.0.4
νƒ€μž… TypeScript 5.9.2
λΌμš°νŒ… react-router-dom 7.6.3
UI Material-UI,antd 7.2.0, 5.26.4
κ·Έλ¦¬λ“œ wijmo 5.20251.40
기타 axios 1.10.0
ν’ˆμ§ˆ ESLint, Prettier 9.x, 3.x

springboot

ꡬ뢄 νŒ¨ν‚€μ§€/기술λͺ… 버전
인증 jsonwebtoken 0.11.5
μ—‘μ…€ μ—…λ‘œλ“œ & λ‹€μš΄λ‘œλ“œ apache poi 5.2.5
쿼리 mybatis 3.0.4

πŸ”§ μ£Όμš” μ„€μ •

경둜 별칭 (Path Aliases)

// tsconfig.json & vite.config.js
{
  "@/*": ["src/*"],
  "@pages/*": ["src/pages/*"],
  "@component/*": ["src/components/*"],
  "@api/*": ["src/api/*"],
  "@data/*": ["src/data/*"],
  "@assets/*": ["src/assets/*"],
  "@utils/*": ["src/utils/*"],
  "@store/*": ["src/store/*"],
  "@hooks/*": ["src/hooks/*"],
  "@router/*": ["src/router/*"],
  "@layout/*": ["src/layout/*"]
}

πŸ“Œ μ‹œμž‘ν•˜κΈ°

1. μ•„λž˜μ²˜λŸΌ git을 cloneν•˜κ±°λ‚˜ zip으둜 λ‹€μš΄λ‘œλ“œ

$ git clone https://github.com/e1-mslee/reactProject.git

πŸ“ ν”„λ‘œμ νŠΈ ꡬ쑰

bs3_study
β”œβ”€ backend
β”‚  β”œβ”€ .mvn
β”‚  β”‚  └─ wrapper
β”‚  β”‚     └─ maven-wrapper.properties
β”‚  β”œβ”€ Dockerfile
β”‚  β”œβ”€ HELP.md
β”‚  β”œβ”€ mvnw
β”‚  β”œβ”€ mvnw.cmd
β”‚  β”œβ”€ pom.xml
β”‚  └─ src
β”‚     β”œβ”€ main
β”‚     β”‚  β”œβ”€ java
β”‚     β”‚  β”‚  └─ com
β”‚     β”‚  β”‚     └─ e1
β”‚     β”‚  β”‚        └─ backend
β”‚     β”‚  β”‚           β”œβ”€ auth
β”‚     β”‚  β”‚           β”‚  └─ TokenProvider.java
β”‚     β”‚  β”‚           β”œβ”€ BackendApplication.java
β”‚     β”‚  β”‚           β”œβ”€ config
β”‚     β”‚  β”‚           β”‚  β”œβ”€ RedisConfig.java
β”‚     β”‚  β”‚           β”‚  β”œβ”€ SecurityConfig.java
β”‚     β”‚  β”‚           β”‚  └─ WebConfig.java
β”‚     β”‚  β”‚           β”œβ”€ Controller
β”‚     β”‚  β”‚           β”‚  β”œβ”€ ApiController.java
β”‚     β”‚  β”‚           β”‚  β”œβ”€ AuthController.java
β”‚     β”‚  β”‚           β”‚  └─ KjoApiController.java
β”‚     β”‚  β”‚           β”œβ”€ dto
β”‚     β”‚  β”‚           β”‚  β”œβ”€ CustomUserDetails.java
β”‚     β”‚  β”‚           β”‚  β”œβ”€ UserDto.java
β”‚     β”‚  β”‚           β”‚  └─ UserEntity.java
β”‚     β”‚  β”‚           β”œβ”€ filter
β”‚     β”‚  β”‚           β”‚  └─ JwtAuthenticationFilter.java
β”‚     β”‚  β”‚           β”œβ”€ mapper
β”‚     β”‚  β”‚           β”‚  β”œβ”€ ApiMapper.java
β”‚     β”‚  β”‚           β”‚  β”œβ”€ KjoApiMapper.java
β”‚     β”‚  β”‚           β”‚  └─ UserMapper.java
β”‚     β”‚  β”‚           β”œβ”€ service
β”‚     β”‚  β”‚           β”‚  β”œβ”€ ApiService.java
β”‚     β”‚  β”‚           β”‚  β”œβ”€ CustomUserDetailsService.java
β”‚     β”‚  β”‚           β”‚  └─ KjoApiService.java
β”‚     β”‚  β”‚           └─ serviceimpl
β”‚     β”‚  β”‚              β”œβ”€ ApiServiceImpl.java
β”‚     β”‚  β”‚              └─ KjoApiServiceImpl.java
β”‚     β”‚  └─ resources
β”‚     β”‚     β”œβ”€ application.properties
β”‚     β”‚     β”œβ”€ logback-spring.xml
β”‚     β”‚     β”œβ”€ mybatis
β”‚     β”‚     β”‚  └─ sql
β”‚     β”‚     β”‚     β”œβ”€ kjo
β”‚     β”‚     β”‚     β”‚  └─ kjoApi.xml
β”‚     β”‚     β”‚     └─ lms
β”‚     β”‚     β”‚        └─ api.xml
β”‚     β”‚     β”œβ”€ static
β”‚     β”‚     └─ templates
β”‚     └─ test
β”‚        └─ java
β”‚           └─ com
β”‚              └─ e1
β”‚                 └─ backend
β”‚                    └─ BackendApplicationTests.java
β”œβ”€ docker-compose.yml
β”œβ”€ frontend
β”‚  β”œβ”€ .dockerignore
β”‚  β”œβ”€ .env
β”‚  β”œβ”€ .env.production
β”‚  β”œβ”€ default.conf
β”‚  β”œβ”€ Dockerfile
β”‚  β”œβ”€ eslint.config.js
β”‚  β”œβ”€ index.html
β”‚  β”œβ”€ package-lock.json
β”‚  β”œβ”€ package.json
β”‚  β”œβ”€ public
β”‚  β”‚  β”œβ”€ favicon.ico
β”‚  β”‚  └─ font
β”‚  β”‚     β”œβ”€ NotoSansCJKkr-Black.otf
β”‚  β”‚     β”œβ”€ NotoSansCJKkr-Bold.otf
β”‚  β”‚     β”œβ”€ NotoSansCJKkr-DemiLight.otf
β”‚  β”‚     β”œβ”€ NotoSansCJKkr-Light.otf
β”‚  β”‚     β”œβ”€ NotoSansCJKkr-Medium.otf
β”‚  β”‚     β”œβ”€ NotoSansCJKkr-Regular.otf
β”‚  β”‚     β”œβ”€ NotoSansCJKkr-Thin.otf
β”‚  β”‚     β”œβ”€ NotoSansMonoCJKkr-Bold.otf
β”‚  β”‚     β”œβ”€ NotoSansMonoCJKkr-Regular.otf
β”‚  β”‚     └─ Roboto-Regular.ttf
β”‚  β”œβ”€ README.md
β”‚  β”œβ”€ src
β”‚  β”‚  β”œβ”€ .prettierignore
β”‚  β”‚  β”œβ”€ .prettierrc.yml
β”‚  β”‚  β”œβ”€ api
β”‚  β”‚  β”‚  β”œβ”€ api.ts
β”‚  β”‚  β”‚  β”œβ”€ Auth.ts
β”‚  β”‚  β”‚  β”œβ”€ lmsApi.ts
β”‚  β”‚  β”‚  β”œβ”€ lmsDocApi.ts
β”‚  β”‚  β”‚  β”œβ”€ lmsHeaderApi.ts
β”‚  β”‚  β”‚  β”œβ”€ lmsPopApi.ts
β”‚  β”‚  β”‚  └─ types.ts
β”‚  β”‚  β”œβ”€ App.css
β”‚  β”‚  β”œβ”€ App.tsx
β”‚  β”‚  β”œβ”€ assets
β”‚  β”‚  β”‚  └─ Logo.png
β”‚  β”‚  β”œβ”€ components
β”‚  β”‚  β”‚  └─ BaseButton.jsx
β”‚  β”‚  β”œβ”€ data
β”‚  β”‚  β”‚  β”œβ”€ data.ts
β”‚  β”‚  β”‚  └─ menuItems.tsx
β”‚  β”‚  β”œβ”€ hooks
β”‚  β”‚  β”‚  └─ useRemoveWijmoLink.ts
β”‚  β”‚  β”œβ”€ index.css
β”‚  β”‚  β”œβ”€ layout
β”‚  β”‚  β”‚  β”œβ”€ Footer.tsx
β”‚  β”‚  β”‚  β”œβ”€ Header.tsx
β”‚  β”‚  β”‚  └─ Sidebar.tsx
β”‚  β”‚  β”œβ”€ main.tsx
β”‚  β”‚  β”œβ”€ pages
β”‚  β”‚  β”‚  β”œβ”€ Home.tsx
β”‚  β”‚  β”‚  β”œβ”€ kjo
β”‚  β”‚  β”‚  β”‚  β”œβ”€ kjo.css
β”‚  β”‚  β”‚  β”‚  β”œβ”€ Kjo.tsx
β”‚  β”‚  β”‚  β”‚  β”œβ”€ kjoHeaderPopup.tsx
β”‚  β”‚  β”‚  β”‚  └─ KjoPop.tsx
β”‚  β”‚  β”‚  β”œβ”€ lms
β”‚  β”‚  β”‚  β”‚  β”œβ”€ Lms.css
β”‚  β”‚  β”‚  β”‚  β”œβ”€ Lms.tsx
β”‚  β”‚  β”‚  β”‚  β”œβ”€ LmsDoc.tsx
β”‚  β”‚  β”‚  β”‚  β”œβ”€ LmsHeader.tsx
β”‚  β”‚  β”‚  β”‚  └─ LmsPop.tsx
β”‚  β”‚  β”‚  β”œβ”€ Login.css
β”‚  β”‚  β”‚  β”œβ”€ Login.tsx
β”‚  β”‚  β”‚  └─ Notfound.tsx
β”‚  β”‚  β”œβ”€ router
β”‚  β”‚  β”‚  └─ routes
β”‚  β”‚  β”‚     β”œβ”€ MainRoute.tsx
β”‚  β”‚  β”‚     └─ PopupRoute.tsx
β”‚  β”‚  β”œβ”€ store
β”‚  β”‚  β”‚  β”œβ”€ commonStore.ts
β”‚  β”‚  β”‚  β”œβ”€ kjo
β”‚  β”‚  β”‚  β”‚  β”œβ”€ kjoHeaderStore.ts
β”‚  β”‚  β”‚  β”‚  β”œβ”€ kjoPopupStore.ts
β”‚  β”‚  β”‚  β”‚  └─ kjoStroe.ts
β”‚  β”‚  β”‚  └─ lms
β”‚  β”‚  β”‚     β”œβ”€ lmsDocStore.ts
β”‚  β”‚  β”‚     β”œβ”€ lmsHeaderStore.ts
β”‚  β”‚  β”‚     β”œβ”€ lmsPopStore.ts
β”‚  β”‚  β”‚     └─ lmsStore.ts
β”‚  β”‚  └─ utils
β”‚  β”‚     β”œβ”€ openPop.ts
β”‚  β”‚     └─ tableUtils.ts
β”‚  β”œβ”€ tsconfig.json
β”‚  β”œβ”€ vite-env.d.ts
β”‚  └─ vite.config.js
β”œβ”€ Jenkinsfile
β”œβ”€ README.md
β”œβ”€ table.sql
└─ UDA μ‹œμŠ€ν…œκ΄€λ¦¬.pptx

2. frontend 폴더 경둜둜 이동 ( package.json이 μžˆλŠ” 폴더) ν›„ npm μ„€μΉ˜

$ cd /frontend
$ npm install

3. frontend ν΄λ”μ—μ„œ react μ‹€ν–‰

$ npm run dev

4. backend ν΄λ”μ—μ„œ Springboot μ‹€ν–‰ (BackendApplication.java)

πŸš€ 배포

Jenkins νŒŒμ΄ν”„λΌμΈ ν†΅ν•œ μžλ™ν™” 배포

ν™˜κ²½λ³„ λΉŒλ“œ 및 배포 슀크립트

인증 μ‹œμŠ€ν…œ

jwt을 톡해 access tockenκ³Ό refresh tocken을 톡해 인증(redis μ„œλ²„λ₯Ό ν†΅ν•œ 동기화)


이후 μžμ„Έν•œ μ‹€ν–‰ λ‚΄μš©μ€ React_Springboot κ°œλ°œν™˜κ²½_메뉴얼_이민수.pptx μ°Έμ‘°