From 55bf7e4cb403566d7172ef69b8f2f7393ac8627d Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sun, 10 Jul 2022 20:29:07 +0000 Subject: basic notes support Signed-off-by: Xe Iaso --- docs/notes.markdown | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docs/notes.markdown (limited to 'docs') diff --git a/docs/notes.markdown b/docs/notes.markdown new file mode 100644 index 0000000..8ab83f5 --- /dev/null +++ b/docs/notes.markdown @@ -0,0 +1,38 @@ +# Notes + +## Goals + +- Have somewhere other than Twitter or Mastodon to host short-form content or + list articles I "like". +- Authenticate over Tailscale +- Simple API to automate posting with iOS Shortcuts +- Have a JSONFeed for people to subscribe +- Send WebMentions when I reply to things +- Store things in SQLite + +## Schema + +```sql +CREATE TABLE IF NOT EXISTS notes + ( id INTEGER PRIMARY KEY + , content TEXT NOT NULL + , content_html TEXT NOT NULL + , created_at INTEGER NOT NULL -- Unix epoch timestamp + , updated_at INTEGER -- Unix epoch timestamp + , deleted_at INTEGER -- Unix epoch timestamp + , reply_to TEXT + ); +``` + +```rust +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct Note { + pub id: u64, + pub content: String, + pub content_html: String, + pub created_at: DateTime, + pub updated_at: Option>, + pub deleted_at: Option>, + pub reply_to: Option, +} +``` -- cgit v1.2.3