+24
.gitignore
+24
.gitignore
···
1
+
*.o
2
+
*.a
3
+
*.pyc
4
+
\#*\#
5
+
*~
6
+
*.swp
7
+
.*
8
+
*.tmp
9
+
*.old
10
+
*.profile
11
+
*.bkp
12
+
*.bak
13
+
[Tt]humbs.db
14
+
*.DS_Store
15
+
build/
16
+
_build/
17
+
src/build/
18
+
*.log
19
+
20
+
# binaries
21
+
/scrumble
22
+
23
+
# Don't ignore this file itself
24
+
!.gitignore
+41
Makefile
+41
Makefile
···
1
+
2
+
SHELL = /bin/bash
3
+
.SHELLFLAGS = -o pipefail -c
4
+
5
+
.PHONY: help
6
+
help: ## Print info about all commands
7
+
@echo "Commands:"
8
+
@echo
9
+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[01;32m%-20s\033[0m %s\n", $$1, $$2}'
10
+
11
+
.PHONY: build
12
+
build: ## Build all executables
13
+
go build .
14
+
15
+
.PHONY: all
16
+
all: build
17
+
18
+
.PHONY: test
19
+
test: ## Run tests
20
+
go test ./...
21
+
22
+
.PHONY: coverage-html
23
+
coverage-html: ## Generate test coverage report and open in browser
24
+
go test ./... -coverpkg=./... -coverprofile=test-coverage.out
25
+
go tool cover -html=test-coverage.out
26
+
27
+
.PHONY: lint
28
+
lint: ## Verify code style and run static checks
29
+
go vet ./...
30
+
test -z $(gofmt -l ./...)
31
+
32
+
.PHONY: fmt
33
+
fmt: ## Run syntax re-formatting (modify in place)
34
+
go fmt ./...
35
+
36
+
.PHONY: check
37
+
check: ## Compile everything, checking syntax (does not output binaries)
38
+
go build ./...
39
+
40
+
.env:
41
+
if [ ! -f ".env" ]; then cp example.dev.env .env; fi
+5
README.md
+5
README.md
+63
doc/plan.txt
+63
doc/plan.txt
···
1
+
2
+
conceptual questions:
3
+
- ability to log-in to instance separate from a scene? eg, to manage scene
4
+
- single client metadata or multiple?
5
+
6
+
7
+
basic setup/infra:
8
+
- lexicon schemas
9
+
- gorm database models
10
+
- echo web server
11
+
- indexing: tap consumer, validate, filtering, tables
12
+
- hydration: skeleton-style, labels, takedowns, viewer context
13
+
- web app: pongo2, htmx, tailwind (?)
14
+
- oauth client and sessions
15
+
- label indexing: package/struct?
16
+
- dev-env with fake accounts and data
17
+
18
+
major components:
19
+
- store.Store
20
+
=> database, cache
21
+
=> manages invariants
22
+
=> high-level fetches and types
23
+
- store/models: SQL schemas
24
+
- indexer.Indexer
25
+
=> consume from tap
26
+
=> validate schemas
27
+
28
+
29
+
views:
30
+
- top bar: scrumble drop-menu; search; account/notifs drop-menu
31
+
- feed of items: user, time, interactions, tags
32
+
- scene summary bar: description, numbers, content guidelines, rules
33
+
34
+
35
+
instance admin:
36
+
- add PDS invite codes
37
+
38
+
39
+
scene service account mgmt:
40
+
- create new scenes as accounts on configured PDS (using invite codes?)
41
+
- admin endpoint to create a scene; or add/import
42
+
- instance invite codes allow anybody to create a scene
43
+
- scene admins can take actions, and instance will update scene account (records)
44
+
- lifecycle: create, migrate/import, deactivate
45
+
46
+
47
+
48
+
scene config:
49
+
- tags: any/limited/none; who
50
+
- emoji reactions: any/limited/none; who
51
+
- comments: threaded/flat/none; who
52
+
- items: types; per-type filters and limits; filter code
53
+
- membership: open/approve/invite/admin
54
+
- basic colors
55
+
56
+
57
+
tool shopping:
58
+
- CDN solution
59
+
60
+
docker-compose:
61
+
- local PDS (?)
62
+
- local PLC (?)
63
+
- postgresql (?)
+66
doc/schemas.txt
+66
doc/schemas.txt
···
1
+
2
+
.scene.declaration (rkey: self)
3
+
displayName: string
4
+
description: string
5
+
avatar: blob
6
+
createdAt: datetime
7
+
guidelines[]
8
+
text
9
+
config{}
10
+
submission
11
+
commenting
12
+
itemTypes
13
+
labelers[]
14
+
did
15
+
.scene.member (rkey: any/did)
16
+
did
17
+
role: knownValues/defs
18
+
createdAt
19
+
20
+
.collection.item (rkey: tid)
21
+
scene: did
22
+
tags[] string
23
+
createdAt
24
+
item
25
+
#webItem
26
+
url
27
+
title
28
+
description
29
+
thumb
30
+
#atpItem
31
+
uri
32
+
cid
33
+
#textItem
34
+
title
35
+
markdown
36
+
#imageItem
37
+
image[]
38
+
ref: blob
39
+
alt: string
40
+
license: uri
41
+
attribution: string
42
+
aspectRatio{}
43
+
.collection.comment (rkey: tid)
44
+
scene: did
45
+
subject: strongRef
46
+
parent?: strongRef
47
+
text: string (or markdown?)
48
+
createdAt
49
+
.collection.reaction (rkey: tid)
50
+
scene: did
51
+
subject: strongRef
52
+
emoji: string, single
53
+
.collection.feedback (rkey: tid)
54
+
scene: did
55
+
subject: strongRef
56
+
createdAt
57
+
feedback: string enum up/down; boost/nope
58
+
59
+
.account.profile (rkey: self)
60
+
avatar: blob
61
+
createdAt
62
+
.account.join (rkey: any/did)
63
+
scene: did
64
+
createdAt
65
+
66
+
TODO: labeler declaration
+69
doc/tables.txt
+69
doc/tables.txt
···
1
+
2
+
account
3
+
did
4
+
5
+
handle
6
+
upstream_status: string
7
+
profile: boolean?
8
+
9
+
scene
10
+
did
11
+
12
+
handle: index
13
+
upstream_status: string
14
+
status: string
15
+
declaration: boolean?
16
+
17
+
record
18
+
collection: string
19
+
account_did: foreign key
20
+
rkey: string
21
+
22
+
version
23
+
data_json: string
24
+
25
+
membership
26
+
scene_did: foreign key
27
+
account_did: foreign key; index
28
+
29
+
role
30
+
member_rkey
31
+
join_rkey
32
+
33
+
item
34
+
scene_did: foreign key
35
+
account_did: foreign key
36
+
rkey
37
+
38
+
version: cid
39
+
40
+
comment
41
+
scene_did: foreign key
42
+
account_did: foreign key
43
+
rkey
44
+
45
+
version: cid
46
+
item_account_did: foreign key
47
+
item_rkey
48
+
parent: at-uri
49
+
50
+
feedback
51
+
scene_did: foreign key
52
+
account_did: foreign key
53
+
rkey
54
+
version: cid
55
+
56
+
item_account_did: foreign key
57
+
item_rkey:
58
+
value: boolean
59
+
created_at: time
60
+
61
+
reaction
62
+
scene_did: foreign key
63
+
account_did: foreign key
64
+
rkey
65
+
version: cid
66
+
67
+
item_account_did: foreign key
68
+
item_rkey:
69
+
emoji: string