Skip to content

Installation

Terminal window
bun add @lastshotlabs/snapshot @tanstack/react-query @tanstack/react-router jotai react react-dom

Optional peers:

Terminal window
bun add -d vite
bun add react-server-dom-webpack
src/snapshot.ts
import { createSnapshot } from "@lastshotlabs/snapshot";
export const snap = createSnapshot({
apiUrl: "/api",
auth: {
session: { mode: "cookie" },
},
loginPath: "/login",
homePath: "/",
});
import { snap } from "./snapshot";
export function AppProviders({ children }: { children: React.ReactNode }) {
return <snap.QueryProvider>{children}</snap.QueryProvider>;
}
import { ButtonBase, CardBase, RichInputBase } from "@lastshotlabs/snapshot/ui";

Focused subpaths:

import { RichInputBase } from "@lastshotlabs/snapshot/ui/rich-input";
import { EmojiPickerBase } from "@lastshotlabs/snapshot/ui/emoji-picker";
import { GifPickerBase } from "@lastshotlabs/snapshot/ui/gif-picker";
Terminal window
snapshot sync --api http://localhost:3000
snapshot sync --file ./schema.json --zod

Continue with the Quick Start.