Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
29deab7
feat: 전체 문서 제목 조회 API 추가
poketopa Jun 6, 2026
9bc5c41
refactor: 테스트 코드 Assertions.that -> assertThat 변경
poketopa Jun 6, 2026
f544b90
refactor: public 메서드 @Transactional 제거 (클래스 레벨 애노테이션으로 인한 중복 발생)
poketopa Jun 6, 2026
1d271c5
refactor: 전체 문서 제목 조회 쿼리 ORDER BY 절 제거
poketopa Jun 12, 2026
a6698fa
Merge pull request #168 from Crew-Wiki/feat/167
poketopa Jun 21, 2026
6f3a3e5
chore: dev 수동 배포 트리거 추가
sun007021 Jul 3, 2026
36a8d3a
test: 전체 문서 제목 조회 테스트에 문서 타입 및 생성일 반환 테스트 추가
jyt6640 Jul 8, 2026
60fad89
feat: Document에 읽기 전용 dtype 필드 추가
jyt6640 Jul 8, 2026
974d814
feat: dtype, generateTime 필드 조회 추가
jyt6640 Jul 8, 2026
dcad2ac
feat: DocumentTitleListResponse에 DocumentType, generateTime 필드 추가
jyt6640 Jul 8, 2026
fdc6628
refactor: 기존 dtype String에서 Enum으로 타입 변환
jyt6640 Jul 8, 2026
6131ba1
style: EOF 개행 추가
jyt6640 Jul 11, 2026
7526666
Merge pull request #170 from Crew-Wiki/feat/169
poketopa Jul 17, 2026
90c51e2
feat: 기수별 크루 목록 조회 API 추가
sun007021 Jul 20, 2026
3f9ea52
Merge pull request #172 from Crew-Wiki/feat/171-crew-list
poketopa Jul 21, 2026
d3afe30
refactor: 파라미터 2개 이상인 메서드/생성자/record에 대해 전역 줄바꿈 컨벤션 적용
poketopa Jul 28, 2026
23fd574
Merge pull request #175 from Crew-Wiki/feat/174
jyt6640 Jul 28, 2026
acac146
fix: 기수별 크루 조회 시 조직 문서 제목을 그대로 사용하도록 수정
poketopa Jul 28, 2026
c6e6e7d
Merge pull request #176 from Crew-Wiki/feat/173
poketopa Jul 28, 2026
fcd7ded
feat: 기수별 크루 그래프 노드 조회 API 추가
poketopa Jul 29, 2026
7fea34d
feat: 크루 문서 참조 UUID 추출기 생성
poketopa Jul 29, 2026
e4a9ac7
feat: 크루 문서 참조 기반 그래프 간선 추가
poketopa Jul 29, 2026
15a6f74
Merge pull request #178 from Crew-Wiki/feat/177
poketopa Jul 29, 2026
b7b8645
feat: 그래프 조직 노드와 소속 간선 타입 추가
poketopa Jul 29, 2026
c25a067
feat: 기수별 크루의 조직 연결 조회 쿼리 추가
poketopa Jul 29, 2026
4d6fdb0
feat: 선택 조직 노드와 조직 연결 간선 생성
poketopa Jul 29, 2026
5763eb9
feat: 선택 조직 노드와 조직 연결 간선 생성
poketopa Jul 30, 2026
c3b31eb
fix: 선택 조직 요청 파라미터 바인딩 수정
poketopa Jul 30, 2026
ba9d89b
Merge pull request #180 from Crew-Wiki/feat/179
jyt6640 Jul 31, 2026
1276c4b
fix: 운영 프론트엔드 www 도메인을 CORS 허용 목록에 추가
poketopa Aug 1, 2026
76059e2
Merge pull request #182 from Crew-Wiki/feat/181
poketopa Aug 1, 2026
f9b00b1
chore: PR 템플릿 경로 및 형식 개선
poketopa Aug 1, 2026
65b0eeb
Merge pull request #184 from Crew-Wiki/feat/183
poketopa Aug 1, 2026
2a9e6ab
Merge branch 'main' into develop
poketopa Aug 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/pull_request_template.md

This file was deleted.

18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## 관련 이슈
<!-- 이 PR이 병합될 때 종료할 이슈 번호를 입력해주세요. -->
Closes #

## 변경 배경
<!-- 이 변경이 필요한 문제와 이유를 설명해주세요. -->

## 변경 내용
<!-- 주요 변경사항을 항목별로 작성해주세요. -->

## 검증
<!-- 실행한 테스트와 수동 검증 결과를 작성해주세요. -->

- [ ] 테스트 통과
- [ ] 변경 동작 확인

## 영향 및 참고사항
<!-- API, DB, 배포 설정, 호환성, 롤백 등 리뷰어가 알아야 할 내용이 없다면 "없음"으로 작성해주세요. -->
7 changes: 4 additions & 3 deletions .github/workflows/dev-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ name: dev-cd.yml

on:
push:
branches: ["develop"]
branches: [ "develop" ]
paths:
- "**"
workflow_dispatch:

