feat: Add notes with markdown editor #1

Merged
patrick merged 7 commits from feature/notes into main 2026-03-03 13:23:02 -08:00
Showing only changes of commit 4af2642c04 - Show all commits
+25 -1
View File
@@ -72,9 +72,33 @@ export const schema = S.Collections({
}
}
}
},
notes: {
schema: S.Schema({
id: S.Id(),
userId: S.String(),
title: S.String({ default: '' }),
content: S.String({ default: '' }),
pinned: S.Boolean({ default: false }),
archived: S.Boolean({ default: false }),
deleted: S.Boolean({ default: false }),
tags: S.Set(S.String(), { default: [] }),
createdAt: S.Date({ default: S.Default.now() }),
updatedAt: S.Date({ default: S.Default.now() }),
deletedAt: S.Date({ nullable: true }),
}),
permissions: {
owner: {
read: { filter: [['userId', '=', '$userId']] },
insert: { filter: [['userId', '=', '$userId']] },
update: { filter: [['userId', '=', '$userId']] },
delete: { filter: [['userId', '=', '$userId']] }
}
}
}
});
// Use the `Entity` type to extract clean types for your collections
export type Habit = Entity<typeof schema, 'habits'>;
export type HabitCompletion = Entity<typeof schema, 'habit_completions'>;
export type HabitCompletion = Entity<typeof schema, 'habit_completions'>;
export type Note = Entity<typeof schema, 'notes'>;