Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Added documentation for running the platform #473

Merged

Conversation

Allan2000-Git
Copy link
Contributor

@Allan2000-Git Allan2000-Git commented Oct 2, 2024

User description

Description

This PR adds documentation for the running the platform.

Fixes #472

Dependencies

No new dependencies introduced.

Future Improvements

N/A

Mentions

@rajdip-b

Screenshots of relevant screens

N/A

Developer's checklist

  • My PR follows the style guidelines of this project
  • I have performed a self-check on my work

If changes are made in the code:

  • I have followed the coding guidelines
  • My changes in code generate no new warnings
  • My changes are breaking another fix/feature of the project
  • I have added test cases to show that my feature works
  • I have added relevant screenshots in my PR
  • There are no UI/UX issues

Documentation Update

  • This PR requires an update to the documentation at docs.keyshade.xyz
  • I have made the necessary updates to the documentation, or no documentation changes are required.

PR Type

Documentation


Description

  • Added a new section in the documentation for running the platform locally.
  • Updated the summary to include a link to the new "Running the Platform" documentation.
  • Provided detailed instructions on setting up, running, and testing the platform app using NextJS and TypeScript.
  • Included information on how to view the platform app in a browser.

Changes walkthrough 📝

Relevant files
Documentation
SUMMARY.md
Add "Running the Platform" to documentation summary           

docs/SUMMARY.md

  • Added a new entry for "Running the Platform" in the summary.
+1/-0     
running-the-platform.md
Add detailed guide for running the platform locally           

