zitejs
v0.9.37
Published
The Zite framework — build apps on Zite Database
Readme
zitejs
The Zite framework package. Provides typed access to your Zite Database, API endpoints, authentication, and more.
Usage
// Database client (generated per-project by `zite sync`)
import { zite } from 'zitejs/db';
const users = await zite.users.findMany();
// Define API endpoints
import { createEndpoint, ZiteError } from 'zitejs/api';
export default createEndpoint({
execute: async ({ input }) => { ... },
});
// Authentication
import { useAuth } from 'zitejs/auth';
const { user } = useAuth();
// File uploads
import { useUpload } from 'zitejs/upload';
// PDF generation
import { ZitePdf } from 'zitejs/pdf';
// Scheduled tasks
import { ZiteSchedule } from 'zitejs/schedules';