Skip to content

Commit

Permalink
Merge pull request #154 from makevook/issue/151,152,153
Browse files Browse the repository at this point in the history
refactor,chore,docs: 템플릿 용어집 도메인 분리, 미사용 의존성 제거, 문서 최신화
  • Loading branch information
seungyeop-lee authored Jul 15, 2024
2 parents 558d356 + b7f893e commit 475ab70
Show file tree
Hide file tree
Showing 33 changed files with 111 additions and 124 deletions.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
# vook-server
# Vook Server

- [Introduction](docs/introduction/240622/README.md)
- [DB Schema](docs/schema/README.md)
<br />

<p align="center">
<a href="https://vook.app">
<img src="docs/introduction/240622/assets/logo.svg" alt="Vook Logo" width="170">
</a>
</p>

<br />

<p align="center"><b>드래그앤드롭</b>으로 용어의 의미를 가장 쉽고 빠르게 찾는 방법</p>

<p align="center">
<img
src="docs/introduction/240622/assets/drag-and-drop.png"
alt="Vook Chrome Extension"
width="50%"
/>
</p>

<p align="center">
<a href="docs/diagram"><b>Diagram</b></a> •
<a href="docs/schema"><b>Schema</b></a>
</p>

<br />
1 change: 0 additions & 1 deletion api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ dependencies {

// spring modulith
implementation 'org.springframework.modulith:spring-modulith-starter-core'
implementation 'org.springframework.modulith:spring-modulith-starter-jpa'
testImplementation 'org.springframework.modulith:spring-modulith-starter-test'

// lombok
Expand Down
10 changes: 5 additions & 5 deletions api/src/main/java/vook/server/api/devhelper/app/InitService.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import vook.server.api.domain.demo.model.DemoTerm;
import vook.server.api.domain.demo.model.DemoTermRepository;
import vook.server.api.domain.demo.model.DemoTermSynonymRepository;
import vook.server.api.domain.template_vocabulary.logic.TemplateVocabularyLogic;
import vook.server.api.domain.template_vocabulary.logic.dto.TemplateVocabularyCreateCommand;
import vook.server.api.domain.template_vocabulary.model.TemplateTermRepository;
import vook.server.api.domain.template_vocabulary.model.TemplateVocabularyRepository;
import vook.server.api.domain.template_vocabulary.model.TemplateVocabularyType;
import vook.server.api.domain.user.model.SocialUserRepository;
import vook.server.api.domain.user.model.UserInfoRepository;
import vook.server.api.domain.user.model.UserRepository;
import vook.server.api.domain.vocabulary.logic.TemplateVocabularyLogic;
import vook.server.api.domain.vocabulary.logic.dto.TemplateVocabularyCreateCommand;
import vook.server.api.domain.vocabulary.model.TemplateTermRepository;
import vook.server.api.domain.vocabulary.model.TemplateVocabularyRepository;
import vook.server.api.domain.vocabulary.model.TemplateVocabularyType;
import vook.server.api.domain.vocabulary.model.TermRepository;
import vook.server.api.infra.search.demo.MeilisearchDemoTermSearchService;
import vook.server.api.infra.vocabulary.cache.UserVocabularyCacheRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vook.server.api.domain.vocabulary.model;
package vook.server.api.domain.common.model;

import jakarta.persistence.Embeddable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package vook.server.api.domain.vocabulary.logic;
package vook.server.api.domain.template_vocabulary.logic;

import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import vook.server.api.domain.vocabulary.logic.dto.TemplateVocabularyCreateCommand;
import vook.server.api.domain.vocabulary.model.*;
import vook.server.api.domain.template_vocabulary.logic.dto.TemplateVocabularyCreateCommand;
import vook.server.api.domain.template_vocabulary.model.*;
import vook.server.api.globalcommon.annotation.DomainLogic;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package vook.server.api.domain.vocabulary.logic.dto;
package vook.server.api.domain.template_vocabulary.logic.dto;

import vook.server.api.domain.vocabulary.model.TemplateTerm;
import vook.server.api.domain.vocabulary.model.TemplateVocabulary;
import vook.server.api.domain.vocabulary.model.TemplateVocabularyType;
import vook.server.api.domain.template_vocabulary.model.TemplateTerm;
import vook.server.api.domain.template_vocabulary.model.TemplateVocabulary;
import vook.server.api.domain.template_vocabulary.model.TemplateVocabularyType;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package vook.server.api.domain.vocabulary.model;
package vook.server.api.domain.template_vocabulary.model;

import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Getter;
import vook.server.api.domain.common.model.Synonym;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vook.server.api.domain.vocabulary.model;
package vook.server.api.domain.template_vocabulary.model;

import org.springframework.data.jpa.repository.JpaRepository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vook.server.api.domain.vocabulary.model;
package vook.server.api.domain.template_vocabulary.model;

import jakarta.persistence.*;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vook.server.api.domain.vocabulary.model;
package vook.server.api.domain.template_vocabulary.model;

import org.springframework.data.jpa.repository.JpaRepository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vook.server.api.domain.vocabulary.model;
package vook.server.api.domain.template_vocabulary.model;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@ApplicationModule(
type = ApplicationModule.Type.OPEN,
displayName = "Template Vocabulary Domain",
allowedDependencies = {
"vook.server.api.domain.common"
}
)
package vook.server.api.domain.template_vocabulary;

import org.springframework.modulith.ApplicationModule;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.AccessLevel;
import lombok.Getter;
import vook.server.api.domain.common.model.BaseEntity;
import vook.server.api.domain.common.model.Synonym;

import java.util.List;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"vook.server.api.web.common",
"vook.server.api.domain.user",
"vook.server.api.domain.vocabulary",
"vook.server.api.domain.template_vocabulary"
}
)
package vook.server.api.web.user;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package vook.server.api.web.user.usecase;

