Skip to content

Team-Packman/Packman-Server-Release

Repository files navigation

🧳 Packman

내 손안의 짐 챙김 도우미, 팩맨
2022.07.02 ~ 2022.10.07

🧳 Server Architecture



🧳 Contributors

박현지 김경린 장서희
dingding-21 kkl4846 laalaa31


🧳 Service Core Function

20 21 22 23 24 25 26 27 28



🧳 API Docs



🧳 Code Covention

명명규칙(Naming Conventions)
  1. 이름으로부터 의도가 읽혀질 수 있게 쓴다.
  • ex)

    // bad
    function q() {
      // ...stuff...
    }
    
    // good
    function query() {
      // ..stuff..
    }
  1. 오브젝트, 함수, 그리고 인스턴스에는 camelCase를 사용한다.
  • ex)

    // bad
    const OBJEcttsssss = {};
    const this_is_my_object = {};
    function c() {}
    
    // good
    const thisIsMyObject = {};
    function thisIsMyFunction() {}
  1. 클래스나 constructor에는 PascalCase를 사용한다.
  • ex)

    // bad
    function user(options) {
      this.name = options.name;
    }
    
    const bad = new user({
      name: 'nope',
    });
    
    // good
    class User {
      constructor(options) {
        this.name = options.name;
      }
    }
    
    const good = new User({
      name: 'yup',
    });
  1. 함수 이름은 동사 + 명사 형태로 작성한다. ex) postUserInformation( )
  2. 약어 사용은 최대한 지양한다.
  3. 이름에 네 단어 이상이 들어가면 팀원과 상의를 거친 후 사용한다
블록(Blocks)
  1. 복수행의 블록에는 중괄호({})를 사용한다.
  • ex)

    // bad
    if (test)
      return false;
    
    // good
    if (test) return false;
    
    // good
    if (test) {
      return false;
    }
    
    // bad
    function() { return false; }
    
    // good
    function() {
      return false;
    }
  1. 복수행 블록의 ifelse 를 이용하는 경우 elseif 블록 끝의 중괄호( } )와 같은 행에 위치시킨다.
  • ex)

    // bad
    if (test) {
      thing1();
      thing2();
    } 
    else {
      thing3();
    }
    
    // good
    if (test) {
      thing1();
      thing2();
    } else {
      thing3();
    }
코멘트(Comments)
  1. 복수형의 코멘트는 /** ... */ 를 사용한다.
  • ex)

    // good
    /**
     * @param {String} tag
     * @return {Element} element
     */
    function make(tag) {
      // ...stuff...
    
      return element;
    }
  1. 단일 행의 코멘트에는 // 을 사용하고 코멘트를 추가하고 싶은 코드의 상부에 배치한다. 그리고 코멘트의 앞에 빈 행을 넣는다.
  • ex)

    // bad
    const active = true; // is current tab
    
    // good
    // is current tab
    const active = true;
    
    // good
    function getType() {
      console.log('fetching type...');
    
      // set the default type to 'no type'
      const type = this._type || 'no type';
    
      return type;
    }
문자열(Strings)
  1. 문자열에는 싱크쿼트 '' 를 사용한다.
  • ex)

    // bad
    const name = "Capt. Janeway";
    
    // good
    const name = 'Capt. Janeway';
  1. 프로그램에서 문자열을 생성하는 경우는 문자열 연결이 아닌 template strings를 이용한다.
  • ex)

    // bad
    function sayHi(name) {
      return 'How are you, ' + name + '?';
    }
    
    // bad
    function sayHi(name) {
      return ['How are you, ', name, '?'].join();
    }
    
    // good
    function sayHi(name) {
      return `How are you, ${name}?`;
    }
함수(Functions)
  1. 화살표 함수를 사용한다.
  • ex)

     var arr1 = [1, 2, 3];
      var pow1 = arr.map(function (x) { // ES5 Not Good
        return x * x;
      });
    
      const arr2 = [1, 2, 3];
      const pow2 = arr.map(x => x * x); // ES6 Good
조건식과 등가식(Comparison Operators & Equality)
  1. == 이나 != 보다 ===!== 을 사용한다.
  2. 단축형을 사용한다.
  • ex)

    // bad
    if (name !== '') {
      // ...stuff...
    }
    
    // good
    if (name) {
      // ...stuff...
    }
  1. 비동기 함수를 사용할 때 Promise함수의 사용은 지양하고 async, await를 쓰도록 한다


🧳 Branch

🌱 git branch 전략

main branch : 배포 단위 branch

develop branch : 주요 개발 branch, main merge 전 거치는 branch

feature branch: 각자 개발 branch

  • 할 일 issue 등록 후 issue 번호로 branch 생성 후 작업
    • ex) feature/#issue num
  • 해당 branch 작업 완료 후 PR 보내기
    • 항상 local에서 충돌 해결 후 → remote에 올리기
    • reviewer에 서로 tag후 code-review
    • comment 전 merge 불가!

branch 구조

- main
- develop
- feature
   ├── #1
   └── #2


🧳 Commit Convention

👻 git commit message convention

ex) [FEAT]/#issue num User API 파일 추가

- [CHORE]: 코드 수정, 내부 파일 수정
- [FEAT] : 새로운 기능 구현
- [ADD] : Feat 이외의 부수적인 코드 추가, 라이브러리 추가, 새로운 파일 생성 
- [FIX] : 버그, 오류 해결
- [DEL] : 쓸모없는 코드 삭제
- [DOCS] : README나 WIKI 등의 문서 개정
- [MOVE] : 프로젝트  파일이나 코드의 이동
- [RENAME] : 파일 이름의 변경
- [MERGE]: 다른브렌치를 merge하는 경우
- [STYLE] : 코드가 아닌 스타일 변경을 하는 경우
- [INIT] : Initial commit을 하는 경우

About

Packman - Node 1차 릴리즈

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published