aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2024-11-28 22:17:51 +0000
committerAkshay <[email protected]>2024-11-28 22:17:51 +0000
commit07b0bd49a66be1ee7177f5f1101059ac63bcd914 (patch)
treece75ce18fc44139a721382fcd03d74998b6a4757
parent98b2cbc082c90203339475d033728f5e409c2eac (diff)
presentation
-rw-r--r--img/collapse.pngbin0 -> 180926 bytes
-rw-r--r--img/comments.pngbin0 -> 269547 bytes
-rw-r--r--img/gallery.pngbin0 -> 742556 bytes
-rw-r--r--img/home.pngbin0 -> 258278 bytes
-rw-r--r--img/invite.pngbin0 -> 51254 bytes
-rw-r--r--img/light.pngbin0 -> 237207 bytes
-rw-r--r--img/login.pngbin0 -> 28064 bytes
-rw-r--r--img/mobile.pngbin0 -> 176267 bytes
-rw-r--r--img/search.pngbin0 -> 163030 bytes
-rw-r--r--img/subreddit.pngbin0 -> 282121 bytes
-rw-r--r--img/subs.pngbin0 -> 65979 bytes
-rw-r--r--readme.md102
-rw-r--r--readme.txt19
-rw-r--r--src/routes/index.js1
14 files changed, 102 insertions, 20 deletions
diff --git a/img/collapse.png b/img/collapse.png
new file mode 100644
index 0000000..9c652c9
--- /dev/null
+++ b/img/collapse.png
Binary files differ
diff --git a/img/comments.png b/img/comments.png
new file mode 100644
index 0000000..6d1e87b
--- /dev/null
+++ b/img/comments.png
Binary files differ
diff --git a/img/gallery.png b/img/gallery.png
new file mode 100644
index 0000000..52841dc
--- /dev/null
+++ b/img/gallery.png
Binary files differ
diff --git a/img/home.png b/img/home.png
new file mode 100644
index 0000000..d88c037
--- /dev/null
+++ b/img/home.png
Binary files differ
diff --git a/img/invite.png b/img/invite.png
new file mode 100644
index 0000000..c675056
--- /dev/null
+++ b/img/invite.png
Binary files differ
diff --git a/img/light.png b/img/light.png
new file mode 100644
index 0000000..77932c9
--- /dev/null
+++ b/img/light.png
Binary files differ
diff --git a/img/login.png b/img/login.png
new file mode 100644
index 0000000..3c31351
--- /dev/null
+++ b/img/login.png
Binary files differ
diff --git a/img/mobile.png b/img/mobile.png
new file mode 100644
index 0000000..339b93b
--- /dev/null
+++ b/img/mobile.png
Binary files differ
diff --git a/img/search.png b/img/search.png
new file mode 100644
index 0000000..347cbb1
--- /dev/null
+++ b/img/search.png
Binary files differ
diff --git a/img/subreddit.png b/img/subreddit.png
new file mode 100644
index 0000000..19d7501
--- /dev/null
+++ b/img/subreddit.png
Binary files differ
diff --git a/img/subs.png b/img/subs.png
new file mode 100644
index 0000000..9de834d
--- /dev/null
+++ b/img/subs.png
Binary files differ
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..24de376
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,102 @@
1### lurker
2
3lurker is a selfhostable, read-only reddit client. it is
4better than old-reddit because:
5
6- it renders well on mobile
7- it respects `prefers-color-scheme`
8- no account necessary to subscribe to subreddits
9- no account necessary for over-18 content
10
11i host a version for myself and a few friends. reach out to
12me if you would like an invite.
13
14### features
15
16- minimal use of client-side javascript
17- account-based subscription system
18- pagination
19- invite-only user management
20- comment collapsing, jump-to-next/prev comment
21- "search on undelete" url for deleted comments
22- over-18, spoiler images are hidden by default
23
24i use lurker daily, and above features are pretty good for
25my use. i do not intend to add much more, i dont like
26writing js.
27
28### gallery
29
30| ![login](./img/login.png) | ![search](./img/search.png) | ![subreddit](./img/subreddit.png) |
31| ------------------------- | -------------------------------- | --------------------------------- |
32| login | search | subreddit view |
33
34| ![subs](./img/subs.png) | ![gallery](./img/gallery.png) | ![comments](./img/comments.png) |
35| ------------------------- | -------------------------------- | --------------------------------- |
36| subscriptions page | inline post thumbnail expand | comments view |
37
38| ![collapse](./img/collapse.png) | ![invite](./img/invite.png) | ![light](./img/light.png) | ![mobile](./img/mobile.png) |
39| ------------------------------- | -------------------------------- | -------------------------- | --------------------------- |
40| collapse comments | admin dashboard & invites table | light mode | mobile optimized page |
41
42### setup
43
44you can run lurker as a systemd service on nixos:
45
46```
47inputs.lurker.url= "git+https://git.peppe.rs/web/lurker";
48 .
49 .
50 .
51services.lurker = {
52 enable = true;
53 port = 9495;
54};
55```
56
57for non-nixos users:
58
59```
60bun run src/index.js
61```
62
63### usage
64
65the instance is open to registrations when first started.
66you can head to /register and create an account. this
67account will be an admin account. you can click on your
68username at the top-right to view the dashboard and to
69invite other users to your instance. copy the link and send
70it to your friends!
71
72### technical
73
74lurker uses an sqlite db to store accounts, invites and
75subscriptions. it creates `lurker.db` in the current
76directory. there is no way to configure this right now.
77
78to hack on lurker:
79
80```
81nix shell .# # get a devshell
82nix build .#lurker # build the thing
83```
84
85### todo
86
87- [ ] avoid js to toggle details in views/index.pug
88- [ ] highlights for op, sticky etc.
89- [ ] open in reddit/reply in reddit link
90- [ ] subscription manager: reorder, mass add
91- [ ] support crossposts
92- [x] collapse even singular comments
93- [x] details tag on safari
94- [x] expand/collapse comments
95- [x] fix gallery thumbnails
96- [x] fix spacing between comments
97- [x] fix title rendering in views/comments.pug
98- [x] pass query params into templates, add into pagination
99- [x] placeholder for unresolvable thumbnails
100- [x] set home to sum of subs
101- [x] styles for info-containers
102- [x] support 'more comments'
diff --git a/readme.txt b/readme.txt
deleted file mode 100644
index b608336..0000000
--- a/readme.txt
+++ /dev/null
@@ -1,19 +0,0 @@
1nix build .#lurker
2
3todo:
4- [ ] support crossposts
5- [x] fix gallery thumbnails
6- [x] pass query params into templates, add into pagination
7- [ ] subscription manager: reorder, mass add
8- [x] styles for info-containers
9- [ ] open in reddit/reply in reddit link
10- [x] placeholder for unresolvable thumbnails
11- [x] expand/collapse comments
12- [x] fix title rendering in views/comments.pug
13- [x] fix spacing between comments
14- [x] collapse even singular comments
15- [ ] highlights for op, sticky etc.
16- [x] support 'more comments'
17- [ ] avoid js to toggle details in views/index.pug
18- [x] set home to sum of subs
19- [x] details tag on safari
diff --git a/src/routes/index.js b/src/routes/index.js
index d4cfd35..0dafd3e 100644
--- a/src/routes/index.js
+++ b/src/routes/index.js
@@ -1,6 +1,5 @@
1const express = require("express"); 1const express = require("express");
2const he = require("he"); 2const he = require("he");
3const { hash, compare } = require("bun");
4const jwt = require("jsonwebtoken"); 3const jwt = require("jsonwebtoken");
5const geddit = require("../geddit.js"); 4const geddit = require("../geddit.js");
6const { JWT_KEY } = require("../"); 5const { JWT_KEY } = require("../");