docs/contributing-to-keyshade/running-things-locally/running-the-platform.md

  • Created a new documentation file for running the platform.
  • Included instructions for setting up and running the platform.
  • Added testing instructions using Jest.
  • Provided URL for viewing the platform app.
  • +39/-0   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Expand the testing section with more detailed instructions and best practices

    Provide more details about the testing process, including how to run specific tests,
    how to generate test coverage reports, and any best practices for writing tests for
    the platform app.

    docs/contributing-to-keyshade/running-things-locally/running-the-platform.md [27-35]

     ## Testing your code
     
     We use Jest for testing. Run the tests when unit testing, or mock testing the platform app separately from the rest of the project.
     
    -* To run tests in the root, use this command:
    +* To run all tests for the platform app:
     
     ```sh
     pnpm test:platform

    +* To run a specific test file:
    +
    +sh +pnpm test:platform path/to/test-file.test.ts +
    +
    +* To generate a test coverage report:
    +
    +sh +pnpm test:platform --coverage +
    +
    +When writing tests, follow these best practices:
    +1. Use descriptive test names
    +2. Arrange-Act-Assert pattern
    +3. Mock external dependencies
    +4. Aim for high test coverage, especially for critical components
    +

    
    - [ ] **Apply this suggestion** <!-- /improve --apply_suggestion=0 -->
    
    <details><summary>Suggestion importance[1-10]: 9</summary>
    
    Why: Providing detailed testing instructions and best practices significantly improves the documentation by guiding developers on how to effectively test the platform app, which is essential for maintaining code quality and reliability.
    
    
    </details></details></td><td align=center>9
    
    </td></tr><tr><td>
    
    
    
    <details><summary>Add context about the Platform App's purpose and role within the Keyshade project</summary>
    
    ___
    
    
    **Consider adding a brief explanation of what the Platform App is and its purpose <br>within the Keyshade project. This will provide context for users who may not be <br>familiar with the platform's role in the overall system.**
    
    [docs/contributing-to-keyshade/running-things-locally/running-the-platform.md [5-7]](https://github.com/keyshade-xyz/keyshade/pull/473/files#diff-fcc130988d8db6bf42c5453bec6630405e4141b6f09c16d302a1b5e27deb93e5R5-R7)
    
    ```diff
     ## Running the Platform
     
    -The Platform App resides in the `apps/platform` directory. It is powered by NextJS and TypeScript. To run the Platform App locally, do the following:
    +The Platform App is the core user interface for Keyshade, providing a centralized dashboard for managing secrets and configurations. It resides in the `apps/platform` directory and is built with NextJS and TypeScript. To run the Platform App locally, follow these steps:
    
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Providing context about the Platform App's purpose enhances the documentation by giving users a better understanding of its role within the Keyshade project, which is beneficial for new users or contributors.

    7
    Best practice
    Add information about environment setup and configuration prerequisites

    Include information about any environment variables or configuration files that need
    to be set up before running the platform app. This will ensure that developers have
    all the necessary prerequisites in place.

    docs/contributing-to-keyshade/running-things-locally/running-the-platform.md [9-19]

    +* Ensure all necessary environment variables are set. Create a `.env.local` file in the `apps/platform` directory with the required variables (list the key variables here).
    +
     * In the project root, run:
     
     ```sh
     pnpm i

    Next set up the platform app for development with:

    pnpm dev:platform
    
    - [ ] **Apply this suggestion** <!-- /improve --apply_suggestion=2 -->
    
    <details><summary>Suggestion importance[1-10]: 8</summary>
    
    Why: Including details about environment variables and configuration files is crucial for ensuring that developers can set up the platform app correctly, preventing potential setup issues and saving time.
    
    
    </details></details></td><td align=center>8
    
    </td></tr></tr></tbody></table>
    
    >💡 Need additional feedback ? start a [PR chat](https://chromewebstore.google.com/detail/ephlnjeghhogofkifjloamocljapahnl)
    
    

    Copy link
    Member

    @rajdip-b rajdip-b left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Exactly what we were looking for! Thanks!

    @rajdip-b rajdip-b added the hacktoberfest-accepted Your PR has this = Congrats! label Oct 3, 2024
    @rajdip-b rajdip-b merged commit 8b8386b into keyshade-xyz:develop Oct 3, 2024
    7 checks passed
    Kiranchaudhary537 pushed a commit to Kiranchaudhary537/keyshade that referenced this pull request Oct 13, 2024
    rajdip-b pushed a commit that referenced this pull request Oct 24, 2024
    ## [2.6.0](v2.5.0...v2.6.0) (2024-10-24)
    
    ### 🚀 Features
    
    * **api:**  Add icon and remove description field from workspace ([#435](#435)) ([a99c0db](a99c0db))
    * **api-client:** Added workspace-membership and related tests ([#452](#452)) ([6a1c091](6a1c091))
    * **api-client:** Create controller for User module ([#484](#484)) ([f9d8e83](f9d8e83))
    * **api:** Add prod env schema in env file ([#436](#436)) ([21c3004](21c3004))
    * **api:** Add resend otp implementation ([#445](#445)) ([4dc6aa1](4dc6aa1))
    * **api:** Fetch total count of environments, [secure]s and variables in project ([#434](#434)) ([0c9e50a](0c9e50a))
    * **api:** Replace `projectId` with `name` and `slug` in workspace-role response.  ([#432](#432)) ([af06071](af06071))
    * **cli:** Add functionality to operate on Secrets ([#504](#504)) ([1b4bf2f](1b4bf2f))
    * **cli:** Add project command ([#451](#451)) ([70448e1](70448e1))
    * **cli:** Add workspace operations ([#441](#441)) ([ed38d22](ed38d22))
    * **cli:** implement commands to get, list, update, and delete, workspace roles ([#469](#469)) ([957ea8d](957ea8d))
    * **cli:** Implemented pagination support ([#453](#453)) ([feb1806](feb1806))
    * **cli:** Secret scan ([#438](#438)) ([85cb8ab](85cb8ab))
    * **cli:** Update environment command outputs ([f4af874](f4af874))
    * **platform:** Clearing email field after waitlisting the user email ([#481](#481)) ([256d659](256d659))
    * Remove project IDs from workspace role export data and update tests ([#448](#448)) ([8fdb328](8fdb328))
    * **web:** Configured extra check for waitlisted users already in the list and created toast message for them ([#492](#492)) ([2ddd0ef](2ddd0ef))
    * **web:** show the toast only when email add successfully ([#490](#490)) ([783c411](783c411))
    
    ### 🐛 Bug Fixes
    
    * **api,api-client:** Add environmentSlug in multiple places across the variable module ([#468](#468)) ([d970aff](d970aff))
    * **api:** Replace the id with slug in the global-search service ([#455](#455)) ([74804b1](74804b1))
    * **platform:** Fixed duplicate Google Logo UI fix  ([#450](#450)) ([fb0d6f7](fb0d6f7))
    * resolve footer website name cut-off or overlap issue ([#444](#444)) ([fe03ba2](fe03ba2))
    * **web:** Horizontal Scrolling issue on the website ([#440](#440)) ([655177b](655177b))
    
    ### 📚 Documentation
    
    * Add documentation for environment in CLI ([#462](#462)) ([dad7394](dad7394))
    * Add documentation for project in CLI ([#466](#466)) ([341fb32](341fb32))
    * Add documentation for scan in CLI ([#461](#461)) ([72281e6](72281e6))
    * Add documentation for workspace command ([#464](#464)) ([4aad8a2](4aad8a2))
    * Add instructions for resetting the local Prisma database ([#495](#495)) ([#501](#501)) ([b07ea17](b07ea17))
    * Added docker support documentation ([#465](#465)) ([bc04be4](bc04be4))
    * Added documentation for running the platform ([#473](#473)) ([8b8386b](8b8386b))
    * Added missing mappings to pages ([5de9fd8](5de9fd8))
    * Fix Documentation Hyperlink and update expired Discord invite link ([#496](#496)) ([5a10e39](5a10e39))
    * Updated CLI docs ([#460](#460)) ([c7e0f13](c7e0f13))
    
    ### 🔧 Miscellaneous Chores
    
    * Add more logging to Sentry init ([#470](#470)) ([de4925d](de4925d))
    * **api:** Optimise API docker image size ([#360](#360)) ([ea40dc1](ea40dc1))
    * **api:** Updated lockfile ([a968e78](a968e78))
    * **CI:** Add [secure] scan validation ([f441262](f441262))
    * **cli:** Update controller invocation in environment commands ([#477](#477)) ([596bd1a](596bd1a))
    * Minor changes to variables ([fe01ca6](fe01ca6))
    * **[secure]-scan:** Failing lint issues ([#507](#507)) ([48f45df](48f45df))
    * **[secure]-scan:** Formatted files ([5884833](5884833))
    * Update .env.example ([70ad4f7](70ad4f7))
    * Updated scripts ([9eb76a7](9eb76a7))
    * **web:** email validation ([#487](#487)) ([e8e737a](e8e737a))
    @rajdip-b
    Copy link
    Member

    🎉 This PR is included in version 2.6.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    DOCS: Add page for "Running the Platform"
    2 participants