Giter VIP home page Giter VIP logo

diode's Introduction

Diode ๐Ÿ”Œ

Open source API proxy server with an easy-to-use dashboard for configuring middlewares and secrets.



What does Diode do?

Third party APIs make it easy to integrate functionalities across apps. But using them on a purely front-end project is a hassle. Most of the time, the API endpoints require an API key which cannot be exposed on the frontend. Hence, most of us setup a proxy backend server that makes the request to the third party API with the API keys and make the frontend request this proxy server instead. While it might be a trivial solution that shouldn't take a lot of time to implement, it can get very repeatable and tedious over time.

Diode solves this problem by abstracting this proxy server and allowing you to add and configure as many API routes and consume them directly on the frontend without having to worry about exposing any API keys! Since Diode sits in between all the requests going to the third-party server, it also makes it easy to add commonly used middlewares to the API route with just a click!
Fun fact: All of this happens without you having to write a single line of code.

Features

  • ๐Ÿ’ก Easy to use dashboard.
  • โฉ Query parameters and request headers forwarding.
  • ๐Ÿ•ถ๏ธ Encrypted Secrets that get dynamically injected when making request.
  • ๐Ÿ”ฎ Request and Response structure preservation.
  • One-click middlewares for:
    • ๐Ÿšซ IP/HTTP restriction
    • โฑ๏ธ Rate-limiting
    • ๐Ÿ“Œ Caching
  • ๐Ÿ’™ Open source, can be self-hosted.

Try it out

Deploy Try in Play-With-Docker

Note: Deploying on Heroku free plan may cause higher latencies

Project Setup

Pre-requisites:

  • Node.js and npm installed.
  • Postgres installed.
  • Redis installed.

Clone the repo, install dependencies

git clone https://github.com/blenderskool/diode.git
cd diode
npm install

Setup environment variables

Create a .env file and provide values for all the variables listed in .env.example file.

Setup database

In the root of this project, run the following command to setup the database schema

npx prisma db push

Build the project

npm run build

Start the server

npm run start

Diode will start running at port 3000.

Explore the database

Prisma Studio makes it easy to explore and edit the data in the database. You can start it by running

npx prisma studio

Prisma Studio will be running at port 5555.

License

Diode is MIT Licensed

diode's People

Contributors

blenderskool avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.