Core Concepts
Understand the fundamental building blocks of Dreambase, including its architecture and key services like databases, storage, and functions.
Overview
Dreambase provides a unified platform for building modern applications with built-in backend services. You get scalable databases, secure storage, serverless functions, and realtime capabilities—all managed from a single dashboard. This architecture eliminates the need to provision separate infrastructure, letting you focus on your code.
Dreambase follows a multi-tenant cloud model where your projects are isolated for security and performance.
Platform Architecture
Dreambase uses a layered architecture: your application interacts with the API gateway, which routes requests to core services like databases, storage, and functions. Realtime updates flow through a pub/sub system.
This design ensures low-latency responses and automatic scaling.
Key Services
Explore Dreambase's core services through these feature cards.
Databases
Flexible document and relational databases with powerful querying.
Storage
Secure file handling with transformations and previews.
Functions
Serverless compute in multiple runtimes.
Databases and Data Modeling
Databases in Dreambase support document collections with JSON-like documents. You define attributes, indexes, and relationships for efficient queries.
Data Modeling Example
Create a collection for users:
const sdk = new Dreambase.Client();
sdk.account.create('unique()', 'user@example.com', 'password');
const users = sdk.database.createCollection('users', 'Users');
from dreambase import Client
client = Client()
users = client.database.create_collection(
database_id='default',
collection_id='users',
name='Users'
)
Use indexes for fast lookups on fields like email or createdAt.
Storage and File Management
Store user uploads, images, or assets securely. Files are encrypted at rest, and you can apply transformations like resizing.
Upload Workflow
const file = sdk.storage.createFile(
'uploads',
'image.jpg',
inputFile
);
Permissions control read/write access per bucket.
Serverless Functions and Realtime
Functions
Deploy code that runs on triggers like HTTP requests or database events. Supported runtimes include Node.js, Deno, and Python.
module.exports = async (req, res) => {
res.json({ message: 'Hello from Dreambase!' });
};
def main(req):
return {'message': 'Hello from Dreambase!'}
Realtime Features
Subscribe to database changes or custom events:
sdk.subscribe('database.users', (payload) => {
console.log('User updated:', payload);
});
Next Steps
Create a Project
Sign up at https://dashboard.example.com and create your first project.
Set Up Database
Use the console to create your first collection.
Deploy a Function
Write and deploy a simple function from the dashboard.
Review the Quickstart for hands-on setup.
Last updated 1 week ago