diff options
author | Akshay <[email protected]> | 2024-11-28 22:17:51 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2024-11-28 22:17:51 +0000 |
commit | 07b0bd49a66be1ee7177f5f1101059ac63bcd914 (patch) | |
tree | ce75ce18fc44139a721382fcd03d74998b6a4757 | |
parent | 98b2cbc082c90203339475d033728f5e409c2eac (diff) |
presentation
-rw-r--r-- | img/collapse.png | bin | 0 -> 180926 bytes | |||
-rw-r--r-- | img/comments.png | bin | 0 -> 269547 bytes | |||
-rw-r--r-- | img/gallery.png | bin | 0 -> 742556 bytes | |||
-rw-r--r-- | img/home.png | bin | 0 -> 258278 bytes | |||
-rw-r--r-- | img/invite.png | bin | 0 -> 51254 bytes | |||
-rw-r--r-- | img/light.png | bin | 0 -> 237207 bytes | |||
-rw-r--r-- | img/login.png | bin | 0 -> 28064 bytes | |||
-rw-r--r-- | img/mobile.png | bin | 0 -> 176267 bytes | |||
-rw-r--r-- | img/search.png | bin | 0 -> 163030 bytes | |||
-rw-r--r-- | img/subreddit.png | bin | 0 -> 282121 bytes | |||
-rw-r--r-- | img/subs.png | bin | 0 -> 65979 bytes | |||
-rw-r--r-- | readme.md | 102 | ||||
-rw-r--r-- | readme.txt | 19 | ||||
-rw-r--r-- | src/routes/index.js | 1 |
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 | |||
3 | lurker is a selfhostable, read-only reddit client. it is | ||
4 | better 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 | |||
11 | i host a version for myself and a few friends. reach out to | ||
12 | me 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 | |||
24 | i use lurker daily, and above features are pretty good for | ||
25 | my use. i do not intend to add much more, i dont like | ||
26 | writing js. | ||
27 | |||
28 | ### gallery | ||
29 | |||
30 | |  |  |  | | ||
31 | | ------------------------- | -------------------------------- | --------------------------------- | | ||
32 | | login | search | subreddit view | | ||
33 | |||
34 | |  |  |  | | ||
35 | | ------------------------- | -------------------------------- | --------------------------------- | | ||
36 | | subscriptions page | inline post thumbnail expand | comments view | | ||
37 | |||
38 | |  |  |  |  | | ||
39 | | ------------------------------- | -------------------------------- | -------------------------- | --------------------------- | | ||
40 | | collapse comments | admin dashboard & invites table | light mode | mobile optimized page | | ||
41 | |||
42 | ### setup | ||
43 | |||
44 | you can run lurker as a systemd service on nixos: | ||
45 | |||
46 | ``` | ||
47 | inputs.lurker.url= "git+https://git.peppe.rs/web/lurker"; | ||
48 | . | ||
49 | . | ||
50 | . | ||
51 | services.lurker = { | ||
52 | enable = true; | ||
53 | port = 9495; | ||
54 | }; | ||
55 | ``` | ||
56 | |||
57 | for non-nixos users: | ||
58 | |||
59 | ``` | ||
60 | bun run src/index.js | ||
61 | ``` | ||
62 | |||
63 | ### usage | ||
64 | |||
65 | the instance is open to registrations when first started. | ||
66 | you can head to /register and create an account. this | ||
67 | account will be an admin account. you can click on your | ||
68 | username at the top-right to view the dashboard and to | ||
69 | invite other users to your instance. copy the link and send | ||
70 | it to your friends! | ||
71 | |||
72 | ### technical | ||
73 | |||
74 | lurker uses an sqlite db to store accounts, invites and | ||
75 | subscriptions. it creates `lurker.db` in the current | ||
76 | directory. there is no way to configure this right now. | ||
77 | |||
78 | to hack on lurker: | ||
79 | |||
80 | ``` | ||
81 | nix shell .# # get a devshell | ||
82 | nix 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 @@ | |||
1 | nix build .#lurker | ||
2 | |||
3 | todo: | ||
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 @@ | |||
1 | const express = require("express"); | 1 | const express = require("express"); |
2 | const he = require("he"); | 2 | const he = require("he"); |
3 | const { hash, compare } = require("bun"); | ||
4 | const jwt = require("jsonwebtoken"); | 3 | const jwt = require("jsonwebtoken"); |
5 | const geddit = require("../geddit.js"); | 4 | const geddit = require("../geddit.js"); |
6 | const { JWT_KEY } = require("../"); | 5 | const { JWT_KEY } = require("../"); |