Skip to main content

Getting Started with FluxKit

FluxKit is an open-source infrastructure toolkit designed for developers and AI agents. It provides a modular set of wires -- self-contained packages that each handle a specific concern of your application.

What is a Wire?

A wire is an independent module that provides:

  • An npm package (@fluxkitdev/<wire>) with a programmatic API
  • A REST API that is automatically mounted when the wire is loaded (except for the UI wire, which is React-only)
  • Configuration via environment variables or the FluxKit config system

Available Wires

WirePackageDescription
Core@fluxkitdev/coreConfig, logging, validation, crypto, database, HTTP
Auth@fluxkitdev/authLocal auth, OAuth, JWT, magic links
Messaging@fluxkitdev/messagingEmail, SMS, WhatsApp
Store@fluxkitdev/storeFile uploads, CRUD, backups
Pay@fluxkitdev/payStripe, PayPal, on-chain payments
Onchain@fluxkitdev/onchainWallets, contracts, transactions, NFTs
UI@fluxkitdev/uiReact components, theming, hooks

Quick Start

# Install the core wire
npm install @fluxkitdev/core

# Add the wires you need
npm install @fluxkitdev/auth @fluxkitdev/messaging
import { FluxKit } from "@fluxkitdev/core";
import { auth } from "@fluxkitdev/auth";
import { messaging } from "@fluxkitdev/messaging";

const app = new FluxKit({
wires: [auth(), messaging()],
database: {
uri: process.env.MONGODB_URI,
},
});

await app.start({ port: 3000 });

That's it. Your server is running with authentication and messaging REST APIs available at http://localhost:3000.

Prerequisites

  • Node.js 18 or later
  • MongoDB instance (local or cloud, e.g., MongoDB Atlas)
  • TypeScript (recommended but not required)

Next Steps