onejs

onejs / on-zero

Public

A thin layer over @rocicorp/zero for Rails-like, DRY models, queries, mutations, permissions

30
0
100% credibility
Found Feb 02, 2026 at 27 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

on-zero simplifies building React apps with the Zero real-time database by adding code generation for models and queries, typed mutations, permissions, and easy client-server integration.

How It Works

1
πŸ” Discover on-zero

You find a helpful tool that makes adding live-updating data to your React app feel effortless and secure.

2
πŸ“ Describe your data

You outline the kinds of information your app needs, like messages or user profiles, and set simple rules for who can view or edit them.

3
❓ Write data questions

You create plain questions to fetch exactly the data you want, automatically keeping it fresh and permission-safe.

4
✨ Connect your app

You wrap your screens with a simple provider, and now hooks like useQuery bring live data right into your components.

5
πŸ”’ Secure the backend

You prepare your server to safely handle updates and queries from users.

6
πŸš€ Link it all together

You generate the connections with one easy step, and everything wires up perfectly.

πŸŽ‰ Live app ready

Your app now syncs data in real-time across users, with security built-in, feeling smooth and reliable.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 27 to 30 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is on-zero?

on-zero is a TypeScript layer over rocicorp/zero that delivers Rails-style models, queries, mutations, and permissions for React apps. It lets you write plain functions as type-safe, auto-synced queries using a global builder, co-locate schemas with CRUD mutations and server-side permissions, and generate validators/types via CLI. This cuts boilerplate for data-heavy UIs, like turning `zql.table.where(perm).limit(20)` into a hookable query.

Why is it gaining traction?

Unlike raw Zero's low-level queries, it auto-generates synced queries from TS functions with valibot validation, adds permission helpers that run server-only, and provides React hooks for optimistic checks. The CLI's watch mode regenerates types/tables on changes, enabling fast Rails-like iteration without manual wiring. Devs grab it for DRY code in complex apps, skipping thin client os github boilerplate.

Who should use this?

React/TS devs on rocicorp/zero building chat apps, dashboards, or CRUD-heavy tools who hate scattering queries/mutations. Suits full-stack teams wanting model files with built-in perms, like serverWhere for RLS-style access in notifications or channels.

Verdict

Worth adopting if you're deep in Zeroβ€”CLI and hooks deliver real productivity. But 30 stars and 1.0% credibility signal early maturity; docs shine but expect rough edges without wide tests. Prototype it before production.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.