Kroxt BaaS is an all-in-one backend-as-a-service platform built on top of MongoDB and designed to equip modern web and mobile applications with secure user authentication, automatic document collection CRUD, bucket storage, transactional email dispatches, and VM-isolated serverless functions.
The fastest way to get started with Kroxt BaaS is by running our official scaffolding tool. It prompts you for project credentials, framework preferences, and styling settings to configure a production-ready application in seconds.
npx create-kroxt-appThis command supports **Next.js**, **Vite + React**, and **React Native (Expo)** templates, including optional automatic Tailwind CSS setups and vanilla fallbacks.
To add Kroxt BaaS to an existing project, install the client SDK package manually:
npm install @kroxt/baas-sdkImport and instantiate the Kroxt client using your credentials.
import { Kroxt } from "@kroxt/baas-sdk";
export const baas = new Kroxt({
projectId: "YOUR_KROXT_PROJECT_ID",
apiKey: "YOUR_KROXT_PUBLIC_API_KEY",
});
export default baas;Create a document in a collection (verify that you have created the collection in the dashboard first):
import { baas } from "@/lib/kroxt";
async function createTodo() {
const todo = await baas.collection("todos").create({
text: "Learn Kroxt BaaS",
completed: false,
});
console.log("Success! Document ID:", todo._id);
}