import lombok.RequiredArgsConstructor;
import vook.server.api.domain.template_vocabulary.logic.TemplateVocabularyLogic;
import vook.server.api.domain.template_vocabulary.model.TemplateTerm;
import vook.server.api.domain.template_vocabulary.model.TemplateVocabularyType;
import vook.server.api.domain.user.logic.UserLogic;
import vook.server.api.domain.user.logic.dto.UserOnboardingCommand;
import vook.server.api.domain.user.model.Funnel;
import vook.server.api.domain.user.model.Job;
import vook.server.api.domain.vocabulary.logic.TemplateVocabularyLogic;
import vook.server.api.domain.vocabulary.logic.TermLogic;
import vook.server.api.domain.vocabulary.logic.VocabularyLogic;
import vook.server.api.domain.vocabulary.logic.dto.TermCreateAllCommand;
import vook.server.api.domain.vocabulary.logic.dto.VocabularyCreateCommand;
import vook.server.api.domain.vocabulary.model.TemplateTerm;
import vook.server.api.domain.vocabulary.model.TemplateVocabularyType;
import vook.server.api.domain.vocabulary.model.UserUid;
import vook.server.api.domain.vocabulary.model.Vocabulary;
import vook.server.api.globalcommon.annotation.UseCase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package vook.server.api.domain.vocabulary.logic;
package vook.server.api.domain.template_vocabulary.logic;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import vook.server.api.domain.vocabulary.logic.dto.TemplateVocabularyCreateCommand;
import vook.server.api.domain.vocabulary.model.*;
import vook.server.api.domain.template_vocabulary.logic.dto.TemplateVocabularyCreateCommand;
import vook.server.api.domain.template_vocabulary.model.*;
import vook.server.api.testhelper.IntegrationTestBase;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import vook.server.api.domain.vocabulary.logic.TemplateVocabularyLogic;
import vook.server.api.domain.vocabulary.logic.dto.TemplateVocabularyCreateCommand;
import vook.server.api.domain.vocabulary.model.TemplateVocabularyType;
import vook.server.api.domain.template_vocabulary.logic.TemplateVocabularyLogic;
import vook.server.api.domain.template_vocabulary.logic.dto.TemplateVocabularyCreateCommand;
import vook.server.api.domain.template_vocabulary.model.TemplateVocabularyType;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import vook.server.api.domain.template_vocabulary.model.TemplateVocabularyType;
import vook.server.api.domain.user.model.Funnel;
import vook.server.api.domain.user.model.Job;
import vook.server.api.domain.user.model.UserRepository;
import vook.server.api.domain.vocabulary.model.TemplateVocabularyType;
import vook.server.api.domain.vocabulary.model.TermRepository;
import vook.server.api.domain.vocabulary.model.UserUid;
import vook.server.api.domain.vocabulary.model.VocabularyRepository;
Expand Down
23 changes: 23 additions & 0 deletions docs/diagram/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Diagram

