GithubHelp home page GithubHelp logo

iknow-authentication-server's Introduction

iknow-authentication-server

프로젝트의 인증과 인가를 담당하는 서버입니다.

REST API를 제공하며, 클라이언트는 이 서버를 통해 사용자의 인증과 인가를 처리합니다.
프론트엔드는 포함되어 있지 않으며 별도 레포지토리에서 구현하였습니다.

서버 구조

img.png

서버 구현 기능

  • 사용자 인증/인가
    Spring Security를 일관된 방식으로 사용하여 사용자의 인증과 인가를 처리합니다.

  • 문서화
    Notion을 사용하여 API 명세서를 작성하였습니다.
    Mermaid를 사용하여 기능의 흐름을 Sequence Diagram, Flow Chart로 작성하였습니다.

  • 테스트

    1. 기능 테스트
      Junit5, Mockito를 사용하여 테스트 코드를 작성하였습니다.
      초기에는 test double을 사용한 고립 테스트로 시작하였지만,
      잦은 API설계 변경에 대응하기 위해 production object를 사용한 통합 테스트로 변경하였습니다.

    2. 부하 테스트
      nGrinder와 POSTMAN을 사용하여 부하 테스트를 수행하였습니다.
  • 배포 자동화
    Github Actions를 사용하여 CI/CD를 구축하였습니다.
    Main 브랜치에 push가 되면 testcontainer를 사용해 테스트를 수행하고, 테스트가 성공하면 빌드를 수행합니다.
    빌드가 성공하면 SCP 액션을 통해 서버로 빌드파일을 복사하고
    서버에서 복사된 빌드 파일을 Docker 이미지로 제작하여 container로 실행시킵니다.


  • Gateway
    nginx를 사용하여 API Gateway를 구축하였습니다.

  • Cache
    사용자의 정보를 Redis에 저장하여 사용자의 인증과 인가를 빠르게 처리합니다.

프로젝트 아키텍쳐

img.png auth-server는 프로젝트의 인증과 인가를 담당하는 서버입니다.
board-server는 게시글을 담당하는 서버입니다.
main-frontend는 프론트엔드입니다.

기술 스택

  • Spring Boot / Security / Data JPA
  • DB: MySQL/ Redis
  • Test: Junit5/ Mockito/ Testcontainer
  • CI/CD: Github Actions
  • Container: Docker
  • Gateway: Nginx
  • Documentation: Notion, Mermaid
  • 부하 테스트: nGrinder, POSTMAN
  • OS: Ubuntu, MacOS
  • IDE: IntelliJ, VSCode
  • VCS: Git

프로젝트 실행 방법

  1. Docker 설치
  2. Docker-compose 설치
  3. 프로젝트 루트 디렉토리에서 docker-compose up 명령어 실행
  4. localhost:9001으로 접속하여 서비스 확인

iknow-authentication-server's People

Contributors

iknowca avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.