zase sync engine
Super fast and efficient real-time REST API with a client-side sync engine written in Zig programming language.
import { createClient } from "@zase/client";
import type { Database } from "@zase/client";
const client = createClient<Database>({
endpoint: "https://acme.cloud.zase.dev"
});
// Real-time sync with server
const { data, error } = await client
.from("todos")
.select("*")
.subscribe((update) => {
console.log(update);
});Feature-packed sync engine
zase combines powerful features to provide a seamless real-time data synchronization experience.
PostgreSQL-powered
Built on top of PostgreSQL for reliable, scalable, and proven database performance.
Real-time sync
Automatically sync data between client and server with minimal network overhead.
Zero-based
No specific starting point or endpoint required. Flexible and adaptable to your needs.
REST API
Follows RESTful principles for a familiar, predictable, and easy-to-use API.
Zig-powered
Written in Zig for maximum performance and minimal resource usage.
Client-side engine
Efficient sync engine that runs directly in the browser for optimal performance.
How it works
zase's architecture is designed for efficiency, speed, and reliability.
Client-side sync engine
The zase client-side sync engine runs directly in your browser, efficiently managing data synchronization with minimal overhead.
Local cache
Data is cached locally for instant access and offline functionality.
Conflict resolution
Smart conflict resolution ensures data integrity across devices.
Optimistic updates
Changes appear instantly in the UI while syncing in the background.
Server-side PostgreSQL
On the server, zase connects directly to PostgreSQL, providing a secure and scalable backend for your data.
RESTful API
Familiar REST endpoints make integration with existing systems simple.
Real-time notifications
WebSocket-based updates ensure all clients stay in sync.
Transaction safety
PostgreSQL's transaction system ensures data consistency.
Get started with zase
Installation is quick and simple. Choose your preferred method below.
npm install @zase/clientBasic usage
import { createClient } from "@zase/client";
import type { Database } from "@zase/client";
// Initialize the client
const client = createClient<Database>({
endpoint: "https://acme.cloud.zase.dev",
});
// Query data
const { data, error } = await client
.from("users")
.select("*")
.eq("active", true);
// Insert data
const insertRes = await client
.from("users")
.insert({
name: "Jane Doe",
email: "jane@example.com",
});
// Subscribe to changes
const subscription = client
.from("messages")
.on("INSERT", (payload) => {
console.log("New message:", payload);
})
.subscribe();
Contribute to zase
zase is an open-source project. We welcome contributions from developers of all skill levels.
Fork the repository
Start by forking the zase repository to your GitHub account.
Make your changes
Implement new features, fix bugs, or improve documentation.
Create a pull request
Submit your changes via a pull request for review.
See your work merged
After approval, your contribution will be merged into zase.