{"id":16525761,"url":"https://github.com/ak1m1tsu/eldorado","last_synced_at":"2026-04-10T07:18:08.407Z","repository":{"id":195277999,"uuid":"692589176","full_name":"ak1m1tsu/eldorado","owner":"ak1m1tsu","description":"The microservice implementation of ToDo App","archived":false,"fork":false,"pushed_at":"2023-10-01T04:59:00.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T06:12:15.881Z","etag":null,"topics":["docker","docker-compose","go","golang","grpc","microservices","postgresql","rabbitmq","redis"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ak1m1tsu.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-17T00:24:07.000Z","updated_at":"2023-09-25T12:40:48.000Z","dependencies_parsed_at":"2023-11-08T11:31:26.096Z","dependency_job_id":"dfde66ab-a34f-4e5c-b445-b7404318ece3","html_url":"https://github.com/ak1m1tsu/eldorado","commit_stats":null,"previous_names":["romankravchuk/eldorado","insan1a/eldorado"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ak1m1tsu%2Feldorado","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ak1m1tsu%2Feldorado/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ak1m1tsu%2Feldorado/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ak1m1tsu%2Feldorado/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ak1m1tsu","download_url":"https://codeload.github.com/ak1m1tsu/eldorado/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241601904,"owners_count":19989015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","go","golang","grpc","microservices","postgresql","rabbitmq","redis"],"created_at":"2024-10-11T17:06:36.593Z","updated_at":"2026-04-10T07:18:03.358Z","avatar_url":"https://github.com/ak1m1tsu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eldorado\n\nEldorado is a simple todo application implemented using microservices.\n\n## Technologies\n\n- RabbitMQ (communication between auth service/statistics service and email sending service)\n- gRPC (communication between auth service and todo service)\n- Redis (cache, session storage)\n- PostgreSQL (database)\n- Cron (schedule statistics service)\n- Docker (deploy services, message broker, etc.)\n- SMTP (send emails)\n\n## Design Diagram\n\n![](./assets/Eldorado%20Design.svg)\n\n## Services\n\n### Auth Service\n\nThe authorization service runs on the gRPC framework, its main functionality is to create new users, issue JWTs to access the functionality of the main service, and refresh the access token.\n\nAll tokens are stored in Redis. When a new user is created, the auth service communicates with the email sending service to send a welcome message to the new user's email.\n\n### Email sending Service\n\nThe email sending service is created useing RabbitMQ. It's main functionality is to listen to the queue in which email messages arrive and send them to users using SMTP.\n\n### Statistics Service\n\nThe statistics service collect statistic about users uncompleted tasks and send it to email sending service. It collects data on a schedule, with cron task syntax, which can be edited in the config file.\n\n### Todo Service\n\nToDo service provides CRUD operations over tasks for authorized users, possibility of new user registration and authorization for anonymous users. For authorization and registration data the service interacts with authorization service using gRPC. All data is cached in Redis, and the cache is cleared when the data is changed.\n\n## Hot to run?\n\nCreate `.env` file:\n\n```shell\n# API\nAPI_CONFIG_PATH=/etc/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S\nREDIS_PASS=guest\n# SMTP\nSMTP_EMAIL=your_smtp_email\nSMTP_PASS=your_smtp_password\n```\n\nNext, run `make up` command\n\n# ToDo API endpoints\n\n**Error response**\n\n```json\n{\n    \"error\": \"message\",\n}\n```\n\n## Check health status\n\n```shell\ncurl http://localhost:8080/health\n```\n\n**Response**\n\n```json\n{\n    \"message\": \"alive\",\n}\n```\n\n## Register new user\n\n```shell\ncurl -X POST --data '{\"email\":\"admin@example.com\",\"username\":\"admin\",\"password\":\"test1234\"}' http://localhost:8080/api/auth\n```\n\n**Response**\n\n```json\n{\n    \"message\": \"ok\",\n}\n```\n\n## Get access and refresh tokens\n\n```shell\ncurl -X POST --data '{\"email\":\"admin@example.com\",\"password\":\"test1234\"}' http://localhost:8080/api/auth/token\n```\n\n**Response**\n```json\n{\n    \"access_token\": \"string\",\n    \"refresh_token\": \"string\",\n}\n```\n\n## Refresh access token\n\n```shell\ncurl -X POST --cookie \"refresh_token=string\" http://localhost:8080/api/refresh\n```\n\n**Response**\n\n```json\n{\n    \"access_token\": \"string\",\n}\n```\n\n\n## Tasks CRUD\n\nEach of these requests requires the header authorization bearer with access token\n\n```shell\ncurl -H \"Authorization: Bearer \u003ctoken\u003e\"\n```\n\n### Get tasks\n\n```shell\ncurl http://localhost:8080/tasks\n```\n\n**Response**\n\n```json\n{\n  \"tasks\": [\n    {\n      \"id\": \"a4501171-30f5-4fd3-88a2-3d4089fb7c63\",\n      \"title\": \"first task\",\n      \"description\": \"this is my first task, haha!\",\n      \"created_at\": \"2023-09-25T11:40:35Z\",\n      \"is_completed\": false\n    }\n  ]\n}\n```\n\n### Create new task\n\n```shell\ncurl -X POST --data '{\"title\":\"hello\",\"description\":\"go to home\"}' http://localhost:8080/api/tasks\n```\n\n**Response**\n\n```json\n{\n  \"task\": {\n    \"id\": \"8673ce18-6bcc-4c02-9c9a-997c3784f84b\",\n    \"title\": \"hello\",\n    \"description\": \"go to home\",\n    \"is_completed\": false,\n    \"created_on\": \"2023-10-01T04:44:58Z\"\n  }\n}\n```\n\n### Update task\n\n```shell\ncurl -X PUT --data '{\"title\":\"go back\", \"description\":\"welcome\", \"is_completed\":true}' http://localhost:8080/api/tasks/8673ce18-6bcc-4c02-9c9a-997c3784f84b\n```\n\n**Response**\n\n```json\n{\n  \"task\": {\n    \"id\": \"8673ce18-6bcc-4c02-9c9a-997c3784f84b\",\n    \"title\": \"go back\",\n    \"description\": \"welcome\",\n    \"created_at\": \"0001-01-01T00:00:00Z\",\n    \"is_completed\": true\n  }\n}\n```\n\n### Delete task\n\n```shell\ncurl -X DELETE http://localhost:8080/api/tasks/8673ce18-6bcc-4c02-9c9a-997c3784f84b\n```\n\n**Response**\n\n```json\n{\n    \"message\": \"ok\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fak1m1tsu%2Feldorado","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fak1m1tsu%2Feldorado","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fak1m1tsu%2Feldorado/lists"}