Skip to content

Packman - Spring 2์ฐจ ๋ฆด๋ฆฌ์ฆˆ๐Ÿƒ

Notifications You must be signed in to change notification settings

Team-Packman/Packman-Server-Spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงณ Packman

๋‚ด ์†์•ˆ์˜ ์ง ์ฑ™๊น€ ๋„์šฐ๋ฏธ, ํŒฉ๋งจ (Spring ver.)
2023.01.16 ~

๐Ÿงณ Server Architecture



๐Ÿงณ Contributors

๋ฐ•ํ˜„์ง€ ๊น€๊ฒฝ๋ฆฐ ์žฅ์„œํฌ
dingding-21 kkl4846 laalaa31


๐Ÿงณ Service Core Function

20 21 22 23 24 25 26 27 28



๐Ÿงณ 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. ๋ณต์ˆ˜ํ–‰ ๋ธ”๋ก์˜ if ์™€ else ๋ฅผ ์ด์šฉํ•˜๋Š” ๊ฒฝ์šฐ else ๋Š” if ๋ธ”๋ก ๋์˜ ์ค‘๊ด„ํ˜ธ( } )์™€ ๊ฐ™์€ ํ–‰์— ์œ„์น˜์‹œํ‚จ๋‹ค.
  • 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

  • ํ•  ์ผ jira issue ๋“ฑ๋ก ํ›„ jira issue ๋ฒˆํ˜ธ๋กœ branch ์ƒ์„ฑ ํ›„ ์ž‘์—…
    • ex) feature/jira issue num
  • ํ•ด๋‹น branch ์ž‘์—… ์™„๋ฃŒ ํ›„ PR ๋ณด๋‚ด๊ธฐ
    • ํ•ญ์ƒ local์—์„œ ์ถฉ๋Œ ํ•ด๊ฒฐ ํ›„ โ†’ remote์— ์˜ฌ๋ฆฌ๊ธฐ
    • reviewer์— ์„œ๋กœ tagํ›„ code-review
    • comment ์ „ merge ๋ถˆ๊ฐ€!

branch ๊ตฌ์กฐ

- main
- develop
- feature
   โ”œโ”€โ”€ PS-13
   โ””โ”€โ”€ PS-14


๐Ÿงณ Commit Convention

๐Ÿ‘ป git commit message convention

ex) feat: User API ํŒŒ์ผ ์ถ”๊ฐ€

- feat : ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€
- fix : ๋ฒ„๊ทธ ์ˆ˜์ •
- docs : ๋ฌธ์„œ ๊ด€๋ จ
- style : ์Šคํƒ€์ผ ๋ณ€๊ฒฝ (ํฌ๋งคํŒ… ์ˆ˜์ •, ๋“ค์—ฌ์“ฐ๊ธฐ ์ถ”๊ฐ€, โ€ฆ)
- refactor : ์ฝ”๋“œ ๋ฆฌํŒฉํ† ๋ง
- test : ํ…Œ์ŠคํŠธ ๊ด€๋ จ ์ฝ”๋“œ
- build : ๋นŒ๋“œ ๊ด€๋ จ ํŒŒ์ผ ์ˆ˜์ •
- ci : CI ์„ค์ • ํŒŒ์ผ ์ˆ˜์ •
- perf : ์„ฑ๋Šฅ ๊ฐœ์„ 
- chore : ๊ทธ ์™ธ ์ž์ž˜ํ•œ ์ˆ˜์ •

About

Packman - Spring 2์ฐจ ๋ฆด๋ฆฌ์ฆˆ๐Ÿƒ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published