aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-04-13 16:01:33 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-04-13 16:01:33 -0700
commit5cdd3d34f1932197fdd81d9b03570767f85eebf4 (patch)
treee796c37ae36507b978bb63ce83cfb757cb63719d
parent0a9d59f33a3bef94f6b57f303fab1fa71cfcafd4 (diff)
downloadfatcat-5cdd3d34f1932197fdd81d9b03570767f85eebf4.tar.gz
fatcat-5cdd3d34f1932197fdd81d9b03570767f85eebf4.zip
notes/docs cleanups
-rw-r--r--notes/basic_ui.txt53
-rw-r--r--notes/data_model.md92
-rw-r--r--notes/libs.txt15
-rw-r--r--notes/notes.txt24
-rw-r--r--notes/test_works.txt (renamed from notes/test_cases.txt)0
-rw-r--r--notes/webface_notes.txt54
6 files changed, 146 insertions, 92 deletions
diff --git a/notes/basic_ui.txt b/notes/basic_ui.txt
deleted file mode 100644
index 12ad1ecc..00000000
--- a/notes/basic_ui.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-
-# "Add Something" Workflow
-
-## Add a Work
-
-Title
-Primary Type
-Primary Creators/Authors
-Description (not an abstract)
-Primary/Original Language
-Subject/Categorization/Tags
-Is a Stub (unpublished/unreleased)
-
-## Release Information
-
-Contributors
-Date
-Container / Part-Of
-Publisher
-Identifiers
-Language
-Type / Media
-Issue / Volume / Pages / Chapter
-
-## Anything Else?
-
-Known file / copy / url
-Citations (outbound)
-
-# Queries / Searches / Views
-
-Views: work, release, creator, container, publisher
-
-Lookup by identifier
-
-# Other Workflows/Editors
-
-Single-creator-oriented helper to find works and disambiguate authorship
-
-Bulk author disambiguation helper (find other unresolved authors with same
-alias text and select; drag works between columns)
-
-Bulk query-then-edit UI: search results in a table, edit like a spreadsheet, up
-to... dozens? Query and then apply delta (eg, set topic)? Eg, author edits
-basic metadata for all their citations all at once.
-
-Release editor
-
-Merge containers (and all related releases)
-Merge entities (works, releases, etc)
-Move release between works
-Split entities (works, authors, etc), including linked stuff
-
diff --git a/notes/data_model.md b/notes/data_model.md
new file mode 100644
index 00000000..fe21b533
--- /dev/null
+++ b/notes/data_model.md
@@ -0,0 +1,92 @@
+
+## Cookbook
+
+To create a new works:
+
+ login/create account
+
+ match/lookup on first work; if found, modify not create
+ TODO: match/lookup on files?
+
+ new edit group (under account; wip)
+ new edit (under group)
+
+ match/lookup on all creators
+ match/lookup on all refs
+ TODO: match/lookup on files?
+ match/lookup container
+
+ new work_rev (linked to edit)
+ new work_ident (linked to rev; not-live)
+ contributor stubs/links
+ new release_rev (linked to work_ident)
+ new release_ident (linked to rev; not-live)
+ contributor stubs/links
+ ref stubs/links
+ new file_rev
+ new file_ident
+
+ set edit group state to "review"
+
+ set edit group state to "accepted"
+ set all ident flags to "live"
+
+
+To edit, eg, a contributor:
+
+ new edit group (under account; wip)
+ new edit (under group)
+
+ create contributor_rev row (and relationship rows)
+
+ set edit group state to "review"
+
+ set edit group state to "accepted"
+ point ident row to new rev
+
+
+Accept edit group:
+
+ for each edit:
+ update entity ident state (activate, redirect, delete)
+ ? mark revision/edit as immutable
+ ? append log/changelog row
+ update edit group state
+
+## Entity Schema
+
+Each entity type has tables:
+
+ _rev
+ core representation of a version of the entity
+
+ _ident
+ persistant, external identifier
+ allows merging, unmerging, stable cross-entity references
+
+ _edit
+ represents change metadata for a single change to one ident
+ needed because an edit alwasy changes ident, but might not change rev
+
+ _log
+ history of when edits were actually applied
+ allows fast lookups of history of an entity (ident)
+ unnecessary if we keep a log of edit group accepts?
+ punt on this for now
+
+## Entity States
+
+ wip (not live; not redirect; has rev)
+ activate
+ active (live; not redirect; has rev)
+ redirect
+ delete
+ redirect (live; redirect; rev or not)
+ split
+ delete
+ deleted (live; not redirect; no rev)
+ redirect
+ activate
+
+ "wip redirect" or "wip deleted" are invalid states
+
diff --git a/notes/libs.txt b/notes/libs.txt
deleted file mode 100644
index ede10bdf..00000000
--- a/notes/libs.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Python
- flask
- sqlalchemy
-
-Golang
- sqlx (or xorm, or something to match rows to structs)
- go-swagger
-
-Rust
- diesel
-
-UI
- tachyons
- choo?
diff --git a/notes/notes.txt b/notes/notes.txt
deleted file mode 100644
index 4bfa3335..00000000
--- a/notes/notes.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-
-entity_id
- uuid
- revision
-
-entity_revision
- entity_id
- previous: entity_revision or none
- state: normal, redirect, deletion
- redirect_entity_id: optional
- extra: json blob
- edit_id
-
-edit
- mutable: boolean
- edit_group
- editor
-
-edit_group
-
-editor
- id
- username
- auth/email/etc
diff --git a/notes/test_cases.txt b/notes/test_works.txt
index bc6ea64a..bc6ea64a 100644
--- a/notes/test_cases.txt
+++ b/notes/test_works.txt
diff --git a/notes/webface_notes.txt b/notes/webface_notes.txt
index 8ed47d0b..37a56c5c 100644
--- a/notes/webface_notes.txt
+++ b/notes/webface_notes.txt
@@ -1,4 +1,6 @@
+# CSS/JS Libraries
+
tachyons is nice for simple css-only stuff, but let's use "Semantic UI" because
it has a bunch of javascript form stuff.
@@ -6,3 +8,55 @@ it has a bunch of javascript form stuff.
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.13/semantic.min.js"></script>
+# "Add Something" Workflow
+
+## Add a Work
+
+Title
+Primary Type
+Primary Creators/Authors
+Description (not an abstract)
+Primary/Original Language
+Subject/Categorization/Tags
+Is a Stub (unpublished/unreleased)
+
+## Release Information
+
+Contributors
+Date
+Container / Part-Of
+Publisher
+Identifiers
+Language
+Type / Media
+Issue / Volume / Pages / Chapter
+
+## Anything Else?
+
+Known file / copy / url
+Citations (outbound)
+
+# Queries / Searches / Views
+
+Views: work, release, creator, container, publisher
+
+Lookup by identifier
+
+# Other Workflows/Editors
+
+Single-creator-oriented helper to find works and disambiguate authorship
+
+Bulk author disambiguation helper (find other unresolved authors with same
+alias text and select; drag works between columns)
+
+Bulk query-then-edit UI: search results in a table, edit like a spreadsheet, up
+to... dozens? Query and then apply delta (eg, set topic)? Eg, author edits
+basic metadata for all their citations all at once.
+
+Release editor
+
+Merge containers (and all related releases)
+Merge entities (works, releases, etc)
+Move release between works
+Split entities (works, authors, etc), including linked stuff
+