{"id":21227969,"url":"https://github.com/ganchdev/keypea","last_synced_at":"2025-03-15T01:43:25.870Z","repository":{"id":257815939,"uuid":"576763191","full_name":"ganchdev/keypea","owner":"ganchdev","description":"Online keypair wallet","archived":false,"fork":false,"pushed_at":"2023-05-05T15:35:08.000Z","size":707,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T17:48:44.388Z","etag":null,"topics":["microservices","ruby","secrets-management"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ganchdev.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":"2022-12-10T22:32:36.000Z","updated_at":"2023-03-29T12:23:58.000Z","dependencies_parsed_at":"2024-10-10T22:48:29.789Z","dependency_job_id":null,"html_url":"https://github.com/ganchdev/keypea","commit_stats":null,"previous_names":["ganchdev/keypea"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganchdev%2Fkeypea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganchdev%2Fkeypea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganchdev%2Fkeypea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganchdev%2Fkeypea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ganchdev","download_url":"https://codeload.github.com/ganchdev/keypea/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243672371,"owners_count":20328762,"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","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":["microservices","ruby","secrets-management"],"created_at":"2024-11-20T23:07:41.159Z","updated_at":"2025-03-15T01:43:25.834Z","avatar_url":"https://github.com/ganchdev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\n  \u003cspan\u003eKeypea \u003cimg alt=\"keypea\" src=\"https://keypea.app/assets/pea-c10e0357.svg\" width=\"50\" style=\"transform: rotate(180deg)\"\u003e\u003c/span\u003e\n\u003c/h1\u003e\n\n\u003ca href=\"https://raw.githubusercontent.com/naft-a/keypea/main/LICENSE\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/naft-a/keypea.svg?style=flat\" alt=\"license status\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/naft-a/keypea/actions\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/naft-a/keypea/gateway.yml?label=gateway%20build\" alt=\"license status\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/naft-a/keypea/actions\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/naft-a/keypea/auth-service.yml?label=auth%20service%20build\" alt=\"license status\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/naft-a/keypea/actions\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/naft-a/keypea/secrets-service.yml?label=secrets%20service%20build\" alt=\"license status\"\u003e\n\u003c/a\u003e\n\n\nKeypea is an app that stores encrypted secrets in a database and can be seen running at [keypea.app](https://keypea.app). This is (probably) nothing more than an attempt to implement and deploy a real-life micro-service architecture in a monorepo. The app uses a bunch of different tech, but it's mostly kept simple to show what can be done with as few dependencies as possible. It is built in 4 parts:\n\n- The authentication service `auth-service` is a `rack` application that handles user CRUD and user authentication, it requires its own `mongodb` instance to persist data.\n- The secrets service `secrets-service` also a `rack` application that deals with secrets CRUD and secrets encryption/decryption, it also requires its own `mongodb` instance to persist data.\n- The gateway `gateway` is a `hanami` app that handles all user requests, sessions and routes requests to the appropriate underlying service. It requires `redis` for session management.\n- The web client `frontend` is a `react` app that shows pages to users.\n\n## Pre-requisites for development\n- Ruby 3.0 or greater\n- Node.js v16.15.1 or greater\n- Docker\n- Mongodb server\n- Redis server\n- Bundler\n- Yarn\n\n## Running\nThe whole project can be run in two ways:\n\n- `docker-compose`\n- `foreman` (for development)\n\n### Foreman \nYou'll need to go through a quick setup before we run the whole thing\n\n1) Run `redis` container locally:\n  ```\n    docker run --rm --name container-redis -d redis\n  ```\n\n2) Run `mongodb` container locally:\n  ```\n    docker run -d --name container-mongo -p 27017:27017 -d --restart always -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret mongo\n  ```\n\n3) Install foreman: `gem install foreman`\n4) Install auth service dependencies and create db indexes:\n  ```\n    cd auth-service/ \u0026\u0026 bundle \u0026\u0026 rake db:mongoid:create_indexes\n  ```\n5) Then install secrets service dependencies and create db indexes:\n  ```\n    cd ../secrets-service/ \u0026\u0026 bundle \u0026\u0026 rake db:mongoid:create_indexes\n  ```\n6) Install gateway dependencies:\n  ```\n    cd ../gateway/ \u0026\u0026 bundle\n  ```\n7) Install frontend dependencies:\n  ```\n    cd ../frontend/ \u0026\u0026 yarn install\n  ```\n8) Start foreman\n  ```\n    cd ../ \u0026\u0026 formean start\n  ```\n\nVisit each project's readme for more information about environment variables and defaults used within the app. You'd also need a reverse proxy such as [caddy](https://caddyserver.com/) to route local subdomains based on each port of the app.\n\n#### Example Caddyfile\n```\nfrontend.localhost {\n\treverse_proxy localhost:9001\n\ttls internal\n}\n\ngateway.localhost {\n\treverse_proxy localhost:5001\n\ttls internal\n}\n\nauth.localhost {\n\treverse_proxy localhost:5002\n\ttls internal\n}\n\nsecrets.localhost {\n\treverse_proxy localhost:5003\n\ttls internal\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganchdev%2Fkeypea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fganchdev%2Fkeypea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganchdev%2Fkeypea/lists"}