> Generated by [Spring Modulith](https://spring.io/projects/spring-modulith)
## Overview

![Overview](components.png)

## User Web

![User Web](module-vook.server.api.web.user.png)

## Term Web

![Term Web](module-vook.server.api.web.term.png)

## Vocabulary Web

![Vocabulary Web](module-vook.server.api.web.vocabulary.png)

## Demo Web

![Demo Web](module-vook.server.api.web.demo.png)
Binary file added docs/diagram/components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/diagram/module-vook.server.api.web.demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/diagram/module-vook.server.api.web.term.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/diagram/module-vook.server.api.web.user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 2 additions & 11 deletions docs/schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
| ---- | ------- | ------- | ---- |
| [demo_term](demo_term.md) | 5 | | BASE TABLE |
| [demo_term_synonym](demo_term_synonym.md) | 3 | | BASE TABLE |
| [event_publication](event_publication.md) | 6 | | BASE TABLE |
| [social_user](social_user.md) | 5 | | BASE TABLE |
| [template_term](template_term.md) | 5 | | BASE TABLE |
| [template_vocabulary](template_vocabulary.md) | 2 | | BASE TABLE |
Expand Down Expand Up @@ -38,14 +37,6 @@ erDiagram
varchar_100_ synonym
bigint_20_ demo_term_id FK
}
"event_publication" {
uuid id PK
datetime_6_ completion_date
varchar_255_ event_type
varchar_255_ listener_id
datetime_6_ publication_date
varchar_255_ serialized_event
}
"social_user" {
bigint_20_ id PK
datetime_6_ created_at
Expand All @@ -62,7 +53,7 @@ erDiagram
}
"template_vocabulary" {
bigint_20_ id PK
varchar_20_ name
varchar_20_ type
}
"term" {
bigint_20_ id PK
Expand Down Expand Up @@ -99,7 +90,7 @@ erDiagram
datetime_6_ updated_at
varchar_20_ name
varchar_255_ uid
bigint_20_ user_id
varchar_255_ user_uid
}
```

Expand Down
63 changes: 0 additions & 63 deletions docs/schema/event_publication.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/schema/schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/schema/template_term.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ erDiagram
}
"template_vocabulary" {
bigint_20_ id PK
varchar_20_ name
varchar_20_ type
}
```

Expand Down
12 changes: 6 additions & 6 deletions docs/schema/template_vocabulary.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
```sql
CREATE TABLE `template_vocabulary` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`type` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_7smfim1klyuu5rh21994clsl4` (`name`)
UNIQUE KEY `UKaqlv8ks5rgqvc9wbcoahewmpm` (`type`)
) ENGINE=InnoDB AUTO_INCREMENT=[Redacted by tbls] DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
```

Expand All @@ -21,21 +21,21 @@ CREATE TABLE `template_vocabulary` (
| Name | Type | Default | Nullable | Extra Definition | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | ---------------- | -------- | ------- | ------- |
| id | bigint(20) | | false | auto_increment | [template_term](template_term.md) | | |
| name | varchar(20) | | false | | | | |
| type | varchar(20) | | false | | | | |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (id) |
| UK_7smfim1klyuu5rh21994clsl4 | UNIQUE | UNIQUE KEY UK_7smfim1klyuu5rh21994clsl4 (name) |
| UKaqlv8ks5rgqvc9wbcoahewmpm | UNIQUE | UNIQUE KEY UKaqlv8ks5rgqvc9wbcoahewmpm (type) |

## Indexes

| Name | Definition |
| ---- | ---------- |
| PRIMARY | PRIMARY KEY (id) USING BTREE |
| UK_7smfim1klyuu5rh21994clsl4 | UNIQUE KEY UK_7smfim1klyuu5rh21994clsl4 (name) USING BTREE |
| UKaqlv8ks5rgqvc9wbcoahewmpm | UNIQUE KEY UKaqlv8ks5rgqvc9wbcoahewmpm (type) USING BTREE |

## Relations

Expand All @@ -46,7 +46,7 @@ erDiagram
"template_vocabulary" {
bigint_20_ id PK
varchar_20_ name
varchar_20_ type
}
"template_term" {
bigint_20_ id PK
Expand Down
Loading

0 comments on commit 475ab70

Please sign in to comment.