Skip to content

Commit

Permalink
Add 'tagify/' from commit '99f62059c5e55f7b00dcfd1102fcc42085a16fa5'
Browse files Browse the repository at this point in the history
git-subtree-dir: tagify
git-subtree-mainline: f096726
git-subtree-split: 99f6205
  • Loading branch information
jhl8109 committed Jul 17, 2024
2 parents f096726 + 99f6205 commit 912dfaf
Show file tree
Hide file tree
Showing 41 changed files with 1,652 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tagify/.github/ISSUE_TEMPLATE/bug-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug Issue
about: 'Issue template for bug '
title: "[BUG]"
labels: bug, feature
assignees: jhl8109

---

## 어떤 버그인가요?

> 어떤 버그인지 간결하게 설명해주세요
## 어떤 상황에서 발생한 버그인가요?

> (가능하면) Given-When-Then 형식으로 서술해주세요
## 예상 결과

> 예상했던 정상적인 결과가 어떤 것이었는지 설명해주세요
## 참고할만한 자료(선택)
20 changes: 20 additions & 0 deletions tagify/.github/ISSUE_TEMPLATE/new-feature-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: New Feature Issue
about: Issue template for new feature
title: "[FEAT]"
labels: feature
assignees: jhl8109

---

## 어떤 기능인가요?

> 추가하려는 기능에 대해 간결하게 설명해주세요
## 작업 상세 내용

- [ ] TODO
- [ ] TODO
- [ ] TODO

## 참고할만한 자료(선택)
15 changes: 15 additions & 0 deletions tagify/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## #️⃣연관된 이슈

> ex) #이슈번호, #이슈번호
## 📝작업 내용

> 이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)
### 스크린샷 (선택)

## 💬리뷰 요구사항(선택)

> 리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요
>
> ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?
30 changes: 30 additions & 0 deletions tagify/.github/workflows/jib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Push Docker Image

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Build and Push Docker Image with Jib
run: ./gradlew jib
24 changes: 24 additions & 0 deletions tagify/.github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PR Test

on:
pull_request:
branches: [ main ] # master branch에 PR을 보낼 때 실행

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21

# Gradle wrapper 파일 실행 권한주기
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Gradle test를 실행한다
- name: Test with Gradle
run: ./gradlew --info test
40 changes: 40 additions & 0 deletions tagify/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Kotlin ###
.kotlin
22 changes: 22 additions & 0 deletions tagify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Tagify

LLM을 기반으로 이미지, pdf 등 파일에 대한 태그를 붙인다.
저장된 태그를 통해 파일을 효율적으로 검색한다.

## 프로젝트의 목적과 의도
- TDD를 프로젝트에 적용해본다. 특히, Classist 고전파 스타일로 Mock보다 Pojo 객체를 적극적으로 활용한 테스트 코드를 작성한다.
- AI를 활용해본다. 구체적 모델, 학습, 튜닝에는 의존하지 않으며, AI가 어떻게 서비스에 활용될 수 있는 지 프로세스를 이해하기 위함이다.
- 코틀린 역량을 향상시킨다. 구체적으로 코틀린 언어에 대해 학습하며, 코틀린+스프링 기술을 실습을 통해 체화한다. <br>
> #### 결과적으로 추구해야할 방향성은 새로운 기술을 용하는 것에 끝나지 않고, 코드 퀄리티 향상에 집중한다.

## 예상 기술 스택
인프라 : AWS (k3s??) <br>
운영 : git action CI, argoCD <br>
서버 : Spring Boot 3.x , Kotlin 2.0 <br>
저장소 : Elasticsearch <br>

## 추가 기능 및 향후 방향성 간략 정리
- [ ] PDF 인식 후 태그 추론 기능을 추가한다.
- [ ] [Core](https://github.com/ZZIBU/Core)에서 개발 중인 파일(이미지 + PDF) 관리 서비스와 통합한다.
- [ ] 이를 통해 파일들을 클라우드 스토리지에 저장할 뿐만 아니라, 태그 기반 파일 검색을 지원한다.
99 changes: 99 additions & 0 deletions tagify/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
plugins {
id("org.springframework.boot") version "3.3.0"
id("io.spring.dependency-management") version "1.1.5"
id("com.google.cloud.tools.jib") version "3.4.1"
kotlin("jvm") version "1.9.24"
kotlin("plugin.spring") version "1.9.24"
}

group = "zzibu.jeho"
version = "0.0.1-SNAPSHOT"
val projectOwner : String by project

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}

repositories {
mavenCentral()
maven {
url = uri("https://repo.spring.io/milestone")
url = uri("https://repo.spring.io/snapshot")
}
}

dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-elasticsearch")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")

// spring ai
implementation("org.springframework.ai:spring-ai-ollama-spring-boot-starter:1.0.0-SNAPSHOT")

// kotlin-logging
implementation("io.github.oshai:kotlin-logging-jvm:5.1.1")

// PDFBox
implementation("org.apache.pdfbox:pdfbox:2.0.24")

// Tesseract (OCR Dependency)
implementation("net.sourceforge.tess4j:tess4j:5.4.0")

annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")

// kotest
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("io.kotest:kotest-runner-junit5:5.4.2")
testImplementation("io.kotest:kotest-assertions-core:5.4.2")
testImplementation("io.kotest.extensions:kotest-extensions-spring:1.1.2")

testRuntimeOnly("org.junit.platform:junit-platform-launcher")
implementation(kotlin("stdlib-jdk8"))
}

kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict")
}
}

// Jib 플러그인 설정
jib {
from {
image = "openjdk:21-jdk-slim"
}
to {
image = "${projectOwner}/${project.name.lowercase()}"
tags = setOf("$version", "latest")
}
container {
labels = mapOf(
"maintainer" to "Jeho Lee <[email protected]>",
"org.opencontainers.image.title" to "tagify",
"org.opencontainers.image.description" to "Tagging for all of your files",
"org.opencontainers.image.version" to "$version",
"org.opencontainers.image.authors" to "Jeho Lee <[email protected]>",
"org.opencontainers.image.url" to "https://github.com/ZZIBU/Tagify"
)
jvmFlags = listOf(
"-Xms512m",
"-Xmx1024m"
)
ports = listOf("8080")
}
}

tasks.withType<Test> {
useJUnitPlatform()
exclude("**/Bean*Test.class", "**/*ControllerTest.class")
}
1 change: 1 addition & 0 deletions tagify/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
projectOwner=jhl8109
Binary file added tagify/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions tagify/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 912dfaf

Please sign in to comment.