Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
[#22] 문서 및 editorconfig 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chanhyeong committed Oct 14, 2021
1 parent c68e48b commit eb53438
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 0 deletions.
123 changes: 123 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_size = 4
indent_style = space
max_line_length = 150
ij_continuation_indent_size = 4
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = false
ij_smart_tabs = false
ij_wrap_on_typing = false
ij_any_while_on_new_line = false

[.editorconfig]
ij_editorconfig_align_group_field_declarations = false
ij_editorconfig_space_after_colon = false
ij_editorconfig_space_after_comma = true
ij_editorconfig_space_before_colon = false
ij_editorconfig_space_before_comma = false
ij_editorconfig_spaces_around_assignment_operators = true

[*.{kt,kts}]
ij_kotlin_align_in_columns_case_branch = false
ij_kotlin_align_multiline_binary_operation = false
ij_kotlin_align_multiline_extends_list = false
ij_kotlin_align_multiline_method_parentheses = false
ij_kotlin_align_multiline_parameters = false
ij_kotlin_align_multiline_parameters_in_calls = false
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ij_kotlin_assignment_wrap = normal
ij_kotlin_blank_lines_after_class_header = 0
ij_kotlin_blank_lines_around_block_when_branches = 0
ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1
ij_kotlin_block_comment_at_first_column = true
ij_kotlin_call_parameters_new_line_after_left_paren = true
ij_kotlin_call_parameters_right_paren_on_new_line = true
ij_kotlin_call_parameters_wrap = on_every_item
ij_kotlin_catch_on_new_line = false
ij_kotlin_class_annotation_wrap = split_into_lines
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
ij_kotlin_continuation_indent_for_chained_calls = false
ij_kotlin_continuation_indent_for_expression_bodies = false
ij_kotlin_continuation_indent_in_argument_lists = false
ij_kotlin_continuation_indent_in_elvis = false
ij_kotlin_continuation_indent_in_if_conditions = false
ij_kotlin_continuation_indent_in_parameter_lists = false
ij_kotlin_continuation_indent_in_supertype_lists = false
ij_kotlin_else_on_new_line = false
ij_kotlin_enum_constants_wrap = off
ij_kotlin_extends_list_wrap = normal
ij_kotlin_field_annotation_wrap = split_into_lines
ij_kotlin_finally_on_new_line = false
ij_kotlin_if_rparen_on_new_line = true
ij_kotlin_import_nested_classes = false
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
ij_kotlin_keep_blank_lines_before_right_brace = 0
ij_kotlin_keep_blank_lines_in_code = 1
ij_kotlin_keep_blank_lines_in_declarations = 1
ij_kotlin_keep_first_column_comment = true
ij_kotlin_keep_indents_on_empty_lines = false
ij_kotlin_keep_line_breaks = true
ij_kotlin_lbrace_on_next_line = false
ij_kotlin_line_comment_add_space = true
ij_kotlin_line_comment_at_first_column = false
ij_kotlin_method_annotation_wrap = split_into_lines
ij_kotlin_method_call_chain_wrap = normal
ij_kotlin_method_parameters_new_line_after_left_paren = true
ij_kotlin_method_parameters_right_paren_on_new_line = true
ij_kotlin_method_parameters_wrap = on_every_item
ij_kotlin_name_count_to_use_star_import = 2147483647
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
# 자동 static import 설정
#ij_kotlin_packages_to_use_import_on_demand =
ij_kotlin_imports_layout = *, kotlin.**, java.**, javax.**, org.**, io.github.chanhyeong.**, ^"
ij_kotlin_parameter_annotation_wrap = off
ij_kotlin_space_after_comma = true
ij_kotlin_space_after_extend_colon = true
ij_kotlin_space_after_type_colon = true
ij_kotlin_space_before_catch_parentheses = true
ij_kotlin_space_before_comma = false
ij_kotlin_space_before_extend_colon = true
ij_kotlin_space_before_for_parentheses = true
ij_kotlin_space_before_if_parentheses = true
ij_kotlin_space_before_lambda_arrow = true
ij_kotlin_space_before_type_colon = false
ij_kotlin_space_before_when_parentheses = true
ij_kotlin_space_before_while_parentheses = true
ij_kotlin_spaces_around_additive_operators = true
ij_kotlin_spaces_around_assignment_operators = true
ij_kotlin_spaces_around_equality_operators = true
ij_kotlin_spaces_around_function_type_arrow = true
ij_kotlin_spaces_around_logical_operators = true
ij_kotlin_spaces_around_multiplicative_operators = true
ij_kotlin_spaces_around_range = false
ij_kotlin_spaces_around_relational_operators = true
ij_kotlin_spaces_around_unary_operator = false
ij_kotlin_spaces_around_when_arrow = true
ij_kotlin_variable_annotation_wrap = off
ij_kotlin_wrap_elvis_expressions = 1
ij_kotlin_wrap_expression_body_functions = 1
ij_kotlin_wrap_first_method_in_call_chain = false
# noinspection EditorConfigKeyCorrectness
disabled_rules = import-ordering

[**/sql/*.kt]
max_line_length = 1000

[*.properties]
ij_properties_align_group_field_declarations = false
ij_properties_keep_blank_lines = false
ij_properties_key_value_delimiter = equals
ij_properties_spaces_around_key_value_delimiter = false

[{*.yaml, *.yml}]
indent_size = 2
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
39 changes: 39 additions & 0 deletions docs/CONVENTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# CONVENTION

## 커밋 로그

`[#이슈번호] 수정 내용` 의 형태로 커밋을 작성한다

## IDE 에서 자동으로 convention 을 맞추도록 설정

### 2021 이상의 버전인 경우

![image](https://user-images.githubusercontent.com/10507662/137309837-bb0d5d86-ba4a-413b-8365-a20f8a94b663.png)

`Tools > Actions on Save` 에서 상위 이미지와 같이 설정

### 하위 버전인 경우

![image](https://user-images.githubusercontent.com/10507662/137310119-039d3d45-e9e0-4ee8-9284-0d094c1ac034.png)

`Save Actions` 설치하여 상위 이미지와 같이 설정

## 모듈 및 패키지 구성

- Bounded Context 는 하나의 모듈로 분리한다
- Aggregate 는 하나의 패키지를 각각 갖는다
- Bounded Context 간의 통신은 API 등으로 진행한다
- DDD 의 기본적인 패키지 구조는 사내 툴을 따른다
- 하나의 Aggregate 내에 domains, dtos, listeners, repositories

## 기본적인 코딩 컨벤션

kotlin 공식 룰을 따름 - https://kotlinlang.org/docs/coding-conventions.html

## 구성

- Event 는 Spring 에서 제공하는 것으로 사용한다 (`ApplicationEventPublisher`)

## Authentication

user 모듈에서 로그인하고 정보를 쿠키에 담고 그 외 모듈에서 쿠키에 있는 데이터를 user 에 요청하여 사용자 정보를 얻는다
12 changes: 12 additions & 0 deletions docs/ENVIRONMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ENVIRONMENT

## Profile 구성

- local
- test
- real

## Database

- test: h2
- local/real: MySQL 등의 RDB (TODO)

0 comments on commit eb53438

Please sign in to comment.