Skip to content

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.

License

Notifications You must be signed in to change notification settings

shivam1608/airbin

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published