Initial commit

This commit is contained in:
Mindboost
2025-07-01 10:53:26 +00:00
commit 38050e5c69
416 changed files with 48708 additions and 0 deletions

21
lib/db.ts Normal file
View File

@@ -0,0 +1,21 @@
import { Dexie, type Table } from 'dexie'
export interface AudioSource {
id?: number;
name: string;
buffer: ArrayBuffer;
}
export default class Database extends Dexie {
// 'audiosources' is added by dexie when declaring the stores()
// We just tell the typing system this is the case
audiosources!: Table<AudioSource>
constructor () {
super('audiosources')
this.version(1).stores({
audiosources: '++id, &name' // Primary key and indexed props
})
}
}
export const db = new Database()