Skip to content

Commit

Permalink
docs: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jan 12, 2024
1 parent c8c10da commit 7b17c6c
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 7 deletions.
46 changes: 40 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,43 @@
<div align="center">
<img src="https://github.com/microlinkhq/cdn/raw/master/dist/logo/banner.png#gh-light-mode-only" alt="microlink logo">
<img src="https://github.com/microlinkhq/cdn/raw/master/dist/logo/banner-dark.png#gh-dark-mode-only" alt="microlink logo">
<br>
<br>
<img src="https://github.com/microlinkhq/openkey/raw/master/design/banner.jpg#gh-light-mode-only" alt="microlink logo">
<img src="https://github.com/microlinkhq/openkey/raw/master/design/banner.jpg#gh-dark-mode-only" alt="microlink logo">
</div>

![Last version](https://img.shields.io/github/tag/microlinkhq/openkey.svg?style=flat-square)
[![Coverage Status](https://img.shields.io/coveralls/microlinkhq/openkey.svg?style=flat-square)](https://coveralls.io/github/microlinkhq/openkey)
[![NPM Status](https://img.shields.io/npm/dm/openkey.svg?style=flat-square)](https://www.npmjs.org/package/openkey)

> an AWS Gateway replacement for usage plans and keys for your HTTP API endpoint
> **openkey** is authentication & rate limit for HTTP backed in Redis.
**openkey** is:
- Backed by Redis.
- Easy to add for HTTP services.
- Authentication & rate limit control.
- Heavily tested, with pitfalls preventions.
- Designed with the best ractices for readability.
- Developed to be used millions of times every day.
- Cheap at any scale, portable to any cloud. No vendor lock-in.

## Installation

You can install it via npm:

```sh
$ npm install openkey
```

## Concepts

<div align="center">
<img src="https://github.com/microlinkhq/openkey/raw/master/design/concepts.jpg#gh-light-mode-only" alt="microlink logo">
<img src="https://github.com/microlinkhq/openkey/raw/master/design/concepts.jpg#gh-dark-mode-only" alt="microlink logo">
</div>

**openkey** orbits around three concepts:

- **Plans**: Represents the quota, rate limit, and throttle information specified as a plan.
- **Keys**: Represents the credentials used during the authentication step and which plan is associated.
- **Usage**: Keep track of how much plan is available and consumed with the associated key.

## FAQ

Expand All @@ -19,7 +47,13 @@ Until **openkey**, we use AWS Gateway feature for keys and plans for years. Alth

### Is it a AWS Gateway replacement?

No, and we are not aspiring for it. We used to use a very specific feature present in the AWS Gateway service, and **openkey** is a replacement for that features, that's all. AWS Gateway can still do a lot of more things that this library.
No, and we are not aspiring for it. We used to use a very specific feature present in the AWS Gateway service, and **openkey** is a replacement for that features.

We wanted to own the authentication & rate limit of our service. AWS Gateway can still do a lot of more things that this library.

### Why not TypeScript?

This library is intended to be used millions of times every day. We wanted to have granular control as much as possible, and adding a TypeScript transpilation layer isn't ideal from a performance and maintenance perspective.

### Why Redis?

Expand Down
Binary file added design/banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/concepts.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/openkey.sketch
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openkey",
"description": "an AWS Gateway replacement for usage plans and keys for your HTTP API endpoint",
"description": "authentication & rate limit for HTTP backed in Redis.",
"homepage": "https://github.com/microlinkhq/openkey",
"version": "0.0.0",
"type": "module",
Expand Down

0 comments on commit 7b17c6c

Please sign in to comment.