TypeScript excludes node_modules by default, and dist is handled by outDir or include patterns. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@reviq/db
Database client and helper functions for the RevIQ platform.
Usage
import { createDb } from "@reviq/db";
const db = createDb(process.env.DATABASE_URL);
// Use db with Kysely queries
const users = await db.selectFrom("users").selectAll().execute();
// Clean up when done
await db.destroy();
Exports
Client
createDb(url)- Create a Kysely database instance
Helper Functions
executeBootstrap(trx, input)- Bootstrap a new database with superuser and orggenerateToken()- Generate an API tokenhashToken(token)- Hash a token for storageparseToken(token)- Parse and validate a tokenTOKEN_PREFIX- Thereviq_prefix for API tokens
Types
Database- Re-exported from@reviq/db-schemaBootstrapInput/BootstrapResult- Types for bootstrap operation