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
| Wire | Package | Description |
|---|---|---|
| Core | @fluxkitdev/core | Config, logging, validation, crypto, database, HTTP |
| Auth | @fluxkitdev/auth | Local auth, OAuth, JWT, magic links |
| Messaging | @fluxkitdev/messaging | Email, SMS, WhatsApp |
| Store | @fluxkitdev/store | File uploads, CRUD, backups |
| Pay | @fluxkitdev/pay | Stripe, PayPal, on-chain payments |
| Onchain | @fluxkitdev/onchain | Wallets, contracts, transactions, NFTs |
| UI | @fluxkitdev/ui | React 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
- Installation -- Detailed setup instructions
- Architecture -- Understand how FluxKit works under the hood
- Core Wire -- Explore the foundation of FluxKit