/backend

The API of the Kiwi app. Feel free to make changes to the code to make it look better, to update older parts of documentation or to write Unit Tests you think might be necessary

Primary LanguageC#

https://img.shields.io/github/last-commit/Kiwi-DB/backend/master?label=Last%20commit

Kiwi RestAPI (In progress...)

Documentation is still incomplete, it may need various reviews due to the constant changes to the code


What is this project about?

Kiwi is a serverless key-value database that can be accessed through HTTP requests to an API server (this repository). The name Kiwi comes from the words "Key" and "Value", the first letters are pronounced "Key" and "Vi", so basically "Kiwi"

How does it work?

Basically, having an account means having a token key, that can be used to gather an API key that can access the DB connected to the account.

Users are stored in a PostgreSQL DB and their ID (which is an auto-incremental value) is the Redis DB ID.

NOTE: needs better explaination

Environment variables

Those environment variables NEED to be set in order to have a functioning version of the backend for yourself

Key Example value Description
apihost https://localhost:5001/ The API endpoint URL
postgreshost 127.0.0.1 The IP address of the PostgreSQL database
postgresport 5432 The port which your PostgreSQL database uses to communicate
postgresuser userboi The username of the PostgreSQL user that has permissions over the database
postgresdb kiwidb The database that contains the tables
postgrespassword verysecret The password of the PostgreSQL user
smtphost 127.0.0.1 The host (domain/IP) that points to your mail server (SMTP)
smtpport 587 The port which your SMTP server uses to communicate
smtpfrom test@yourdomain.io The username used to log into your SMTP server
smtpkey verysecret The password used to login your SMTP server
jwtkey Very long long string Super secret string used to sign JWT tokens (> 32 characters long)
redishost 127.0.0.1 The ip or domain where your redis instance is located
redisport 6379 spo The port which your Redis instance uses to communicate
redispassword (OPTIONAL) secretvery If your redis instance requires a password to login, then fill this env var