jobs:
build-and-push:
runs-on: [self-hosted, crew-wiki-dev]
runs-on: [ self-hosted, crew-wiki-dev ]
env:
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/crew-wiki
steps:
Expand Down Expand Up @@ -50,7 +51,7 @@ jobs:

deploy:
needs: build-and-push
runs-on: [self-hosted, crew-wiki-dev]
runs-on: [ self-hosted, crew-wiki-dev ]
env:
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/crew-wiki:dev-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
PROD_DB_URL=${{ secrets.PROD_DB_URL }}
PROD_DB_USERNAME=${{ secrets.PROD_DB_USERNAME }}
PROD_DB_PASSWORD=${{ secrets.PROD_DB_PASSWORD }}
CORS_ALLOWED_ORIGINS=${{ secrets.PROD_CORS_ALLOWED_ORIGINS || 'https://crew-wiki.site,https://api.crew-wiki.site' }}
CORS_ALLOWED_ORIGINS=${{ secrets.PROD_CORS_ALLOWED_ORIGINS || 'https://crew-wiki.site,https://www.crew-wiki.site,https://api.crew-wiki.site' }}
SWAGGER_SERVER_URL=${{ secrets.PROD_SWAGGER_SERVER_URL || 'https://api.crew-wiki.site' }}
AWS_CREDENTIALS_ACCESS_KEY=${{ secrets.AWS_CREDENTIALS_ACCESS_KEY }}
AWS_CREDENTIALS_SECRET_KEY=${{ secrets.AWS_CREDENTIALS_SECRET_KEY }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ application-*.yml
!src/main/resources/application-prod.yml
.env
.env.*

### AI ###
.omc
.omx
5 changes: 4 additions & 1 deletion src/main/java/com/wooteco/wiki/admin/domain/Admin.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ public class Admin {
protected Admin() {
}

public Admin(String loginId, String password) {
public Admin(
String loginId,
String password
) {
this.loginId = loginId;
this.password = password;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package com.wooteco.wiki.admin.domain.dto;

public record LoginRequest(String loginId, String password) {
public record LoginRequest(
String loginId,
String password
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@

public interface AdminRepository extends JpaRepository<Admin, Long> {

Optional<Admin> findOneByLoginIdAndPassword(String loginId, String password);
Optional<Admin> findOneByLoginIdAndPassword(
String loginId,
String password
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ public DocumentResponse getRandom() {
}

@Transactional
public DocumentResponse update(UUID uuid, DocumentUpdateRequest request) {
public DocumentResponse update(
UUID uuid,
DocumentUpdateRequest request
) {
CrewDocument crewDocument = crewDocumentRepository.findByUuid(uuid)
.orElseThrow(() -> new WikiException(ErrorCode.DOCUMENT_NOT_FOUND));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.wooteco.wiki.document.controller;

import com.wooteco.wiki.document.dto.GenerationCrewResponse;
import com.wooteco.wiki.document.service.CrewDocumentQueryService;
import com.wooteco.wiki.global.common.ApiResponse;
import com.wooteco.wiki.global.common.ApiResponse.SuccessBody;
import com.wooteco.wiki.global.common.ApiResponseGenerator;
import io.swagger.v3.oas.annotations.Operation;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/document")
public class CrewDocumentQueryController {

private final CrewDocumentQueryService crewDocumentQueryService;

@Operation(summary = "기수별 크루 목록 조회", description = "기수에 속한 크루의 이름, 문서 UUID, 분야를 조회합니다.")
@GetMapping("/crews")
public ApiResponse<SuccessBody<List<GenerationCrewResponse>>> findAllByGeneration(
@RequestParam String generation
) {
List<GenerationCrewResponse> response = crewDocumentQueryService.findAllByGeneration(generation);
return ApiResponseGenerator.success(response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

import com.wooteco.wiki.admin.service.CrewDocumentService;
import com.wooteco.wiki.document.domain.Document;
import com.wooteco.wiki.document.domain.dto.*;
import com.wooteco.wiki.document.domain.dto.CrewDocumentCreateRequest;
import com.wooteco.wiki.document.domain.dto.DocumentListResponse;
import com.wooteco.wiki.document.domain.dto.DocumentResponse;
import com.wooteco.wiki.document.domain.dto.DocumentSearchResponse;
import com.wooteco.wiki.document.domain.dto.DocumentTitleListResponse;
import com.wooteco.wiki.document.domain.dto.DocumentUpdateRequest;
import com.wooteco.wiki.document.domain.dto.ViewFlushRequest;
import com.wooteco.wiki.document.service.DocumentSearchService;
import com.wooteco.wiki.document.service.DocumentService;
import com.wooteco.wiki.document.service.DocumentServiceJava;
Expand All @@ -21,11 +27,20 @@
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/document")
@RequiredArgsConstructor
public class DocumentController {

private final CrewDocumentService crewDocumentService;
Expand Down Expand Up @@ -56,6 +71,13 @@ public ApiResponse<SuccessBody<PagedResponse<List<DocumentListResponse>>>> findA
return ApiResponseGenerator.success(convertToResponse(responses));
}

@Operation(summary = "위키 글 제목 전체 조회", description = "모든 위키 글의 제목과 UUID를 조회합니다.")
@GetMapping("/titles")
public ApiResponse<SuccessBody<List<DocumentTitleListResponse>>> findAllTitles() {
List<DocumentTitleListResponse> response = documentService.findAllTitles();
return ApiResponseGenerator.success(response);
}

@Operation(summary = "제목으로 위키 글 조회", description = "제목을 통해 위키 글을 조회합니다.")
@GetMapping("title/{title}")
public ApiResponse<SuccessBody<DocumentResponse>> get(@PathVariable String title) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
@Getter
public class CrewDocument extends Document {

public CrewDocument(final String title, final String contents, final String writer,
final Long documentBytes, final UUID uuid) {
public CrewDocument(
final String title,
final String contents,
final String writer,
final Long documentBytes,
final UUID uuid
) {
super(title, contents, writer, documentBytes, uuid);
}

Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/wooteco/wiki/document/domain/CrewField.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.wooteco.wiki.document.domain;

public enum CrewField {

BACKEND,
FRONTEND,
ANDROID
}
15 changes: 13 additions & 2 deletions src/main/java/com/wooteco/wiki/document/domain/Document.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import jakarta.persistence.Column;
import jakarta.persistence.DiscriminatorColumn;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
Expand Down Expand Up @@ -47,8 +49,17 @@ public abstract class Document {
@Column(name = "view_count", nullable = false, columnDefinition = "INT DEFAULT 0 NOT NULL")
protected Integer viewCount = 0;

public Document(final String title, final String contents, final String writer,
final Long documentBytes, final UUID uuid) {
@Enumerated(EnumType.STRING)
@Column(name = "dtype", insertable = false, updatable = false)
private DocumentType dtype;

public Document(
final String title,
final String contents,
final String writer,
final Long documentBytes,
final UUID uuid
) {
this.title = title;
this.contents = contents;
this.writer = writer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
import java.util.UUID;

public record DocumentResponse(
Long documentId,
UUID documentUUID,
String title,
String contents,
String writer,
LocalDateTime generateTime,
Integer viewCount,
Long latestVersion,
List<OrganizationDocumentResponse> organizationDocumentResponses
Long documentId,
UUID documentUUID,
String title,
String contents,
String writer,
LocalDateTime generateTime,
Integer viewCount,
Long latestVersion,
List<OrganizationDocumentResponse> organizationDocumentResponses
) {

public static DocumentResponse toDocumentResponse(
CrewDocument crewDocument,
Long latestVersion,
List<OrganizationDocumentResponse> organizationDocumentResponses
CrewDocument crewDocument,
Long latestVersion,
List<OrganizationDocumentResponse> organizationDocumentResponses
) {
return new DocumentResponse(
crewDocument.getId(),
Expand All @@ -36,4 +36,3 @@ public static DocumentResponse toDocumentResponse(
);
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.wooteco.wiki.document.domain.dto;

import com.wooteco.wiki.document.domain.DocumentType;
import java.time.LocalDateTime;
import java.util.UUID;

public record DocumentTitleListResponse(
String title,
UUID uuid,
DocumentType documentType,
LocalDateTime generateTime
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.wooteco.wiki.document.dto;

import com.wooteco.wiki.document.domain.CrewField;
import java.util.UUID;

public record GenerationCrewResponse(
String name,
UUID documentUuid,
CrewField field
) {

public static GenerationCrewResponse of(
String name,
UUID documentUuid,
CrewField field
) {
return new GenerationCrewResponse(name, documentUuid, field);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.wooteco.wiki.document.repository;

import com.wooteco.wiki.document.domain.Document;
import com.wooteco.wiki.document.domain.dto.DocumentTitleListResponse;
import java.util.List;
import java.util.Optional;
import java.util.Set;
Expand All @@ -17,6 +18,18 @@ public interface DocumentRepository extends JpaRepository<Document, Long> {

List<Document> findAllByTitleStartingWithOrderByTitle(String keyWord);

@Query("""
SELECT new com.wooteco.wiki.document.domain.dto.DocumentTitleListResponse(
d.title,
d.uuid,
d.dtype,
d.generateTime
)
FROM Document d
ORDER BY d.title ASC
""")
List<DocumentTitleListResponse> findAllTitles();

Optional<Document> findByUuid(UUID uuid);

@Query("SELECT d.uuid FROM Document d WHERE d.title = :title")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.wooteco.wiki.document.repository;

import java.util.UUID;

public record GenerationCrewOrganizationReadModel(
String crewTitle,
UUID documentUuid,
String organizationTitle
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.wooteco.wiki.document.repository;

import java.util.List;

public interface GenerationCrewQueryRepository {

List<GenerationCrewOrganizationReadModel> findAllByGenerationTitle(String generationTitle);
}
Loading
Loading