Everything you love about Firebase: real-time database, security rules, cloud functions, and hosting-but with total freedom. Build faster, work offline, and deploy anywhere with flat pricing that scales.
Get Started Free DocumentationconnectNukeBase().then(() => {
set("users.ab12", {
name: "John",
age: 32 }
)};
);
// Data Set to Database
users: {
ab12: {
name: "John",
age: 32
}
}
Everything you love about Firebase, but with full control and ownership of your data
No more "infinite scale = $100K bill." NukeBase's consumption‑based engine caps your costs—scale to millions without surprise invoices.
Write "allow"/"deny" rules just like you do in Firebase. Same path‑based syntax, same security guarantees—your client app plugs right in.
Run a local database from the same single binary or script you use in production—no extra SDKs, no emulators, zero friction.
Server‑side hooks talk directly to the raw data file. Complex lookups and calculations return in under 1 ns, every time.
All reads, writes and subscriptions flow over raw WebSockets for massive throughput up to 100k Transactions per Second.
Create, read, update and delete at any path with full atomicity while being instantly validated against your security rules before execution.
Filter, sort and paginate in milliseconds—and run sub‑ms, on‑the‑fly full‑text searches across any field.
Spin up object buckets in seconds—upload, list, download and delete files via the same WebSocket API. Comes with built‑in metadata, CORS support, ACLs and secure signed URLs.
Integrate our featherweight 2.9kb client SDK with zero external dependencies and dramatically reducing page load times.
See how NukeBase delivers more value with less complexity
Feature | NukeBase | Firebase |
---|---|---|
Pricing Model | Fixed | Usage-based, uncapped |
Self-Hosting | ✓ | ✗ |
Offline Development | Zero setup | Requires emulator |
Client Size | < 3KB | > 100KB |
Function Speed | Sub-nanosecond | Milliseconds to seconds |
Deploy Time | 1-3 seconds | 60-120 seconds |
Full-Text Search | Built-in | Requires extra service |
Familiar syntax that lets you build faster
// set() - write data at a specific path
set("users.john", {
name: "John Doe",
age: 32
}).then(response => {
console.log("User created");
});
// get() - Read data from a path
get("users.john").then(response => {
console.log(response.data); // User data
});
// update() - Modify existing data
update("users.john", {
lastLogin: Date.now(),
status: "online"
}).then(response => {
console.log("User updated");
});
// remove() - Remove data at a path
remove("users.john").then(response => {
console.log("user removed");
});
// Basic equality query
query("users", "child.age == 32").then(response => {
console.log(response.data); // All users age 32
});
// Compound conditions
query("products", "child.price < 100 && child.category == 'electronics'")
.then(response => {
console.log(response.data); // Affordable electronics
});
// Text search with includes()
query("users", "child.bio.includes('developer')").then(response => {
console.log(response.data); // Users with "developer" in their bio
});
// Subscribe to all changes at a path use value@
// or subscribe to operations set@, update@ remove@
const unsubscribe = getSub("value@users.john", event => {
console.log("User data changed:", event.data);
});
// Subscribe to updates matching a query and path
const unsubscribeQuery = querySub("update@users", "child.status == 'online'", event => {
const onlineUsers = event.data;
updateOnlineUsersList(onlineUsers);
});
// Only receive child nodes when data changes
const unsubscribeChanged = getSubChanged("set@activeOrders", event => {
notifyNewOrder(event.data);
});
// Query subscription that only notifies on changes
const unsubscribeQueryChanged = querySubChanged("value@products",
"child.stock < 5", event => {
alertLowStock(event.data);
});
// Stop listening when no longer needed
unsubscribeQueryChanged();
// Execute custom server-side logic
wsFunction("addNumbers", {
num1: 5,
num2: 7
})
.then(response => {
console.log(`The sum is: ${response.data}`); // Output: The sum is: 12
});
// Upload from a file input
const fileInput = document.getElementById('profilePicture');
const file = fileInput.files[0];
setFile("users/john/profile.jpg", file).then(response => {
showSuccess("Profile picture uploaded!");
updateProfileImage(response.data.url);
});
Powerful server-side capabilities with minimal code
// Set up a domain with SSL
const myDomain = addDomain({
domain: "myapp.com",
https: {
key: '/etc/ssl/myapp.com/privkey.pem',
cert: '/etc/ssl/myapp.com/fullchain.pem'
}
});
// Configure static file serving
myDomain.app.use(express.static('public'));
// Start the server
startDB({ local: false, http: "0.0.0.0" });
// Create a trigger that runs when data changes
addFunction("onUpdate", "requests.$requestId", function(context) {
// Check if this is a new page visit
if (context.dataAfter && !context.dataBefore) {
// Increment the total visit counter
await update("stats.totalVisits", {
//Directly access the data file
count: data.stats.totalVisits.count + 1
});
}
});
// Define a simple addition function
addWsFunction("addNumbers", function(data, admin, sessionId, userId) {
sum = data.num1 + data.num2;
return sum;
});
// When a user connects
onConnection(function(userId, sessionId) {
// Record session start time
update(`sessions.${userId}.${sessionId}`, {
start: Date.now()
});
});
// When a user disconnects
onClose(function(userId, sessionId) {
// Record session end time
update(`sessions.${userId}.${sessionId}`, {
end: Date.now()
});
});
Everything you need to know about NukeBase
NukeBase gives you all the real-time database capabilities of Firebase but with complete ownership and control of your data. You can self-host it anywhere, scale predictably, and never worry about vendor lock-in.
Yes! We've designed NukeBase with Firebase compatibility in mind. Our migration tools can help you move your data, and our client API mimics Firebase's, requiring minimal changes to your application code.
NukeBase can be self-hosted on any cloud provider (AWS, Google Cloud, Azure, DigitalOcean, etc.), your own servers, or you can use our managed cloud offering for a hassle-free experience.
Yes! We offer a generous free tier that's perfect for development, small projects, and hobby applications. You can upgrade to a paid plan when you need more capacity or advanced features.
Security is our top priority. NukeBase includes built-in encryption, granular access controls through rules, and secure authentication options. With self-hosting, you also maintain complete control over your security infrastructure.
Be among the first to experience NukeBase when we launch. Sign up now to secure early access and special pricing.
Already 1721 developers on the waitlist