selfhostable, read-only reddit client

presentation

img/collapse.png

This is a binary file and will not be displayed.

img/comments.png

This is a binary file and will not be displayed.

img/gallery.png

This is a binary file and will not be displayed.

img/home.png

This is a binary file and will not be displayed.

img/invite.png

This is a binary file and will not be displayed.

img/light.png

This is a binary file and will not be displayed.

img/login.png

This is a binary file and will not be displayed.

img/mobile.png

This is a binary file and will not be displayed.

img/search.png

This is a binary file and will not be displayed.

img/subreddit.png

This is a binary file and will not be displayed.

img/subs.png

This is a binary file and will not be displayed.

+102
readme.md
··· 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 + | ![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 + 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'
-19
readme.txt
··· 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
-1
src/routes/index.js
··· 1 1 const express = require("express"); 2 2 const he = require("he"); 3 - const { hash, compare } = require("bun"); 4 3 const jwt = require("jsonwebtoken"); 5 4 const geddit = require("../geddit.js"); 6 5 const { JWT_KEY } = require("../");