In this project,
- In the user service, users are registered and logged in.
- In the project service, projects are recorded in the system. Afterwards, projects used more than once are cached to the Redis side when a Get request is made.
- In the task service, a new task is created using users and the project.-
- There are 4 microservices, when a task created via task-service that service insert a record onto task table(postgre) and it produce an event to task_service.task_created.0 topic.And when a task updated via task-service that service update a record onto task table(postgre) and it produce an event to task_service.task_updated.0 topic.
- Notification-consumer service listen task_service.task_created.0 and task_service.task_updated.0 topics and simulates the logic of sending notification after the event it consumes after notification is sending successfully service insert a record onto couchbase notification bucket.
- Java 17
- Spring Boot 3.2.5
- Maven
- Lombok
- MapStruct
- SwaggerUI
- PostgreSQL
- Spring Security
- Spring Cloud Netflix
- Spring Cloud FeignClient
- Spring Cloud Config
- Apache Kafka
- Docker
- Couchbase
- Flyway
- Before run project you need to start docker desktop
- After docker is up, run the docker-compose.yml
- After the run docker-compose.yml file you will see docker desktop like this:
url: jdbc:postgresql://localhost:5432/userservice
username: prostgres
password: test
url: jdbc:postgresql://localhost:5432/projectservice
username: prostgres
password: test
url: jdbc:postgresql://localhost:5432/taskservice
username: prostgres
password: test
-
Open http://localhost:8091/ on your browser
username: Administrator
password: 123456
-
1) CREATE PRIMARY INDEX `idx_default_primary_notification` ON `notification` 2) CREATE INDEX `id` ON `notification`(`id`)
-
Username: admin Full Name: admin Password: 123456 Verify Password: 123456
Users register and log in to the system
Method | Path | Description |
---|---|---|
POST | /auth/register | Register for users |
POST | /auth/login | Login for users |
GET | /auth/{id} | Get specific user information by id |
GET | /auth/ids | Get multiple user information |
Projects and information are recorded in the system
Method | Path | Description |
---|---|---|
GET | /projects | Get all the projects |
GET | /projects/{id} | Get specific project by id |
POST | /projects | Create new project |
POST | /projects/search | Searching for projects with specific features |
PUT | /projects | Update project |
DELETE | /projects/{id} | Delete project by id |
- Caching multiple projects and then calling them from there is good for the performance of the project.
Task creation service using user and project service
Method | Path | Description |
---|---|---|
GET | /tasks | Get all the tasks |
GET | /tasks/{id} | Get specific task by id |
POST | /tasks | Create new task |
POST | /tasks/search | Searching for tasks with specific features |
PUT | /tasks | Update task |
The Notification Service listens for task creation and update events using Kafka. It produces notifications for these events and records them in Couchbase.
taskservice.task_created.0: Published when a task is created.
taskservice.task_updated.0: Published when a task is updated.