{"id":25703430,"url":"https://github.com/dashpay/go-engineer-code-challenge","last_synced_at":"2026-06-13T03:31:46.680Z","repository":{"id":48349527,"uuid":"372269820","full_name":"dashpay/go-engineer-code-challenge","owner":"dashpay","description":"Go Engineer Code Challenge","archived":false,"fork":false,"pushed_at":"2022-11-15T09:02:03.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-25T05:32:49.232Z","etag":null,"topics":[],"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/dashpay.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}},"created_at":"2021-05-30T16:57:38.000Z","updated_at":"2023-01-10T23:01:54.000Z","dependencies_parsed_at":"2023-01-22T23:45:35.129Z","dependency_job_id":null,"html_url":"https://github.com/dashpay/go-engineer-code-challenge","commit_stats":null,"previous_names":["dashevo/golang-engineer-code-challenge"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/dashpay/go-engineer-code-challenge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fgo-engineer-code-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fgo-engineer-code-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fgo-engineer-code-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fgo-engineer-code-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashpay","download_url":"https://codeload.github.com/dashpay/go-engineer-code-challenge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fgo-engineer-code-challenge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34271500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-02-25T05:29:35.369Z","updated_at":"2026-06-13T03:31:46.634Z","avatar_url":"https://github.com/dashpay.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://git.io/col\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/%E2%9C%93-collaborative_etiquette-brightgreen.svg\" alt=\"Collaborative Etiquette\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://twitter.com/intent/follow?screen_name=dashpay\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/twitter/follow/dashpay.svg?style=social\u0026logo=twitter\" alt=\"follow on Twitter\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"#\"\u003e\n\t\t\u003cimg src=\"https://travis-ci.com/dashevo/go-engineer-code-challenge.svg?branch=main\" alt=\"travis-ci\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"#\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/dub/l/vibe-d.svg\" alt=\"MIT\"\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://dash.org\"\u003e\n\t\t\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Dash_digital-cash_logo_2018_rgb_for_screens.svg/1600px-Dash_digital-cash_logo_2018_rgb_for_screens.svg.png\" width=\"600\"\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\n# Go Engineer Code Challenge\n\n\u003e Code challenge for Dash Core Team candidates\n\nThe goal of this challenge is to create a backend application which receives,\nvalidates and displays data from users.\n\nThis repository is designed as a mono-repository for your application and external services. We've prepared an application skeleton for you and assume that your solution will be a light client and runs on remote untrusted hosts. In the provided skeleton, please implement [application logic](internal/app/usecase/service.go) which validates and persists [sample user data](assets/data.json) in external service(s), to which your application should connect. Your application should also be able to retrieve this data back and verify its integrity.\n\nYour solution must implement at least one of the following types of external services:\n\n  1. **Peer-to-peer service**: This service runs on remote untrusted hosts.\n     Networking and storage will be cheap for you - **0.0001 DASH per byte** - but you can’t trust\n     this service because a malicious operator may spoof (modify) your data, or a man-in-the-middle attack may occur.\n     Code for this service should be placed [here](internal/p2p) and the entrypoint of the service is [here](cmd/p2p/main.go).\n  2. **Self-hosted service**: This service runs on your server.\n     Networking and storage will be much more expensive for you - **0.001 DASH per byte** - but the data is\n     located on your server, so you can trust it.\n     Code for this service should be placed [here](internal/selfhosted) and the entrypoint of the service is [here](cmd/selfhosted/main.go).\n\nFor communication with your external service(s) we provide [two HTTP Client instances](https://github.com/dashevo/go-engineer-code-challenge/blob/main/internal/app/usecase/service.go#L10-L11).\nThey use middleware to calculate inbound and outbound traffic.\n\n## Your mission\n\n- Use this repository as a template for the solution.\n- Write a brief spec for your solution.\n- Implement as many external services as you need to store sample data from the application.\n- Implement [the store method](internal/app/usecase/service.go#L27). Validate and persist sample data\n   in the external service(s).\n- Implement [the fetch method](internal/app/usecase/service.go#L23). Fetch sample data back and ensure its\n   integrity. **When you fetch data back from the untrusted service, you should verify it for spoofing protection**.\n- Write beautiful code. Code design (SOLID, Clean Architecture, 12factor) is important to us.\n- Run the application and review the results. **Try to spend as little money as possible.** Cost depends on the size\n   of the request / response and elapsed time. The exact formula is found in\n   [the application skeleton code](internal/app/metric/calculator.go).\n- Share a link to your private solution repository with us or send us an archive containing your solution.\n\n## Requirements\n\n### External services\n\n- Services should be written in Go.\n- Services should be dockerized and started with [docker compose](docker-compose.yml) in the root directory.\n- Data should be permanently persisted (i.e. available after a service restart).\n\n### Application\n\n- You should validate sample data in the store method. Return an error if any data is invalid.\n- You should check data integrity in the fetch method to avoid spoofing. Keep in mind that the fetch method will not have access to the original input data provided to the store method.\n- Make sure the data returned by the fetch method matches the input data from the store action.\n- You should use `p2pClient` for sending / retrieving data from a P2P service.\n- You should use `selfHostedClient` for sending / retrieving data from a hosted service.\n- You cannot store any data on the application side, including cryptographic keys.\n\n### Sample data validation rules\n\nThe provided [sample data](assets/data.json) contains a collection of various objects.\nEach type of object has its own validation rules as defined below:\n\n#### User\n\n- `id`\n  - Format: `a-zA-Z0-9`\n  - Length: `64`\n  - Required\n- `type`\n  - Value: `user`\n  - Required\n- `userName`\n  - Format: `a-zA-Z0-9_.`\n  - Max length: `20`\n  - Required\n- `firstName`\n  - Max length: `100`\n- `lastName`\n  - Max length: `100`\n- `email`\n  - According to RFC\n\n#### Payment\n\n- `id`\n  - Format: `a-zA-Z0-9`\n  - Length: `64`\n  - Required\n- `type`\n  - Value: `payment`\n  - Required\n- `fromUserId`\n  - Format: `a-zA-Z0-9`\n  - Length: `64`\n  - Required\n- `toMerchantId` or `toUserId`\n  - Format: `a-zA-Z0-9`\n  - Length: `64`\n  - Required\n- `amount`\n  - Format: float number\n   Not equal or less than `0`\n  - Required\n- `createdAt`\n  - Format: Date ISO 8601\n  - Required\n\n#### Merchant\n\n- `id`\n  - Format: `a-zA-Z0-9`\n  - Length: `64`\n  - Required\n- `type`\n  - Value: `merchant`\n  - Required\n- `name`\n  - Format: `a-zA-Z0-9_.`\n  - Max length: `20`\n  - Required\n\n## Summary\n\nFollow the [challenge mission](#your-mission) according to the [provided requirements](#requirements) and do your\nbest. Good luck!\n\n## License\n\n[MIT](LICENSE) © 2021 Dash Core Team\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpay%2Fgo-engineer-code-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashpay%2Fgo-engineer-code-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpay%2Fgo-engineer-code-challenge/lists"}