https://github.com/karolkraw/LottoGame-client
LottoGame is an implementation of the well-known Lotto Lottery. The user provides six distinct numbers from range 1-99 and receives ticket with unique ID and draw date. Results can be checked right after the draw date. The winning numbers are generated based on configured scheduler that runs every Saturday at 12 p.m. The user can become a lottery winner if he hit at least three numbers.
- Java with Spring Boot for Backend
- Angular for Frontend
- Modular monolith hexagonal architecture with one module extracted as microservice
- Netflix-Eureka server used as discovery service
- Spring Data MongoDB used for storing tickets and lottery results
- Facade design pattern
- Unit Tests with Junit 5 and Mockito
- Integration Tests with TestContainers, TestRestTemplate and WireMock
- All modules containerized in Docker
- Spring Boot Scheduler used for generating winning numbers
- Docker
- Two files placed in the same folder: docker-compose.yml
and init-mongo.js
- Just execute the following command in the folder mentioned above
docker compose up
(all images will be pulled from Docker Hub and the application will start)
Service url: http://localhost:9090
HTTP METHOD | Endpoint | Action |
---|---|---|
POST | /numbers | To input 6 distinct numbers |
GET | /announcement/{id} | To retrieve lottery results for given ID |