-
Install Docker
- Install Docker Desktop
4.10.1
(current version) or Docker Engine19.03.0
and Docker Compose3.8
- Install Docker Desktop
-
Update your /etc/hosts
Put the following configurations on your host machine's /etc/hosts.
#Datastores 127.0.0.1 postgresql.manabie.todo
-
Run project:
make up
docker exec -it api.manabie.todo bash -c "make migrate-todo"
-
Use these commands to manage your containers:
make install
make run
make format
make migrate-todo
make drop-todo
-
Users:
-
Get list user
curl --request GET 'http://localhost:8080/users'
-
-
Setting limit for user
-
Show setting by userId
curl --location --request GET 'http://localhost:8080/users/1/settings'
-
Create limit task by userId
curl --location --request POST 'http://localhost:8080/users/1/settings' \ --header 'Content-Type: application/json' \ --data-raw '{ "limit_task": 5 }'
-
Update limit task by Id
curl --location --request PUT 'http://localhost:8080/settings/1' \ --header 'Content-Type: application/json' \ --data-raw '{ "limit_task": 10 }'
-
-
Show/Insert/Update/Delete todo task for user.
-
List task by user-id
curl --location --request GET 'http://localhost:8080/users/1/tasks'
-
Create task by user-id
curl --location --request POST 'http://localhost:8080/users/1/tasks' \ --header 'Content-Type: application/json' \ --data-raw '{ "content": "whatever", "target_date": "2022-07-17" }'
-
Get task by id
curl --location --request GET 'http://localhost:8080/tasks/1'
-
Update task by id
curl --location --request PUT 'http://localhost:8080/tasks/1' \ --header 'Content-Type: application/json' \ --data-raw '{ "id": 1, "member_id": 1, "content": "updated", "target_date": "2022-07-17T00:00:00Z", "created_at": "2022-07-17T14:44:46.981938Z" }'
-
Delete task by id
curl --location --request DELETE 'http://localhost:8080/tasks/1'
-
-
Run a command in a running container (container:
api.manabie.todo
)make test
make test-e2e
- Build projects in different environments by
Docker
. - Ensure data consistency when using
Transactions
andLocking
. - E2E testing and mock testing.
- Clean Architecture in Go by Repository pattern. (reference)
- Setup information (SECRET, PUBLIC) key by environment. (ansible, vault).
- Authentication and authorization for endpoints.
- Restore data when make test.
- We're using Golang at Manabie. However, we encourage you to use the programming language that you are most comfortable with because we want you to shine with all your skills and knowledge.
- Fork this repo and show us your development progress via a PR
- Monthly there are about 2 million lines of code changes (inserted/updated/deleted) committed into our GitHub repositories. To avoid regression bugs, we write different kinds of automated tests (unit/integration (functionality)/end2end) as parts of the definition of done of our assigned tasks.
- We nurture the cultural values: knowledge sharing and good communication, therefore good written documents and readable, organizable, and maintainable code are in our blood when we build any features to grow our products.
- We have collaborative culture at Manabie. Feel free to ask trieu@manabie.com any questions. We are very happy to answer all of them.
Thank you for spending time to read and attempt our take-home assessment. We are looking forward to your submission.