All Projects → sdslabs → zap-db

sdslabs / zap-db

Licence: MIT license
An easy to use JSON database written with ease of setup and memory management of slack bots in mind.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to zap-db

Chatbot
Python ChatBot 💬
Stars: ✭ 250 (+142.72%)
Mutual labels:  bots
ark.db
Small and fast JSON database for Node and browser. 😋
Stars: ✭ 65 (-36.89%)
Mutual labels:  db
mongoose-api-generator
Autogenerate a REST API from your Mongoose models
Stars: ✭ 19 (-81.55%)
Mutual labels:  db
BEW-2.5-Strongly-Typed-Languages
💪 Learn and implement the design patterns and best practices that make Go a top choice at high-velocity startups like Lyft, Heroku, Docker, Medium, and more!
Stars: ✭ 14 (-86.41%)
Mutual labels:  bots
database labs
initial set of databases labs
Stars: ✭ 19 (-81.55%)
Mutual labels:  db
Blankly
🚀 💸 Easily build, backtest and deploy your algo in just a few lines of code. Trade stocks, cryptos, and forex across exchanges w/ one package.
Stars: ✭ 1,456 (+1313.59%)
Mutual labels:  bots
Rasatalk
A chatbot framework for Rasa NLU
Stars: ✭ 225 (+118.45%)
Mutual labels:  bots
info-bot
🤖 A Versatile Telegram Bot
Stars: ✭ 37 (-64.08%)
Mutual labels:  bots
OrionServer
An open-source, centralized HTTPS botnet
Stars: ✭ 58 (-43.69%)
Mutual labels:  bots
tgintegration
Integration test and automation library for Telegram Messenger bots based on Pyrogram.
Stars: ✭ 113 (+9.71%)
Mutual labels:  bots
StellarSQL
🚧 (Archived) StellarSQL: a minimal SQL DBMS written in Rust
Stars: ✭ 78 (-24.27%)
Mutual labels:  db
tool-db
A peer-to-peer decentralized database
Stars: ✭ 15 (-85.44%)
Mutual labels:  db
db-redis
Yii DBAL Redis connection
Stars: ✭ 14 (-86.41%)
Mutual labels:  db
sqllex
The most pythonic ORM (for SQLite and PostgreSQL). Seriously, try it out!
Stars: ✭ 80 (-22.33%)
Mutual labels:  db
sqlt
SqlT golang实现的类似MyBaits的Sql 工具
Stars: ✭ 28 (-72.82%)
Mutual labels:  db
Awesome Bots
The most awesome list about bots ⭐️🤖
Stars: ✭ 2,864 (+2680.58%)
Mutual labels:  bots
telectron
Telegram desktop client [WIP]
Stars: ✭ 19 (-81.55%)
Mutual labels:  bots
facilejdbc
FacileJDBC - Fast, simple and lightweight JDBC wrapper
Stars: ✭ 34 (-66.99%)
Mutual labels:  db
bpre
bot protection reverse engineering
Stars: ✭ 181 (+75.73%)
Mutual labels:  bots
MaratonaBots
Códigos em Node.js da Maratona Bots
Stars: ✭ 29 (-71.84%)
Mutual labels:  bots

zap-db

An easy to use JSON database written with ease of setup and memory management of slack bots in mind.

CI MIT License Discord

Concept

  1. There's an admin for the database server, only who can create new JSON databases.

  2. On creating a new database, the user will receive a token which can be used to make requests to the database server. This user is called the owner and there can only be one owner of a JSON database.

  3. An owner can later on create more tokens with varying scopes which are read, write, and delete. These child tokens can have any combination of the aforementioned scopes. These can be created in any number of amounts, yet access to them can be revoked by the db owner.

  4. Ofcourse, admin can also revoke owner's access to the database and can delete the db as well. It's just common courtesy to send the backup of the database to the owner before demolishing it.

  5. Each request should be made with a token in headers of the request. More precisely, the Authorization header. The token contains the database information and hence, there is no need to specify the db in routes.

  6. Routes should contain the basic GET / and POST / for reading and writing, along-with DELETE / for deleting the database but should also contain PATCH / for patch updates. In case of patch, only the JSON specified in the request body is updated.

    For example:

    {
       "name": "Thanos",
       "work": "Destroy 50% of the universe",
    }

    In the above case, a request with the body:

    {
       "work": "Save 50% of the universe"
    }

    Should just update the work part of the JSON.

Development

  1. Clone the repository and cd to it.

  2. Install dependencies:

    $ npm install
  3. Copy the sample.config.json as config.json and make required changes:

    $ cp sample.config.json config.json
  4. Password in config is the sha256 of the password you want to keep for the admin. Use the following command to hash:

    $ npm run hash
    
    Input your password:
    > ...
    ab5df625bc76dbd4e163bed2dd888df828f90159bb93556525c31821b6541d46
  5. Run the server in watch mode (reloads on file change):

    $ npm run watch
  6. Run npm run format to format auto-fixable errors.

  7. Run npm run lint to check for linting errors.

Postman Collection : https://www.getpostman.com/collections/9135694a2a9a2410d3ae

Got Questions?

Hop in to our Discord Server if you have any questions or if you'd like to contribute to the project

License

This project is under the MIT license. See NOTICE for thirdparty license notices.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].