NukeBase

Code Faster, Deploy in Seconds

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 Documentation
Set data with one line
connectNukeBase().then(() => {
  set("users.ab12", {
    name: "John", 
    age: 32 }
  )};
);

// Data Set to Database
users: {
  ab12: {
    name: "John",
    age: 32
  }
}

Powerful Features, Simple Interface

Everything you love about Firebase, but with full control and ownership of your data

💰

Predictable, Stable Pricing

No more "infinite scale = $100K bill." NukeBase's consumption‑based engine caps your costs—scale to millions without surprise invoices.

🔐

Firebase‑Rules Compatibility

Write "allow"/"deny" rules just like you do in Firebase. Same path‑based syntax, same security guarantees—your client app plugs right in.

💻

Offline Development

Run a local database from the same single binary or script you use in production—no extra SDKs, no emulators, zero friction.

Sub‑Nanosecond Cloud Functions

Server‑side hooks talk directly to the raw data file. Complex lookups and calculations return in under 1 ns, every time.

🚀

WebSocket‑First Performance

All reads, writes and subscriptions flow over raw WebSockets for massive throughput up to 100k Transactions per Second.

📋

Complete CRUD Operations

Create, read, update and delete at any path with full atomicity while being instantly validated against your security rules before execution.

🔍

Powerful Queries & Full‑Text Search

Filter, sort and paginate in milliseconds—and run sub‑ms, on‑the‑fly full‑text searches across any field.

📂

Easy‑to‑Use Bucket Storage

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.

🕊️

Ultra‑Lightweight Client SDK

Integrate our featherweight 2.9kb client SDK with zero external dependencies and dramatically reducing page load times.

NukeBase vs Firebase

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

Simple, Powerful API

Familiar syntax that lets you build faster

Create, Read, Update, Delete
// 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");
});
Querying and filtering data
// 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
});
Real-time data subscriptions
// 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();
WebSocket server functions
// 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
});
File upload and storage
// 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);
});

Server-Side Configuration

Powerful server-side capabilities with minimal code

Basic domain setup
// 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" });
Simple database functions
// 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 
    });
  }
});
WebSocket server functions
// Define a simple addition function
addWsFunction("addNumbers", function(data, admin, sessionId, userId) {
  sum = data.num1 + data.num2;
  return sum;
});
Track user connections
// 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() 
  });
});

Frequently Asked Questions

Everything you need to know about NukeBase

How is NukeBase different from Firebase?

+

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.

Can I migrate my existing Firebase app to NukeBase?

+

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.

What are the hosting options for NukeBase?

+

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.

Is there a free tier available?

+

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.

How secure is NukeBase?

+

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.

Join Our Exclusive Waitlist

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