{"id":14957732,"url":"https://github.com/cturner8/vault-encryption-demo","last_synced_at":"2025-10-27T10:38:11.251Z","repository":{"id":177381457,"uuid":"660084323","full_name":"cturner8/vault-encryption-demo","owner":"cturner8","description":"Demo application for utilising Hashicorp Vault for encryption.","archived":false,"fork":false,"pushed_at":"2024-09-18T11:29:53.000Z","size":923,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T01:11:16.418Z","etag":null,"topics":["api","database","docker","encryption","hashicorp","hashicorp-terraform","hashicorp-vault","nestjs","prisma","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/cturner8.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":"2023-06-29T07:57:07.000Z","updated_at":"2023-07-03T16:59:40.000Z","dependencies_parsed_at":"2024-03-28T13:51:57.318Z","dependency_job_id":"3d567f82-fb1e-49ae-b4e4-fb736a64a45b","html_url":"https://github.com/cturner8/vault-encryption-demo","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.03448275862068961,"last_synced_commit":"2ecb752db1ad3091ebfea8442d5089929fec85e2"},"previous_names":["cturner8/vault-encryption-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cturner8%2Fvault-encryption-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cturner8%2Fvault-encryption-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cturner8%2Fvault-encryption-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cturner8%2Fvault-encryption-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cturner8","download_url":"https://codeload.github.com/cturner8/vault-encryption-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237964469,"owners_count":19394405,"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":["api","database","docker","encryption","hashicorp","hashicorp-terraform","hashicorp-vault","nestjs","prisma","typescript"],"created_at":"2024-09-24T13:15:29.700Z","updated_at":"2025-10-24T12:30:41.698Z","avatar_url":"https://github.com/cturner8.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vault Encryption Demo\n\nDemo application for utilising [Hashicorp Vault](https://www.vaultproject.io/) for encryption.\n\n## Technologies Used\n\n- [Node JS](https://nodejs.org/en)\n- [TypeScript](https://www.typescriptlang.org/)\n- [Nest JS](https://nestjs.com/)\n- [Prisma](https://www.prisma.io/)\n- [Vault](https://www.vaultproject.io/)\n- [Terraform](https://www.terraform.io/)\n- [Docker](https://www.docker.com/)\n- [VS Code Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers)\n\n## Required Environment Variables\n\n- `JWT_SECRET`: a random secret value used for signing the JWT's issued by the api.\n- `JWT_EXPIRY`: how long the issued JWT's should last. e.g. `\"30m\"` for 30 minutes.\n- `JWT_ISSUER`: used to populate the `iss` claim of generated JWT's. e.g. `http://localhost:7777`\n- `JWT_AUDIENCE`: used to populate the `aud` claim of generated JWT's. e.g. `http://localhost:7777`\n- `VAULT_APP_TOKEN`: the token output from terraform after deploying the vault resources.\n- `VAULT_KEY_NAME`: name of the transit key for the application to use for encryption/decryption. this should align with the name of the transit key in the terraform configuration file [main.tf](./vault/main.tf)\n\n## Running the application locally\n\n1. Open the repo in VS Code\n2. Use the \"Reopen in container\" command from the Dev containers extension\n3. Once the container is built, run `yarn` from the project root.\n4. Initialise the SQLite DB: `sqlite3 db/prisma/dev.db \"VACUUM;\"`.\n5. Initialise prisma: `yarn generate --cwd db`.\n6. Change directory into the `vault` folder from the terminal.\n7. Run `terraform init` to initialise terraform.\n8. Run `terraform plan -out tfplan` to create a terrform plan file.\n9. Run `terraform apply tfplan` to apply the generated plan file and create the required vault resources.\n10. Run `terraform output app_client_token` to print out the generated app token for vault.\n11. In the API folder, copy the `.env.example` file and rename to `.env.development`, populating the required environment variables with values.\n12. Run the API in watch mode: `yarn dev --cwd api`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcturner8%2Fvault-encryption-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcturner8%2Fvault-encryption-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcturner8%2Fvault-encryption-demo/lists"}