{"id":21330285,"url":"https://github.com/thetnaingtn/go-dermacare-service","last_synced_at":"2026-04-30T11:32:24.466Z","repository":{"id":113728670,"uuid":"495059636","full_name":"thetnaingtn/go-dermacare-service","owner":"thetnaingtn","description":"Just another REST API.","archived":false,"fork":false,"pushed_at":"2024-01-19T17:16:37.000Z","size":187,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T14:27:33.913Z","etag":null,"topics":["docker","gin","mongodb","rest-api"],"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/thetnaingtn.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-22T12:54:23.000Z","updated_at":"2023-03-07T10:05:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"892e6723-e25a-4d0d-9095-b562fa524500","html_url":"https://github.com/thetnaingtn/go-dermacare-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thetnaingtn/go-dermacare-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetnaingtn%2Fgo-dermacare-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetnaingtn%2Fgo-dermacare-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetnaingtn%2Fgo-dermacare-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetnaingtn%2Fgo-dermacare-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thetnaingtn","download_url":"https://codeload.github.com/thetnaingtn/go-dermacare-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetnaingtn%2Fgo-dermacare-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32463892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["docker","gin","mongodb","rest-api"],"created_at":"2024-11-21T22:16:42.290Z","updated_at":"2026-04-30T11:32:24.424Z","avatar_url":"https://github.com/thetnaingtn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backend Service for Derma Care Store\n\n## Available Services\n### User\n- Signup(`/signup`) POST\n- Signin(`/signin`) POST\n### Product\n- Query Products(`/products`) GET\n- Query Product By Id(`/products/:id`) GET\n- Create Product(`/products`) POST\n- Update Product(`/products/:id`) PUT\n- Delete Product(`/products/:id`) DELETE\n### Category\n- Query Categories(`/categories`) GET\n- Create Category(`/categories`) POST\n- Update Category(`/categories/:id`) PUT\n- Delete Category(`/categories/:id`) DELETE\n### Order\n- Query Orders(`/orders`) GET\n- Create Order(`/orders`) POST\n\n## Local Development\nThis project use [air](https://github.com/cosmtrek/air) to live reload. If you are familiar with `nodemon` the concept is same but `air` is built with Go. \nRename .air.example.toml to .air.toml and modify `DB_HOST` and `DB_NAME` properly.\n```\nfull_bin = \"DB_HOST=localhost:27017 DB_NAME=dermacare ./tmp/main\"\n```\nThen run \n```\nmake generate-private-key \u0026\u0026 make generate-public-key\n```\nto generate `public` and `private` keys pair. After that, you can just run `air` in the root of your project directory.\n## Running inside container\nTo run the application inside container you need to do these things.\n1. Copy `.env.example` inside `zarf/docker` to `.env` file.\n2. Create a docker network called `dermacare` by running this command `docker create network dermacare`.\n3. Since containers(one for `database` and one for `application`) are running within the same network, they can connect each other by their name. update the `DB_HOST` inside `.env` to \n```\nDB_HOST=db:27017\nDB_NAME=YOUR_DB_NAME\n``` \n\u003e Note `db` is come from `services` name which declare inside `docker-compose.yaml`.\n4. Run `make start`. This command will build `dermacare-service:tag` image and will start the application.\n5. Server is running on port `3000`.\n## Running Tests\nUnit tests can be run for specific folder or can be run at root level. To run unit test for specific folder, go to the folder and enter command\n```\ngo test -v\n```\n\u003e Note `-v` flag is for verbose\n\nTo run all unit tests run this command at root level\n```\nmake test\n```\n## TODO\n* Add Unit Test for Data Layer.\n* Support search(filter) in all query services.\n* Indexing on email fields to prevent duplicate email.\n* Add other services\n  1. Analytic, Summary\n  2. Excel Export\n* Rotating Secret\n* Embed Admin UI to Binary\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetnaingtn%2Fgo-dermacare-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthetnaingtn%2Fgo-dermacare-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetnaingtn%2Fgo-dermacare-service/lists"}