keyshade-xyz / keyshade

Realtime secret and configuration management tool, with the best in class security and seamless integration support
https://keyshade.xyz
Mozilla Public License 2.0
212 stars 105 forks source link

docs: Migrate to Bruno #525

Closed rajdip-b closed 2 weeks ago

rajdip-b commented 2 weeks ago

User description

Driving force behind the change

Since we are an open-source project, we believe that we should be using the help of open-source tools wherever we can. Postman (tool that we were using till date) is of course a very good tool, but Bruno matches our requirements better.

Changes made


PR Type

documentation, enhancement


Description


Changes walkthrough πŸ“

Relevant files
Enhancement
3 files
app.module.ts
Remove unused imports in app module                                           

apps/api/src/app/app.module.ts
  • Removed unused import ThrottlerGuard and ThrottlerModule.
  • Cleaned up imports for better organization.
  • +1/-2     
    minio.provider.ts
    Add ESLint directive for unused variables                               

    apps/api/src/provider/minio.provider.ts
  • Added ESLint directive to ignore unused variables.
  • Improved code quality by addressing linting issues.
  • +3/-0     
    index.tsx
    Reformat JSX for better readability                                           

    apps/web/src/components/hero/index.tsx
  • Reformatted JSX for better readability.
  • Improved code formatting for consistency.
  • +7/-7     
    Tests
    1 files
    workspace.e2e.spec.ts
    Remove unused test variables                                                         

    apps/api/src/workspace/workspace.e2e.spec.ts
  • Removed unused variable user3.
  • Cleaned up test setup by removing unnecessary user creation.
  • +1/-2     
    Documentation
    3 files
    Can access live updates.bru
    Add endpoint for live update access check                               

    api-collection/Api Key Controller/Can access live updates.bru
  • Added new endpoint for checking live update access.
  • Documented required authorities for access.
  • +36/-0   
    Create API key.bru
    Add endpoint for API key creation                                               

    api-collection/Api Key Controller/Create API key.bru
  • Added endpoint for creating API keys.
  • Documented request body and parameters.
  • +43/-0   
    api-testing.md
    Update API testing documentation to use Bruno                       

    docs/contributing-to-keyshade/running-things-locally/api-testing.md
  • Updated documentation to reflect migration from Postman to Bruno.
  • Provided instructions for using Bruno for API testing.
  • +11/-5   
    Configuration changes
    1 files
    package.json
    Remove Postman configuration from package.json                     

    package.json
  • Removed Postman-related configuration.
  • Cleaned up package configuration.
  • +0/-4     
    Dependencies
    1 files
    package-lock.json
    Add zod dependency to package-lock                                             

    packages/schema/package-lock.json
  • Added zod dependency to package-lock.
  • Updated package-lock to reflect new dependencies.
  • +12/-1   

    πŸ’‘ PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    codiumai-pr-agent-free[bot] commented 2 weeks ago

    PR Reviewer Guide πŸ”

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 πŸ”΅πŸ”΅βšͺβšͺβšͺ
    πŸ§ͺ No relevant tests
    πŸ”’ No security concerns identified
    ⚑ Recommended focus areas for review

    Unused Parameters
    The functions uploadFile, getFileUrl, and deleteFile have parameters marked as unused with eslint-disable comments. Consider removing unused parameters or documenting why they are needed. Code Duplication
    Similar toast notification div structure is duplicated. Consider extracting the common toast notification UI into a reusable component.
    codecov[bot] commented 2 weeks ago

    Codecov Report

    All modified and coverable lines are covered by tests :white_check_mark:

    Project coverage is 87.92%. Comparing base (ce50743) to head (90c11c7). Report is 214 commits behind head on develop.

    Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #525 +/- ## =========================================== - Coverage 91.71% 87.92% -3.80% =========================================== Files 111 115 +4 Lines 2510 2807 +297 Branches 469 417 -52 =========================================== + Hits 2302 2468 +166 - Misses 208 339 +131 ``` | [Flag](https://app.codecov.io/gh/keyshade-xyz/keyshade/pull/525/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keyshade-xyz) | Coverage Ξ” | | |---|---|---| | [api-e2e-tests](https://app.codecov.io/gh/keyshade-xyz/keyshade/pull/525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keyshade-xyz) | `87.64% <100.00%> (-4.08%)` | :arrow_down: | | [schema](https://app.codecov.io/gh/keyshade-xyz/keyshade/pull/525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keyshade-xyz) | `100.00% <ΓΈ> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keyshade-xyz#carryforward-flags-in-the-pull-request-comment) to find out more.

    :umbrella: View full report in Codecov by Sentry.
    :loudspeaker: Have feedback on the report? Share it here.

    codiumai-pr-agent-free[bot] commented 2 weeks ago

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible bug
    Add error handling for JSON parsing to prevent potential runtime errors ___ **Add error type checking and handling for the JSON.parse() call to prevent runtime
    errors if localStorage contains invalid JSON data.** [apps/web/src/components/hero/index.tsx [31-33]](https://github.com/keyshade-xyz/keyshade/pull/525/files#diff-7613ce5c9e898c20a2427ba5bf13810f61bb0a532139896e00a54cd0285ad40cR31-R33) ```diff const emailsInWaitlist: string[] = dataInStorage - ? (JSON.parse(dataInStorage) as string[]) + ? (try { JSON.parse(dataInStorage) as string[] } catch { [] }) : [] ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: The suggestion addresses a potential runtime error by adding try-catch error handling for JSON.parse(), which could prevent application crashes if localStorage contains invalid data.
    7
    Typo
    βœ… Fix typo in collection name to improve clarity and maintain consistency ___
    Suggestion Impact:The typo in the collection name was corrected from "Api Kei Controller" to "Api Key Controller" as suggested. code diff: ```diff - "name": "Api Kei Controller", + "name": "Api Key Controller", ```
    ___ **Fix the typo in the collection name from "Api Kei Controller" to "Api Key
    Controller" to maintain consistency with the folder name and improve clarity.** [api-collection/Api Key Controller/bruno.json [3]](https://github.com/keyshade-xyz/keyshade/pull/525/files#diff-f40a16a121f3db792eca7d2b0c21643a45abab368c21819589bf8d0afe78f90aR3-R3) ```diff { - "version": "1", - "name": "Api Kei Controller", + "version": "1", + "name": "Api Key Controller", "type": "collection", "ignore": [ "node_modules", ".git" ] } ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: Fixing the typo from "Api Kei Controller" to "Api Key Controller" improves clarity and maintains consistency with the folder name and overall API documentation structure.
    7
    Enhancement
    Include example values for required path parameters to improve API documentation ___ **Add a default or example value for the empty project_slug parameter to improve API
    documentation and testing.** [api-collection/Environment Controller/Get all environments of project.bru [14]](https://github.com/keyshade-xyz/keyshade/pull/525/files#diff-6b3e00b7ba5c8df0b901ac49df19479058451c07fb74cb3205ab248af7e25173R14-R14) ```diff params:path { - project_slug: + project_slug: example-project-123 } ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 6 Why: Adding example values for path parameters improves API documentation clarity and makes testing easier by providing a reference format.
    6
    Maintainability
    Extract duplicate CSS classes into a reusable class to improve maintainability and reduce code duplication ___ **Move the duplicate toast notification div styling into a reusable CSS class to avoid
    code duplication and maintain consistent styling.** [apps/web/src/components/hero/index.tsx [23]](https://github.com/keyshade-xyz/keyshade/pull/525/files#diff-7613ce5c9e898c20a2427ba5bf13810f61bb0a532139896e00a54cd0285ad40cR23-R23) ```diff -
    +
    ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 5 Why: The suggestion correctly identifies duplicate CSS classes used in multiple toast notifications and proposes a valid solution to improve code maintainability through CSS class extraction.
    5
    Best practice
    Standardize documentation format to maintain consistency across API endpoints ___ **Add proper markdown formatting for the description section to maintain consistency
    with other API documentation.** [api-collection/Variable Controller/Delete variable.bru [21-23]](https://github.com/keyshade-xyz/keyshade/pull/525/files#diff-0257586b01df1235e0d70f67bcc40d36b8149eb2b081ba580b5d641c2f44b2eeR21-R23) ```diff docs { + ## Description + Delete a variable by its ID } ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 5 Why: Adding proper markdown formatting to the documentation section helps maintain consistency with other API endpoints and improves readability.
    5

    πŸ’‘ Need additional feedback ? start a PR chat