{"id":47808039,"url":"https://github.com/oshankkumar/sockshop","last_synced_at":"2026-04-03T17:53:55.582Z","repository":{"id":159638136,"uuid":"634754079","full_name":"oshankkumar/sockshop","owner":"oshankkumar","description":"A demo web application in Golang.","archived":false,"fork":false,"pushed_at":"2024-07-17T13:49:36.000Z","size":42126,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-17T17:03:17.230Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oshankkumar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-01T05:09:52.000Z","updated_at":"2024-07-17T13:49:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"e99b4bd5-c6e5-4232-9c48-8c338bf1237b","html_url":"https://github.com/oshankkumar/sockshop","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/oshankkumar/sockshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshankkumar%2Fsockshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshankkumar%2Fsockshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshankkumar%2Fsockshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshankkumar%2Fsockshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oshankkumar","download_url":"https://codeload.github.com/oshankkumar/sockshop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshankkumar%2Fsockshop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31367399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-04-03T17:53:54.897Z","updated_at":"2026-04-03T17:53:55.576Z","avatar_url":"https://github.com/oshankkumar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sock Shop\n![go build](https://github.com/oshankkumar/sockshop/actions/workflows/go.yml/badge.svg) \n[![Go Report Card](https://goreportcard.com/badge/github.com/oshankkumar/sockshop)](https://goreportcard.com/report/github.com/oshankkumar/sockshop)\n\n\nA Golang demo web application. It is intended to aid the demonstration of how to write a web application in Golang using SOLID principles.\nThis is a rewrite of https://github.dev/microservices-demo/ to demonstrate how to write a Golang web app following SOLID and idiomatic Go principles.\n\n## Overview\n\nThe application is structured to separate concerns and provide a clear separation between the different layers of the application.\n\n## Package Layout\n\n```\n.\n├── LICENSE\n├── Makefile\n├── README.md\n├── api\n│   ├── address.go\n│   ├── cards.go\n│   ├── errors.go\n│   ├── health.go\n│   ├── httpkit\n│   │   └── http_kit.go\n│   ├── links.go\n│   ├── middleware\n│   │   ├── log.go\n│   │   └── metrics.go\n│   ├── router\n│   │   ├── catalogue\n│   │   │   ├── catalogue.go\n│   │   │   └── routes.go\n│   │   ├── router.go\n│   │   └── user\n│   │       ├── routes.go\n│   │       └── user.go\n│   ├── server.go\n│   ├── socks.go\n│   └── users.go\n├── assets\n├── bin\n├── cmd\n│   └── sockshop\n│       ├── config.go\n│       └── main.go\n├── deploy\n│   └── docker\n│       └── sockshop-db\n│           └── catalogue_dump.sql\n├── docker-compose.yml\n├── go.mod\n├── go.sum\n├── godepgraph.png\n└── internal\n    ├── app\n    │   ├── catalogue.go\n    │   └── users.go\n    ├── db\n    │   ├── db.go\n    │   └── mysql\n    │       ├── socks.go\n    │       ├── sqlx.go\n    │       └── users.go\n    └── domain\n        ├── errors.go\n        ├── socks.go\n        └── users.go\n\n```\n\n## Description\n\n### `/api`\n`api` package should only contain the request and response schema. It should not have any application logic or dependency. Additionally It can also contain interface definitions. Which can use the defined request and respose schema as input/output parmas in the interface methods.\nIt should not contain any concrete type which implements those interface. This will provide an abstraction to your business logic.\n\n### `/api/router`\nContains all HTTP routes for the application. All routes implement the Router interface defined in api/router.go.\n\nSee [/api](./api/) package for example.\n\n### `/cmd`\n\nThis will contain the main package(s) for this project. The directory name for each application in `cmd` should match the name of executable you want. You should not put a lot of code in main package. You should only initialize the app dependencies in here and inject it to higher level modules/components.\n\nSee [/cmd](./cmd/) package for example.\n\n### `/internal`\n\nThis package should provide the private application code. It should define the concrete types having methods with actual business logic.\nYour application code can go in the `/internal/app` packgae.\nIt will contain concrete types which can implement intefaces defined in `/api` package.\n\nYou can define packages like `internal/db`, `internal/\u003capi-client\u003e ` ..etc. Which will define concrete types implementing interfaces defined in `/domain` package. \n\nSee [/internal](./internal/) package for example. \n\n### `/internal/domain`\n`domain` package should only contain your application domain related information. It should define the application domain types and related interfaces. You should not put any concreate implementaion in here. This is an abstraction to your application domain. \nThe actual implementation could be catered using a database or a third party API. Application domain should be independent of the actual concrete implementation.\n\nSee [/internal/domain](./internal/domain/) package for example.\n\n## Dependency graph\n\nGenerated using github.com/kisielk/godepgraph\n\n![Dependency Graph](godepgraph.png)\n\n## Usage\n\nRun the application using `make run` and to stop the application run `make clean`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foshankkumar%2Fsockshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foshankkumar%2Fsockshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foshankkumar%2Fsockshop/lists"}