{"id":26241199,"url":"https://github.com/solrac97gr/crypto-api-fiber","last_synced_at":"2026-05-01T20:31:13.191Z","repository":{"id":107623538,"uuid":"369310486","full_name":"solrac97gr/crypto-api-fiber","owner":"solrac97gr","description":"Project create for encrypt information using random strings and a Cache system 🛡️","archived":false,"fork":false,"pushed_at":"2021-05-21T17:23:00.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-28T03:43:57.087Z","etag":null,"topics":["cryptography","firebase","glang","go"],"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/solrac97gr.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,"zenodo":null}},"created_at":"2021-05-20T19:00:53.000Z","updated_at":"2023-07-17T16:30:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2c7b6c0-9e59-47bd-b338-7ca5829bf0a2","html_url":"https://github.com/solrac97gr/crypto-api-fiber","commit_stats":null,"previous_names":["solrac97gr/cryptoapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solrac97gr/crypto-api-fiber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solrac97gr%2Fcrypto-api-fiber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solrac97gr%2Fcrypto-api-fiber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solrac97gr%2Fcrypto-api-fiber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solrac97gr%2Fcrypto-api-fiber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solrac97gr","download_url":"https://codeload.github.com/solrac97gr/crypto-api-fiber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solrac97gr%2Fcrypto-api-fiber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["cryptography","firebase","glang","go"],"created_at":"2025-03-13T08:19:47.594Z","updated_at":"2026-05-01T20:31:13.163Z","avatar_url":"https://github.com/solrac97gr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# START GUIDE\n- Create a new firebase project from [firebase console](https://console.firebase.google.com/u/0/)\n- Initialize a new Free Database, Must be in the **Realtime database service**\n- Claim your Firebase credentials \u003ccode\u003e(Settings\u003eServices Accounts\u003e Go \u003e Create New Credentials)\u003c/code\u003e and replace it in the \u003ccode\u003eserviceAccountKey.example.go\u003c/code\u003e\n- Rename the file as \u003ccode\u003eserviceAccountKey.go\u003c/code\u003e\n-  In the same file replace your DB Url\n- Execute Docker \u003ccode\u003edocker-compose -f docker-compose.yml up\u003c/code\u003e\n- Access to the API from http://localhost:8080\n\nThe nex you will see it's a docker instance with 5 replicas of the API this will help for improve the performance in the Encrypt process\n\n**How I solve the different tasks:**\n- For save the logs in the Database I use a middleware for save the request before all the software execute the endpoint, very important for debug if you wanna determinate the complete error path.\n- For cache system I use a simple Library permit me store the data as a \"localstorage\" and I create a logic for the number of times the key is saved\n- Work with the Async call to a external API, I use for that a Package to Simulate the Async/Await behavior of other languages\n- I decide use firebase because the facility for deploy and maintain\n- Also I decided use Docker not only for make the deploy more easy, even for increase the performance implementing a load balancer with 5 replicas, every replica can make part of the request send it to the principal server **(Important: That means every Api will have a independent key and a independent counter, but every key will be only used 3 times until the expiration)**\n\n**Your database will looks like this:**\n\n```\n{\n  \"log\" : {\n    \"-MaCG3sW9Q4nXOdHHjjP\" : {\n      \"Method\" : \"POST\",\n      \"URL\" : \"/v1/encrypt\"\n    },\n    \"-MaCGFCaJriPjOVWCOpw\" : {\n      \"Method\" : \"GET\",\n      \"URL\" : \"/v1/decrypt/-MaCG4-7Ngf9tfEDqcKf\"\n    },\n   \n  },\n  \"text\" : {\n    \"-MaCG4-7Ngf9tfEDqcKf\" : {\n      \"EncryptedText\" : \"2c1b47f08f09d55eb0f167783f4f885ddff746eb44fd8d67e245ee4377e1510da8ddd4ed5ada4e9528d16164a310e2da997fbcc24ae2ce48542de5758f763b7ecec1e9ab3bc771a800f4f56542cfa1fa5856df9b4b6643ce0917\",\n      \"EncryptionKey\" : \"25c0aca4-0a0d-44c4-a573-946f2cbdab75\"\n    },\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolrac97gr%2Fcrypto-api-fiber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolrac97gr%2Fcrypto-api-fiber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolrac97gr%2Fcrypto-api-fiber/lists"}