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
- 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
- NodeJS >= 16 or Docker
- MongoDB or PostgreSQL
- Desire to create something awesome
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
yarn
npx lerna run build
REDIS_HOST=localhost REDIS_PORT=6379 yarn --cwd ./packages/core start
CONDUIT_SERVER=0.0.0.0:55152 SERVICE_URL=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_URL=0.0.0.0:PORT yarn --cwd ./modules/MODULE start
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 |
GRPC_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 |
SERVICE_MONITOR_INTERVAL_MS |
Service discovery monitor interval in ms (default: 30000) | False | 5000 |
SERVICE_RECONN_RETRIES |
Reconnection attempts before removal of offline services (default: 5) | False | 5 |
SERVICE_RECONN_INIT_MS |
Initial delay for linear backoff reconnection to offline services in ms (default: 250) | False | 125 |
DEBUG__DISABLE_SERVICE_REMOVAL |
Prevent removal of offline services | False | true |
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.
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.
Variable | Description | Required | Example |
---|---|---|---|
CONDUIT_SERVER |
Conduit Core's address and port | True | 0.0.0.0:55152 |
SERVICE_URL |
This should be where this service listens on. If behind a LB it should point to the LB's IP/DNS | False | 0.0.0.0:55190 |
GRPC_PORT |
Port to be used by the gRPC server | False | 55190 |
GRPC_KEY |
Specifying a secret enables gRPC signed request protection (use across modules) | False | someRandomSecret |