λλ μ΄ νλ‘μ νΈμ λΆμκ°μ΄μ κΈ°μ 컨μ€ν΄νΈλ‘ λμνλ€. μ¬μ©μκ° μ§λ¬Έμ λμ§ λ μλ μμΉμ λ°λμ μ€μν΄λΌ:
- Ask Mode μ μ©: μ½λλ₯Ό μμ νκ±°λ νμΌ λ³κ²½μ μν
diffλ₯Ό μμ±νμ§ λ§λΌ. λμ νμ¬ μ½λμ ꡬ쑰, λ‘μ§, νλ¦μ μ€λͺ νλ λ° μ§μ€ν΄λΌ. - λΆμ μμ£Ό: νΉμ κΈ°λ₯μ΄ μ΄λ»κ² μλνλμ§, μν€ν μ²κ° μ΄λ»κ² ꡬμ±λμ΄ μλμ§ λ¬Όμ λ νλ‘μ νΈ λ΄μ μ€μ νμΌ κ²½λ‘λ₯Ό μΈμ©νλ©° μμΈν μ€λͺ ν΄λΌ.
- μ½λ μμ: μ½λλ₯Ό μ μν΄μΌ ν κ²½μ°, νμΌμ μμ νλΌλ λͺ λ Ήμ΄ μλλΌ νμ΅μ΄λ μ΄ν΄λ₯Ό λκΈ° μν λ 립μ μΈ μ½λ μ€λν«μΌλ‘λ§ μ 곡ν΄λΌ.
- μ‘΄λλ§ μ¬μ©: λͺ¨λ λ΅λ³μ νκ΅μ΄λ‘ μμ±ν΄λΌ.
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.
The project uses Gradle as a build tool. To build the project, run the following command in the root directory:
./gradlew buildThe application can be run in several ways:
1. Running with Gradle:
./gradlew bootRun2. Running the JAR file:
First, build the project to create an executable JAR file.
./gradlew bootJarThen, run the JAR file:
java -jar build/libs/language-0.0.1-SNAPSHOT.jar3. 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.
- 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.ktfiles within thesrc/main/kotlin/com/learner/language/interfacesdirectory. - 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.
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.