-
-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Lucas A. Ouverney edited this page Jan 16, 2025
·
5 revisions
Jason is a tool for building local NoSQL databases with JSON π. Built with TypeScript and zero dependencies, it generates collections and documents with built-in caching and UUID generation.
- π Type-safe collections and documents
- π Local JSON storage
- π Zero dependencies
- π» Built with TypeScript
- β‘ Built-in document caching
- π― Automatic UUID generation
- π Schema validation support
Choose your preferred package manager:
# Using bun
bun add -D @aurios/jason
# Using pnpm
pnpm add -D @aurios/jasonDefine your interfaces (optional but recommended for type safety):
interface User {
name: string;
age: number;
email: string;
}
interface Post {
userId: string;
content: string;
postedDate: string;
published: boolean;
}
interface IDatabase {
user: User[];
post: Post[];
}Initialize your database:
// usually in 'src/db.ts'
import { JasonDB } from '@aurios/jason'
const db = new JasonDB<IDatabase>('my-awesome-database') // defaults to 'db'Create collections
// Collections are fully typed based on your interfaces!
const userCollection = await db.collection('user')
const postCollection = await db.collection('post')For detailed information about working with collections and documents, check out:
- Collections - Learn about CRUD operations, caching, and schema validation
After setting up your database and collections, you might want to:
- Learn about collection operations
- Set up schema validation
- Configure metadata tracking
- Explore caching options
For more detailed examples and API documentation, check out the other wiki pages.