https://github.com/mjbae/order-system
CLI 기반 주문 시스템
https://github.com/mjbae/order-system
classical-test ddd integration-testing jpa kotlin unit-testing
Last synced: 2 months ago
JSON representation
CLI 기반 주문 시스템
- Host: GitHub
- URL: https://github.com/mjbae/order-system
- Owner: MJbae
- Created: 2022-12-15T09:58:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-09T02:05:34.000Z (over 2 years ago)
- Last Synced: 2025-02-01T20:45:21.854Z (8 months ago)
- Topics: classical-test, ddd, integration-testing, jpa, kotlin, unit-testing
- Language: Kotlin
- Homepage:
- Size: 208 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## CLI based Order System [](https://github.com/MJbae/order-system/actions/workflows/ci-script.yml)
### How to run
Run the following commands from the root of the project
```shell
docker build -t order-system:latest .
```
```shell
docker run -it -p 50152:50152 order-system:latest
```### TDD based Implementation Procedure
1. Write a [Flow Chart](https://github.com/MJbae/order-system/wiki/Flow-Cart) to grasp the overall logic intuitively.
2. Implement the ordering function in the simplest way
3. Write a test that fails for the main branch points written in the [Flow Chart](https://github.com/MJbae/order-system/wiki/Flow-Cart)
4. Modify the code to make the failing test pass.
5. Repeat steps 3 and 4 enough times, then refactor the entire code based on the test.### Project Structure
This project is composed of the following 5 packages
* cli: defines objects responsible for input and output in the command environment.
* application: defines the application service.
* domain: defines domain objects.
* exception: defines custom exceptions.
* infra: defines objects responsible for persistent data.### Key Technologies
* Application Framework: Spring Shell
* RDBMS & ORM: H2, Spring Data JPA
* Test Framework: Kotest### References
* Application Framework: Spring Shell, [Baeldung Blog](https://www.baeldung.com/spring-shell-cli)
* Test Framework: Kotest, [Official Document](https://kotest.io/)
* Test Style: BDD Test Style, [BaeMain Blog](https://techblog.woowahan.com/5825/)
* Branch Coverage Plugin: JaCoCo, [Official Document](https://docs.gradle.org/7.4.2/userguide/jacoco_plugin.html), [BaeMain Blog](https://techblog.woowahan.com/2661/)
* Mocking Tool: MockK, [Official Document](https://mockk.io/)