{"id":19757169,"url":"https://github.com/franpog859/cleanaux-backend","last_synced_at":"2026-04-01T17:17:46.216Z","repository":{"id":103252530,"uuid":"170196674","full_name":"franpog859/cleanaux-backend","owner":"franpog859","description":"☁️🛁 Cloud native REST API designed for planning regular cleaning or other systematic activities","archived":false,"fork":false,"pushed_at":"2019-12-23T08:48:20.000Z","size":24918,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-28T00:37:13.918Z","etag":null,"topics":["api","basicauth","cloud","gcp","golang","jwt","kubernetes","microservice","mongodb","mysql","rest"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/franpog859.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2019-02-11T20:26:34.000Z","updated_at":"2023-08-24T11:40:02.000Z","dependencies_parsed_at":"2023-10-14T22:11:31.897Z","dependency_job_id":null,"html_url":"https://github.com/franpog859/cleanaux-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/franpog859/cleanaux-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franpog859%2Fcleanaux-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franpog859%2Fcleanaux-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franpog859%2Fcleanaux-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franpog859%2Fcleanaux-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/franpog859","download_url":"https://codeload.github.com/franpog859/cleanaux-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franpog859%2Fcleanaux-backend/sbom","scorecard":{"id":409749,"data":{"date":"2025-08-11","repo":{"name":"github.com/franpog859/cleanaux-backend","commit":"646f2640d622b7a882410e2886409b0563740253"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: containerImage not pinned by hash: auth-service/Dockerfile:1","Warn: containerImage not pinned by hash: auth-service/Dockerfile:16: pin your Docker image by updating alpine:3.8 to alpine:3.8@sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14","Warn: containerImage not pinned by hash: content-service/Dockerfile:1","Warn: containerImage not pinned by hash: content-service/Dockerfile:16: pin your Docker image by updating alpine:3.8 to alpine:3.8@sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14","Warn: goCommand not pinned by hash: auth-service/vendor/github.com/json-iterator/go/build.sh:10","Warn: goCommand not pinned by hash: content-service/vendor/github.com/json-iterator/go/build.sh:10","Info:   6 out of   8 goCommand dependencies pinned","Info:   0 out of   4 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0536 / GHSA-39qc-96h7-956f / GHSA-hgr8-6h9x-f7q9","Warn: Project is vulnerable to: GO-2022-0236 / GHSA-h86h-8ppg-mxmh","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2021-0061 / GHSA-r88r-gmrh-7j83","Warn: Project is vulnerable to: GO-2022-0956 / GHSA-6q6q-88xp-6f2r","Warn: Project is vulnerable to: GO-2020-0036 / GHSA-wxc4-f4m6-wwqv","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T22:23:53.647Z","repository_id":103252530,"created_at":"2025-08-18T22:23:53.647Z","updated_at":"2025-08-18T22:23:53.647Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: 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":["api","basicauth","cloud","gcp","golang","jwt","kubernetes","microservice","mongodb","mysql","rest"],"created_at":"2024-11-12T03:18:18.536Z","updated_at":"2026-04-01T17:17:46.196Z","avatar_url":"https://github.com/franpog859.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cleanaux Backend\n\n[![CircleCI](https://circleci.com/gh/franpog859/cleanaux-backend.svg?style=shield)](https://circleci.com/gh/franpog859/cleanaux-backend)\n[![Go Report Card](https://goreportcard.com/badge/github.com/franpog859/cleanaux-backend)](https://goreportcard.com/report/github.com/franpog859/cleanaux-backend)\n[![Docker Pulls](https://img.shields.io/docker/pulls/franpog859/auth-service.svg)](https://hub.docker.com/r/franpog859/cleanaux-backend)\n\nCleanaux Backend provides a REST API with a list of things which should be cleaned regularly. If something wasn't cleaned for a long time it appears with a warning color (higher status). After the cleaning the item status is updated.\n\n\u003cp align=\"center\"\u003e\n\u003ctable cellspacing=\"0\" cellpadding=\"0\"\u003e\n  \u003ctr\u003e\n    \u003cth scope=\"col\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/franpog859/cleanaux-backend/master/docs/install-setup.gif\"\u003e\u003c/th\u003e\n    \u003cth scope=\"col\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/franpog859/cleanaux-backend/master/docs/api-usage.gif\"\u003e\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth scope=\"col\"\u003einstallation and setup\u003c/th\u003e\n    \u003cth scope=\"col\"\u003eAPI usage\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\u003c/p\u003e\n\nProject consist of two Go microservices - Content Service and Auth Service - exposing REST API via Ingress. Each of them is connected to separate database (this architecture was created more for learning purpose than to minify cloud resources). Every endpoint is secured with some method of authentication. See the [API exposed to the user](#api).\n\nWhole backend is deployed as a cloud native application on Google Cloud Platform with Google Kubernetes Engine. See how to install it in the [production installation section](#production).\n\n## Content Service\n\nContent Service uses connected MySQL database to store the data aboud items to clean. It converts the data to the model used by the user. Database runs on separate pod and is initialized with an init container. Service proxies the JWT auth header to Auth Service to authorize user connection.\n\n## Auth Service\n\nAuth Service uses connected Mongo database to store users credentials. All passwords are encoded. Its job is to authorize user connection and provide JWT token signed with the secret key stored in Kubernetes Secret after Basic authentication. Service exposes also internal API for maintaining Content Service calls. Mongo database runs on separate pod.\n\n## Structure\n\n- `*-service/` directory contains specific service files\n- `kube/` directory contains Kubernetes files for cloud deployment\n- `scripts/` directory contains installation scripts\n- `test/` directory contains some testing tips\n- `docs/` directory contains some documentation files\n\n## Production\n\n\u003e Note that it's not yet production ready. There has to be some work on HTTPS connection done!\n\n**Before installing** the Cleanaux Backend on your cluster edit the default `jwtkey` value in the `kube/auth-service/secret.yaml` file.\n\nTo install Cleanaux Backend on Google Cloud Platform login into `gcloud`, connect to the cluster running the command provided by GCP and run the installation script:\n\n```bash\ngcloud auth login\n\ngcloud container clusters get-credentials {CLUSTER_NAME} --zone {ZONE} --project {PROJECT}\n\nbash scripts/install-gcp.sh\n```\n\n## Maintenance\n\nTo add a new user run MongoDB client:\n\n```bash\nkubectl exec -it $(kubectl get po | grep -oE \"\\b(mongo)([a-zA-Z0-9-])+\\b\") /usr/bin/mongo\n```\n\nAnd run script provided in `auth-service/init/db-test` file with your values instead of default ones. Remember that your credentials must consist of only letters and numbers and to put here a base64 encoded password. You can encode it running:\n\n```bash\necho -n '{PASSWORD}' | base64\n```\n\nTo add a new item to clean run MySQL client:\n\n```bash\nkubectl run -it --rm --image=mysql:5.6 --restart=Never mysql-client -- mysql -h mysql-database-internal -ppassword\n```\n\nAnd run script provided in `content-service/init/db-test.sql` file with your values instead of default ones.\n\nTo get the host IP run:\n\n```bash\nkubectl get ingress | grep -oE \"\\b([0-9]{1,3}\\.){3}[0-9]{1,3}\\b\"\n```\n\n## API\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/franpog859/cleanaux-backend/master/docs/swagger-0-6-0.png\"\u003e\n\u003c/p\u003e\n\nThe whole Swagger API you can find in `docs/api.yaml` file. Feel free to dive into the code if something is not clear enough!\n\n## Development\n\nTo install Cleanaux Backend on minikube run:\n\n```bash\nbash scripts/install-minikube.sh\n```\n\n**Remember** to clean up the minikube after work by running:\n\n```bash\nbash scripts/cleanup-minikube.sh\n```\n\nTo build Docker images from local repository and push them to the Docker Hub run:\n\n```bash\nbash scripts/build-and-push-images.sh {TAG}\n```\n\nTo mock an interface go to its directory and run:\n\n```bash\n$GOPATH/bin/mockery -name={INTERFACE_NAME}\n```\n\nTo run unit tests run:\n\n```bash\nbash scripts/check-code.sh\n```\n\nMore information about testing is provided in the `test/README.md` file.\n\nThere are tools versions I use while development process:\n\n```bash\ngo version: go1.11.5 linux/amd64\ndep version: v0.5.3\nkubectl client version: v1.15.2\nkubectl server version: v1.13.3\ngcloud version: Google Cloud SDK 256.0.0\nminikube version: v0.34.1\ngit version: 2.17.1\n```\n\n## Contribution\n\nIf you see some bug or bad habit feel free to tell me! If you have some idea to make this project better just create an issue and talk about it. We all are learning!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranpog859%2Fcleanaux-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranpog859%2Fcleanaux-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranpog859%2Fcleanaux-backend/lists"}