~aleteoryx/webjrnl

webjrnl/plan.txt -rw-r--r-- 967 bytes
821b974aAleteoryx more compat testing 18 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
endpoints:
	/
		redirect to /dash
	/dash - GET
		convenient links
	/init - GET, POST
		paste in existing jrnl contents, get back an import log
	/jrnl/ - GET
		redirect to /jrnl/currentYear
	/jrnl/(year} - GET, POST
		the full text of the jrnl for that year. POSTing text
		will lead to the entries in it being created.
	/ntry - GET
		full log
	/ntry/{year}/{month}/{day}/ - GET, POST
		entry info.
	/edit - GET
		log of edits. each edit has an ID, so polling this will
		allow js code to edit the <textarea> in realtime
	/save - GET
		complete jrnl text for backup

	HTTP basic auth

	serve a js API and an HTML page from the same set of endpoints,
	use Accept:

	DB is just JSON files on disk.

frontend:
	static mode and js mode. js mode does clever things to allow
	multiple client


db:
	/users.json
		user list, assumed to be immutable
	/{username}/{year}/{month}/{day}
		/latest
			latest entry version, just a base 10 number
		/{n}
			entry text for version n