Skip to content

Commit fc601f3

Browse files
authored
Update README.md
1 parent 309f44f commit fc601f3

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# task-service
1+
# Task Service
22

33
Task Service is a sample application used to handle Tasks by User. The base structure of a `Task` is:
44

@@ -15,9 +15,9 @@ Task Service is a sample application used to handle Tasks by User. The base stru
1515

1616
The REST API / GraphQL API is protected by user authentication using a `bearer` token (JWT). Before consuming it, you must first authenticate using the `POST /api/v1/auth` endpoint passing the user credentials and a token will be generated. Use it on the `authorization` http request header attribute. Use POSTMAN collection available on the docs folder.
1717

18-
**Important**: There is 2 types of user. A `super` user that can handle all the tasks and a `non-super` user which can only handle its own tasks. You may get some `401` or `403` errors if you try to acccess wrong IDs.
18+
⚠️ **Important**: There is 2 types of user. A `super` user that can handle all the tasks and a `non-super` user which can only handle its own tasks. You may get some `401` or `403` errors if you try to acccess wrong IDs.
1919

20-
## Stack
20+
## 💻 Stack
2121

2222
The following list represents the main stack and its dependencies:
2323

@@ -32,13 +32,13 @@ The following list represents the main stack and its dependencies:
3232
- jsonwebtoken
3333
- pino (logging)
3434

35-
## Architecture
35+
## 🥇 Architecture
3636

3737
The design was made on the top of `Clean Architecture`, where there are well-separated layers for `Domain` which holds all the abstractions for the domain of the application (Tasks and Users), `Infrastructure` (I/O bound operations) and `UseCases` (business rules). The components of each layer depends on the abstractions of the domain which allows us to inject any derived instance for the abstractions and mock at unit testing level.
3838

3939
![Postman collection](docs/project-structure.png)
4040

41-
## Scalability
41+
## ☁️ Scalability
4242

4343
To emulate the scalability, you can run it on your machine:
4444

@@ -58,25 +58,27 @@ yarn prisma:reset
5858

5959
To migrate and seed the database. Then you can load the postman collection available on the `docs` folder and use it.
6060

61-
Once you are done, just destroy the environment:
61+
Once it is up, the endpoint to consume the api via load balancer is: `http://localhost:4000`.
62+
63+
Finally when you are done, just destroy the environment:
6264

6365
```
6466
docker compose -f docker-compose-test.yml down
6567
```
6668

67-
## Tests
69+
## ✔️ Tests
6870

6971
It uses the native Node Test Runner as tooling for testing. The tests covers the use cases layer mocks are created using objects and injected on the useCases, specially the `TaskUseCases`.
7072

7173
![Postman collection](docs/test-results.png)
7274

73-
## CI/CD
75+
## 📊 CI/CD
7476

7577
There is a initial workflow on the `./github/workflows` folder that run a few steps to check the project source code including lint, typescript, build (transpilation process of typescript) and tests.
7678

7779
You can see the workflow results at `Actions` tab here: https://github.com/felipeoriani/task-service/actions
7880

79-
## Improvements
81+
## 📓 Improvements
8082

8183
- Implement integration tests to cover the infrastructure layer and api layer;
8284
- Custom error messages for schema validators, maybe considering globalization;

0 commit comments

Comments
 (0)