snoozestack
Data

State your project carries with it.

A database whose shape comes from a file you commit, buckets declared beside it, and one directory holding all of it — the same on your machine and in production.

snoozestack/
// snoozestack/schema.mjs
export const notes = defineTable("notes", {
id: schema.uuid().primaryKey(),
user_id: schema.uuid().notNull(),
});
01

The schema is a file

Tables come from committed definitions, and each change is recorded as reviewable SQL.

02

Files are declared too

Buckets, visibility, and who may write are part of the project, not console settings.

03

State stays isolated

Local, every named preview, and live hold genuinely separate data.

Data, running

local development
id
course
score
1
Pebble Beach
72
2
Torrey Pines
68
3
Bandon Dunes
74
4
St Andrews
70
04

The schema is something you commit

Tables are declared in a file using a portable type vocabulary, so the shape of your data is reviewed in the same pull request as the code that depends on it. Saving the file updates your local database in place; publishing applies the same declaration to the project.

  • Types map cleanly across SQL engines, so the schema isn't locked to one
  • Generated migrations record every change as reviewable SQL
  • A committed seed gives each fresh checkout working data
snoozestack/schema.mjs
import { defineTable, schema } from "snoozestack-js";

export const notes = defineTable("notes", {
  id: schema.uuid().primaryKey(),
  user_id: schema.uuid().notNull(),
  body: schema.text().notNull(),
});
05

Files declared, access decided by you

Buckets are part of the project rather than console settings, and nothing reaches them directly from a client. A function mints a scoped, expiring URL — so the rule about who may write where lives in code you reviewed.

  • Public and private buckets, declared with the rest of the project
  • Signed operations instead of a policy language to learn
  • Each namespace holds genuinely separate files
snoozestack/project.toml
[[storage]]
name = "avatars"
public = true

[[storage]]
name = "documents"   # private by default

Built for real applications

What teams build with Data.

Per-user records

Notes, orders, messages — the ordinary tables an app is made of, read and written only through functions that scope every query to the caller.

User uploads

Avatars and attachments go to a declared bucket while the row keeps only the path, so queries stay small and the two are authorized separately.

Throwaway environments

A preview gets its own database and its own files, so a risky change can be exercised against real shapes without touching live data.

A portable data layer keeps the model understandable wherever the application runs.

Why Snoozestack →

More of the platform