{"id":15668506,"url":"https://github.com/junajan/encrypted-key-value-store","last_synced_at":"2025-03-30T04:43:54.569Z","repository":{"id":80041018,"uuid":"166539083","full_name":"junajan/encrypted-key-value-store","owner":"junajan","description":"Service providing key-value store with encryption functionality","archived":false,"fork":false,"pushed_at":"2019-01-28T14:38:32.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T07:13:12.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/junajan.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":"2019-01-19T11:28:03.000Z","updated_at":"2019-01-28T14:38:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"bee67f2c-56f6-43da-8594-7d0515e25d59","html_url":"https://github.com/junajan/encrypted-key-value-store","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":"0.19999999999999996","last_synced_commit":"0bdd35352031a900d9cb435b0db6b98dca2b86b5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junajan%2Fencrypted-key-value-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junajan%2Fencrypted-key-value-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junajan%2Fencrypted-key-value-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junajan%2Fencrypted-key-value-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junajan","download_url":"https://codeload.github.com/junajan/encrypted-key-value-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246277351,"owners_count":20751548,"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":[],"created_at":"2024-10-03T14:08:49.350Z","updated_at":"2025-03-30T04:43:54.551Z","avatar_url":"https://github.com/junajan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Encrypted key-value store \n\n## Endpoints\n\nHere are common endpoints provided by the service\n - `/` - prints a service name\n - `/version` - prints a service version\n - `/ping` - health endpoint\n\nAnd here are service related endpoints:\n - `GET /store/:id` - get stored value based on provided `:id`\n    - Id has to be a string and can contain a wildcard character `*` (example: `key-*`)\n    - While sending a GET request, there has to be provided also `encryption-key` header.\n \n - `POST /store/:id` - save value identified by `:id`\n    - Id has to be a string.\n    - While sending a POST request, there has to be provided also `encryption-key` header.\n    - POST request expects a JSON body which will be stored as an encrypted value in the store.\n \n## How to run in a test mode\n```bash\n# run test database with encryption service\ndocker-compose -f docker-compose.test.yaml up -d\n\n# list running services\ndocker-compose -f docker-compose.test.yaml ps\n\n# stop services\ndocker-compose -f docker-compose.test.yaml stop\n```\n\n## How to run in a production mode\nSet up mandatory environment variables:\n - `DATABASE_HOST` - PostgreSQL database address\n - `DATABASE_PASSWORD` - PostgreSQL database password\n - `DATABASE_NAME` - PostgreSQL database name\n\nAnd run service inside a docker container:\n```bash\n# run service on port 3000\ndocker-compose up -d\n```\n\n## Testing\nFor running integration tests, create a `./config/test.env.json` file with following configuration:\n```json\n{\n  \"port\": 3000,\n  \"database\": {\n    \"host\": \"localhost\",\n    \"port\": 5432,\n    \"database\": \"postgres\",\n    \"user\": \"postgres\",\n    \"password\": \"password\"\n  }\n}\n```\n\nRun testing postgresql database and start tests:\n```bash\n# run db\ndocker-compose -f db/docker-compose.testdb.yaml up -d\n\n# run tests\nnpm test \n\n# test coverage\nnpm run coverage \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunajan%2Fencrypted-key-value-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunajan%2Fencrypted-key-value-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunajan%2Fencrypted-key-value-store/lists"}