Skip to content

Commit

Permalink
docs: Added docs regarding postman, and refactored architecture diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed May 14, 2024
1 parent 90be033 commit f1c9777
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 34 deletions.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ Please ensure your pull request adheres to the following guidelines:
- Your PR should follow this pattern: `fix|feat|chore|docs|style|refactor|perf|test|ci|build|breaking-change|revert: <description>`. For example, `feat: add new feature` or `fix: fix a bug`. Note that description can contain only alphanumeric characters and `-`, `.` and `_` characters.
- Before you make a push to your branch, make sure you rebase your branch with the latest changes from the `develop` branch.

## API Documentation Contribution

We are managing our API documentation using Postman. Hence, for any changes to the API that requires changes to the API documentation as well, they can be implemented in one way or the other:

- Either, you can manually update the collections in [postman/collections](./postman/collections/) and make the PR.
- Or, you can export the collection from Postman, paste them in the respective files in [postman/collections](./postman/collections) and make the PR.

## Documentation

We love documentation contributions! Whether it's more complete descriptions, new examples, or better formatting, any help improving the documentation is appreciated.
Expand Down
27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,32 +76,6 @@ Our goal is to enable you to manage your secrets effortlessly. We don't want to

- **Integrations**: Our vast library of integration allows you to use keyshade with your favorite tools and platforms.

## Architecture

The following few diagrams try to explain the architecture of keyshade.

### Control Flow

![Control Flow](./blob/control-flow.png)

### Hierarchical Structure

![Hierarchical Structure](./blob/data-hierarchy.png)

### Behind the curtain

#### Projects

![Projects](./blob/projects.png)

#### Creating secrets

![Creating secrets](./blob/secret-creation.png)

#### Retrieving secrets

![Retrieving secrets](./blob/secret-retrieval.png)

## Setting things up

We maintain an in-detailed documentation about how to get started with keyshade. You can find it [here](https://docs.keyshade.xyz/).
Expand All @@ -111,6 +85,7 @@ We maintain an in-detailed documentation about how to get started with keyshade.
We welcome contributions from everyone. Please read our [contributing guide](./CONTRIBUTING.md) to get started.

## Contributors

<a href="https://github.com/keyshade-xyz/keyshade/graphs/contributors">
<img src="https://contrib.rocks/image?repo=keyshade-xyz/keyshade&max=400&columns=20" />
<img src="https://us-central1-tooljet-hub.cloudfunctions.net/github" width="0" height="0" />
Expand Down
9 changes: 6 additions & 3 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Table of contents

- [❔ What is keyshade?](README.md)
- [🏗️ Architecture of keyshade](architecture-of-keyshade.md)

## 🥰 CONTRIBUTING TO KEYSHADE

- [Summary](contributing-to-keyshade/summary.md)
- [Design of our code](contributing-to-keyshade/design-of-our-code/README.md)
- [Organization of code](contributing-to-keyshade/design-of-our-code/organization-of-code.md)
- [API](contributing-to-keyshade/design-of-our-code/api.md)
- [Integrations](contributing-to-keyshade/design-of-our-code/integrations.md)
- [Prerequisites](contributing-to-keyshade/prerequisites.md)
- [Environment Variables](contributing-to-keyshade/environment-variables.md)
- [Setting things up](contributing-to-keyshade/setting-things-up.md)
- [Running things locally](contributing-to-keyshade/running-things-locally/README.md)
- [Running the API](contributing-to-keyshade/running-things-locally/running-the-api.md)
- [Design of our code](contributing-to-keyshade/design-of-our-code/README.md)
- [API](contributing-to-keyshade/design-of-our-code/api.md)
- [Integrations](contributing-to-keyshade/design-of-our-code/integrations.md)
- [API Testing](contributing-to-keyshade/running-things-locally/api-testing.md)
29 changes: 29 additions & 0 deletions docs/architecture-of-keyshade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
description: Glimpse into the bigger picture
---

# 🏗️ Architecture of keyshade

The following few diagrams try to explain the architecture of keyshade.

### Control Flow

![Control Flow](../blob/control-flow.png)

### Hierarchical Structure

![Hierarchical Structure](../blob/data-hierarchy.png)

### Behind the curtain

#### Projects

![Projects](../blob/projects.png)

#### Creating secrets

![Creating secrets](../blob/secret-creation.png)

#### Retrieving secrets

![Retrieving secrets](../blob/secret-retrieval.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
description: An insight into how our codebase is organized
---

# Organization of our code

In this section, we will discuss how our codebase is organized. We have tried to keep the codebase as modular as possible to make it easier for developers to understand and contribute to the project. Here are the packages, sub-packages, and how they all contribute to the project.

## Packages under `apps` directory

The `apps` directory contains all the applications that are part of the project. Each application is a separate package and has its own `package.json` file. The applications are:

- [**`api`**](../../../apps/api/): The main API server that serves the REST API.
- [**`api`**](../../../apps/web/): The web application that serves the homepage.
- [**`platform`**](../../../apps/workspace/): The platform application hosts the UI that allows users to do the actual work.

## Packages under `packages` directory

The `packages` directory contains all the shared packages that are used across the applications. These packages are:

- [**`eslint-config-custom`**](../../../packages/eslint-config-custom/): Contains the custom ESLint configuration for the project.
- [**`tsconfig`**](../../../packages/tsconfig/): Contains the custom TypeScript configuration for the project.

Apart from the `package.json` files used in the individual packages, we also have a root level `package.json` file that contains the scripts to run the applications and the shared packages. This file also contains the dependencies that are shared across the applications.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ description: Compiles a list of article to help running the services locally

# Running things locally

This document (and the sub-series) guides you on how you can run and test each of the applications on your local device. There are two categories of projects:

* The main ones under the apps directory
* The examples of the SDKs
This document (and the sub-series) guides you on how you can run and test each of the applications on your local device.

## Run locally

You can pick up any of these topics from the following and start with it.

* [Running the API](running-the-api.md)
- [Running the API](running-the-api.md)
- [API Testing](api-testing.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: API testing using Postman
---

# API Testing

We use Postman to test our APIs. All of our endpoints are tested using Postman and we maintain a detailed documentation of every endpoint in our Postman collection. You can find the workspace in [here](https://www.postman.com/blue-crescent-581920/workspace/keyshade)

We maintain an API named [`keyshade API`](https://www.postman.com/blue-crescent-581920/workspace/keyshade/api/a31bdb66-69e3-469b-afb4-f2051385e634?branch=develop) in our Postman workspace. This API contains all the endpoints that we have in our application. This is where you can find all the collections which you can use to develop/test our APIs

## Getting started

- For starters, make sure you have Postman installed on your system. If not, you can download it from [here](https://www.postman.com/downloads/)
- Once you have Postman installed, you can go to the API link mentioned above.
- For every collection in the API, the requests hold one or more examples that you can use to test the API. You can also find the schema of the request itself.

0 comments on commit f1c9777

Please sign in to comment.