{"id":25080162,"url":"https://github.com/sitetester/sochain-api-parser","last_synced_at":"2025-10-13T04:06:21.728Z","repository":{"id":57655028,"uuid":"432430107","full_name":"sitetester/sochain-api-parser","owner":"sitetester","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-05T19:57:59.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T04:39:30.626Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sitetester.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-11-27T10:26:02.000Z","updated_at":"2022-01-17T19:32:21.000Z","dependencies_parsed_at":"2022-08-25T08:10:49.669Z","dependency_job_id":null,"html_url":"https://github.com/sitetester/sochain-api-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sitetester/sochain-api-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fsochain-api-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fsochain-api-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fsochain-api-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fsochain-api-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sitetester","download_url":"https://codeload.github.com/sitetester/sochain-api-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fsochain-api-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013599,"owners_count":26085389,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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-07T03:18:23.102Z","updated_at":"2025-10-13T04:06:21.695Z","avatar_url":"https://github.com/sitetester.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"**How to run code ?**  \n- directly using `go run .`\n- using `docker compose up`, it will by default listen on ` :8081`\n\n`.env` file configures value of gin (debug/test/release), it’s set to `release` mode, so http routes should be logged to `logs/gin.log` in `release` mode, otherwise, they are displayed in console in `debug` mode\n\n**Example routes:**  \n- http://localhost:8081/api/v1/block/BTC/000000000000034a7dedef4a161fa058a2d67a173a90155f3a2fe6fc132e0ebf\n- http://localhost:8081/api/v1/tx/BTC/dbaf14e1c476e76ea05a8b71921a46d6b06f0a950f17c5f9f1a03b8fae467f10\n\n**Documentation:**  \n- `Docs` folder is auto generated through [swag init](https://github.com/swaggo/swag)\n- Swagger docs could be viewed at http://localhost:8081/api/v1/swagger/index.html\n\n**How to run tests ?**  \n`go test `  \nAll tests can be run without actually launching the API on separate port. It’ll autoconfigure `gin` to `test` mode and will handle routes. \nAlternatively, we can set `gin` framework's `EnvGinMode` to `test` \n\n**Caching:**  \nCurrently, caching is implemented through https://github.com/patrickmn/go-cache, so repeated requests are returning much faster (without actually generating full response). Other options are `redis / mecached / Varnish`\n\n**Logging:**  \nThere is a single instance of logger being used throughout app \u0026 it will log to `logs/app.log`. Currently, unexpected API responses are logged.\n`logrotate` should be considered for large file. On production environment, we should use a more proper solution e.g. Sentry\n\n**Http Client:**  \n`Timeout ` is configured, so if external APi doesn’t respond in time, we should be able to log the error.\n\n**Deployment:**  \nDocker supports `Automated docker builds`. Other options is to use `Jenkins` \n\n**Security:**  \nCurrently, validation is applied on input values. In all other cases, inputs should be filtered before performing any operation. API should be protected against DDOS\n\n**Scalability:**\n- “API Rate limiting” should be applied to avoid unwanted load on backend\n- if the amount of network traffic increases, we can run multiple instances of service behind a load balancer.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitetester%2Fsochain-api-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsitetester%2Fsochain-api-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitetester%2Fsochain-api-parser/lists"}