Conduit icon indicating copy to clipboard operation
Conduit copied to clipboard

Batteries-included backend that works with any stack.


logo

The only Backend you'll ever need. Written in NodeJS, works with any stack

CodeFactor Badge Latest SemVer Release License Commit Activity

Conduit Platform

Conduit is a NodeJS-based Self-Hosted backend, that aims to cut down development times by providing ready-made modules that offer common functionality out of the box, and allowing maximum flexibility to add custom functionality.

Check out our docs here: Documentation
Wanna see what comes next: Roadmap
Help us make Conduit great: Contribute
Learn more: Website

Features ✔️

  • Transports: REST, GraphQL, WebSockets (via Socket.io) and gRPC
  • Database support for MongoDB and PostgreSQL
  • In-memory database through Redis
  • All functionalities and routes available both as REST and GraphQL endpoints
  • CMS module to create and edit schemas from the admin panel and also add custom logic through the "custom endpoints" functionality
  • Swagger docs and GraphQL explorer with full route documentation
  • Authentication system with JWT and 2FA, supporting ServiceAccounts/API keys as well as local(username/password or email/password), oAuth(Facebook, Google, Twitch)
  • Basic security built-in with Client Id/secret for all requests, rate limiting and Helmet.
  • Emails with template support
  • SMS for 2FA or plain SMS send
  • Storage using S3, GCS and Azure Blob Storage
  • Chat
  • Forms for basic form submission and email forwarding
  • Conduit SDK can be used to add new modules or custom services
  • so much more

Requirements ⚡

  • NodeJS >= 16 or Docker
  • MongoDB or PostgreSQL
  • Desire to create something awesome

Quickstart

This script uses docker compose to spin up some basic modules for you to test.

source <(curl -s https://getconduit.dev/bootstrap)

Open http://localhost:8080 to check the admin panel (username: admin, password: admin)

Your application API will be on http://localhost:3000
Your administration API will be on http://localhost:3030

Check out Swagger on: /swagger and /admin/swagger
Check out GraphQL on /graphql

Running from source 🔨

yarn
npx lerna run build
REDIS_HOST=localhost REDIS_PORT=6379 yarn --cwd ./packages/core start
CONDUIT_SERVER=0.0.0.0:55152 SERVICE_IP=0.0.0.0:55165 DB_CONN_URI=mongodb://localhost:27017 yarn --cwd ./modules/database start

Then repeat the following step for every additional module you wish to bring online, specifying any additional env vars.

CONDUIT_SERVER=0.0.0.0:55152 SERVICE_IP=0.0.0.0:PORT yarn --cwd ./modules/MODULE start

Environment Variables 📃

Core:

Variable Description Required Example
REDIS_HOST Redis Address True localhost
REDIS_PORT Redis Port True 6379
ADMIN_HTTP_PORT Port to be used by admin REST and GrahpQL APIs False 3030
ADMIN_SOCKET_PORT Port to be used by admin WebSockets API False 3030
SERVICE_PORT Port to be used by the gRPC server False 55152
MASTER_KEY Master Secret False M4ST3RK3Y
GRPC_KEY Specifying a secret enables gRPC signed request protection False someRandomSecret
DEBUG__DISABLE_INACTIVE_MODULE_REMOVAL Prevent removal of inactive modules from Config False true

Database

Variable Description Required Example Default
DB_CONN_URI DB Connection URI False postgres://conduit:pass@localhost:5432/conduit mongodb://localhost:27017
DB_TYPE DB Engine Type False postgres mongodb

Generic module env variables are also supported, with required ones being obligatory.

Router

Variable Description Required Example
CLIENT_HTTP_PORT Port to be used by application REST and GrahpQL APIs False 3000
CLIENT_SOCKET_PORT DPort to be used by application WebSockets API False 3001

Generic module env variables are also supported, with required ones being obligatory.

Generic Module

Variable Description Required Example
CONDUIT_SERVER Conduit Core's address and port True 0.0.0.0:55152
SERVICE_IP Always 0.0.0.0 and a port numer True 0.0.0.0:55190
REGISTER_NAME Set to true if running in Kubernetes False true
GRPC_KEY Specifying a secret enables gRPC signed request protection (use across modules) False someRandomSecret