cuma_mobileweb_fronted_nextjs
v1.0.5
Published
- 본 레포지토리는 `퍼스트엔터테인먼트 > 쿠마마켓 > 모바일 웹 버젼 > NextJS 용 빌드 파일` 입니다. - 모든 저작권은 퍼스트엔터테인먼트에 있습니다.
Downloads
15
Readme
1. CUMA Mobile Web
- 본 레포지토리는
퍼스트엔터테인먼트 > 쿠마마켓 > 모바일 웹 버젼 > NextJS 용 빌드 파일
입니다. - 모든 저작권은 퍼스트엔터테인먼트에 있습니다.
2. 배포 방법
- AWS EC2를 통해 배포하며, CI/CD 용 파일은
.gitlab-ci.yml
입니다. - 테스트 환경 : AWS EC2 쿠마 개발서버 + PM2
- 배포 환경 : AWS EC2 쿠마 운영서버 + PM2
- 포트 : 8843
3. 컴포넌트 네이밍룰
- 원자 : Item
- 분자 : Panel
- 구조 : 컴포넌트 이름 / 이름 + Container
- 페이지 : Page
4. API 명명법
C = creat / R = get / U = update / D = delete
5. 토큰
토큰의 종류 임시회원, 준회원, 정회원
토큰의 유형
- 임시토큰
- 유저가 로그인 없이 접속하였을 경우 발급한다.
- 정회원이 로그아웃 시 정회원에 남아있던 uuid를 이용하여 임시토큰 발급
- 준회원 토큰
- 임시토큰을 가진 임시회원이 구매하기 버튼을 클릭 후, 핸드폰 번호 인증을 완료하면 발급
- 정회원 토큰
- 정회원은 회원 아이디가 있는 유저로 일반회원과 OAuth 회원이 있다.
- 임시토큰
토큰 발급
- 로그인
- 로그인 시도
- 발급된 토큰으로 axios header 설정 및 로컬 스토리지 저장
- 로그아웃
- 로그아웃 시도
- axios header 초기화
- 임시회원 토큰 발급
- axios header 임시회원 토큰으로 설정 및 로컬스토리지 저장
- 비로그인
- 로컬스토리지 값 체크
- 없으면 임시회원 토큰 발급
- 로그인
회원 가입
- SNS 로그인 버튼
- 임시회원 토큰을 가진상태로
- 네이버, 카카오 로그인하기 버튼을 통해 sns 인증
- 회원 가입
- 정회원 토큰 저장
- 일반 회원가입
- 임시회원 토큰을 가진상태로
- 회원 가입
- 정회원 토큰 저장
- SNS 로그인 버튼
결제할때의 토큰
- 결제 시작할때 토큰 체크
- 임시회원(한번도 가입안한 유저)이면 -> 준회원으로 업그레이드 해야함
- nonce타입이면 -> 준회원 정보 받아옴
- 그 외 회원이면 로그인 창으로 보냄
배포
기존 배포 스크립트가 운영서버에서 빌드할 때 (yarn build) 서버가 멈추는 상황이 발생하였음. 그래서 로컬에서 빌드하여 빌드된 결과물을 서버로 전송하는 방법으로 변경
pm2에서 내려갔을때
서버 접속 후 해당 디렉토리로 이동한 다음 pm2 start yarn --interpreter bash --name cuma-app-mobile-frontend -- start