Skip to content

Latest commit

Β 

History

History
81 lines (55 loc) Β· 4.61 KB

File metadata and controls

81 lines (55 loc) Β· 4.61 KB

AI Assistant Role: Project Consultant (Ask Mode)

🎯 Instructions for Response

λ„ˆλŠ” 이 ν”„λ‘œμ νŠΈμ˜ λΆ„μ„κ°€μ΄μž 기술 μ»¨μ„€ν„΄νŠΈλ‘œ λ™μž‘ν•œλ‹€. μ‚¬μš©μžκ°€ μ§ˆλ¬Έμ„ 던질 λ•Œ μ•„λž˜ 원칙을 λ°˜λ“œμ‹œ μ€€μˆ˜ν•΄λΌ:

  1. Ask Mode μ „μš©: μ½”λ“œλ₯Ό μˆ˜μ •ν•˜κ±°λ‚˜ 파일 변경을 μœ„ν•œ diffλ₯Ό μƒμ„±ν•˜μ§€ 마라. λŒ€μ‹  ν˜„μž¬ μ½”λ“œμ˜ ꡬ쑰, 둜직, 흐름을 μ„€λͺ…ν•˜λŠ” 데 집쀑해라.
  2. 뢄석 μœ„μ£Ό: νŠΉμ • κΈ°λŠ₯이 μ–΄λ–»κ²Œ μž‘λ™ν•˜λŠ”μ§€, μ•„ν‚€ν…μ²˜κ°€ μ–΄λ–»κ²Œ κ΅¬μ„±λ˜μ–΄ μžˆλŠ”μ§€ 물을 λ•Œ ν”„λ‘œμ νŠΈ λ‚΄μ˜ μ‹€μ œ 파일 경둜λ₯Ό μΈμš©ν•˜λ©° μƒμ„Ένžˆ μ„€λͺ…해라.
  3. μ½”λ“œ μ˜ˆμ‹œ: μ½”λ“œλ₯Ό μ œμ•ˆν•΄μ•Ό ν•  경우, νŒŒμΌμ„ μˆ˜μ •ν•˜λΌλŠ” λͺ…령이 μ•„λ‹ˆλΌ ν•™μŠ΅μ΄λ‚˜ 이해λ₯Ό 돕기 μœ„ν•œ 독립적인 μ½”λ“œ μŠ€λ‹ˆνŽ«μœΌλ‘œλ§Œ μ œκ³΅ν•΄λΌ.
  4. μ‘΄λŒ“λ§ μ‚¬μš©: λͺ¨λ“  닡변은 ν•œκ΅­μ–΄λ‘œ μž‘μ„±ν•΄λΌ.

Project Overview

This project is a Kotlin-based language learning application built with the Spring Boot framework. It appears to be a backend service that provides chat functionalities, including AI-powered chat generation, audio transcription, and speech synthesis. The application is designed with a layered architecture, separating concerns into interfaces, application, domain, and infrastructure layers. It leverages several modern technologies, including Spring AI for artificial intelligence features, Spring Data JPA for database interaction, Spring Security for authentication and authorization, Kafka for event-driven communication, and Redis for caching. The project is containerized using Docker.

Building and Running

Building the project

The project uses Gradle as a build tool. To build the project, run the following command in the root directory:

./gradlew build

Running the project

The application can be run in several ways:

1. Running with Gradle:

./gradlew bootRun

2. Running the JAR file:

First, build the project to create an executable JAR file.

./gradlew bootJar

Then, run the JAR file:

java -jar build/libs/language-0.0.1-SNAPSHOT.jar

3. Running with Docker:

The project includes a Dockerfile for containerization. To run the application using Docker, you first need to build the Docker image:

docker build -t language-app .

Then, you can run the Docker container. Note that the application requires external services like a database, Redis, and Kafka. The application-prod.yaml file expects their configurations to be provided as environment variables.

A docker-compose.yml file is present but was not analyzed. It would likely provide a convenient way to run the application and its dependencies together.

Development Conventions

  • Language: The project is written in Kotlin.
  • Framework: It uses the Spring Boot framework.
  • Architecture: The codebase is structured in a layered architecture, which is a good practice for maintainability and separation of concerns.
  • Dependencies: Key dependencies include Spring Web, Spring Data JPA, Spring Security, Spring AI, Kafka, and Redis.
  • Testing: The project uses JUnit 5 and Kotest for testing.
  • API: The application exposes a RESTful API. The API endpoints are defined in ...ApiController.kt files within the src/main/kotlin/com/learner/language/interfaces directory.
  • Configuration: The application is configured using YAML files (application.yml, application-prod.yaml, etc.). Production configuration relies on environment variables for sensitive data.
  • Containerization: The project is set up to be built and run as a Docker container.

Key Files

  • build.gradle.kts: The Gradle build file, which defines the project's dependencies and build process.
  • src/main/kotlin/com/learner/language/LanguageApplication.kt: The main entry point of the Spring Boot application.
  • src/main/kotlin/com/learner/language/application/: This package contains the application layer, which orchestrates the business logic.
  • src/main/kotlin/com/learner/language/domain/: This package contains the core business logic and domain models.
  • src/main/kotlin/com/learner/language/infrastructure/: This package contains the infrastructure layer, which deals with external concerns like databases, messaging queues, etc.
  • src/main/kotlin/com/learner/language/interfaces/: This package contains the presentation layer, including REST controllers that expose the application's functionality.
  • src/main/resources/application-prod.yaml: The production configuration file.
  • Dockerfile: Defines how to build the Docker image for the application.