shivam1608 / airbin

a simple http key value storage service over airtable database for easy access of key value pairs just like jsonbin, made and deployed with deno.

Home Page:https://airbin.deno.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Airbin πŸŒͺ

A simple http key value db service over airtable database for easy access of key value pairs just like jsonbin, made and deployed with deno. Trying Deno for the first time.

Now you don't need to signup for any free tier or buy any costly storage login directly with github and start building. Each user get a base and we call it Airbase.

Live On 🟒

https://airbin.deno.dev/

Login to get started

https://airbin.deno.dev/_/login

Airbin can be deployed on own as ONLY_SELF_HOSTED for personal easy data storage

API Documentation πŸ“˜

  • The rest api is very simple to use but has some limitations

Limitations

  • Each user only get 1200 keys.
  • Each request has a soft limit of 4 MiB data.
  • So technically you get nearly 4 GiB storage which is good for small projects

- GET

https://airbin.deno.dev/:USER_ID/:KEY

This request gets the value without token if data is set to public else token is required and returns null if no data is present at that space.

Headers πŸ“ƒ

Header Description
Authorization Bearer :TOKEN
The token can be obtained after /_/login.

OPTIONS βš™

Query Required? Description
USER_ID REQUIRED The airbase userid. can be obtained from /_/me after /_/login.
KEY REQUIRED The key where the value is saved.

- POST

https://airbin.deno.dev/:USER_ID/:KEY

This request puts the value in the :KEY and if key already has a value it overwrites the value.

Headers πŸ“ƒ

Header Description
Authorization Bearer :TOKEN
The token can be obtained after /_/login.

OPTIONS βš™

Body Required? Description
Body REQUIRED Body should be the value to store can be plain or json (prefer json).

- PATCH

https://airbin.deno.dev/:USER_ID/:KEY

This request can alter the data access to be pulbic or private(can be accessed without a token or not).

Headers πŸ“ƒ

Header Description
Authorization Bearer :TOKEN
The token can be obtained after /_/login.

OPTIONS βš™

Body (JSON) Required? Description
public REQUIRED trueor false.

- DELETE

https://airbin.deno.dev/:USER_ID/:KEY

This request deletes the :KEY from the airbase.

Headers πŸ“ƒ

Header Description
Authorization Bearer :TOKEN
The token can be obtained after /_/login.

- GET

https://airbin.deno.dev/_/me

This request gets the user detail of the authenticated token (if accessing from program need to specify x-user header with value of userid).

Headers πŸ“ƒ

Header Description
Authorization Bearer :TOKEN
The token can be obtained after /_/login.
x-user :USER_ID
The userid only to be specified when accessing via curl or scripts

For Self Hosting

airbin can be selfhosted on any platform supporting deno after that just setup the Config.js and .ENV files.

Here ONLY_SELF_HOSTING means that login via github will be disabled and only admin can create the airbases via /_/create?airbase=Name

What is ADMIN_TOKEN? it is the token which admin specify to access any value and create airbases. Here admins means the one who is hosting.

β„Ή ENV SPECIFICATIONS

Key Description
API_KEY The airtable personal access token.
WORKSPACE_KEY The airtable workspace id.
WORKSPACE_KEY The airtable workspace id.
CLIENT_ID Github oauth app client id optional for only self hosting.
CLIENT_SECRET Github oauth app client secret optional for only self hosting.
HASH_SECRET This secret is used to generate user tokens so keep it private and hard to guess.
ADMIN_TOKEN This is special admin token from which admin can access any airbase commands.

Note : Airtable has api limit of 5 req/sec

Bugs?

create the issue in the repo and i will try to fix it most probably.

No UI? small changes?, well contributions are welcomed.

Credits

HOSTED ON DENO DEPLOY

Deno.land

About

a simple http key value storage service over airtable database for easy access of key value pairs just like jsonbin, made and deployed with deno.

https://airbin.deno.dev

License:MIT License


Languages

Language:JavaScript 100.0%