aboutsummaryrefslogtreecommitdiff
path: root/readme.md
blob: d13575ce9e8af6d08bd2d38cbcdd8053d2448d26 (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
### lurker

lurker is a selfhostable, read-only reddit client. it is
better than old-reddit because:

- it renders well on mobile
- it respects `prefers-color-scheme`
- no account necessary to subscribe to subreddits
- no account necessary for over-18 content

i host a version for myself and a few friends. reach out to
me if you would like an invite. 

### features

- minimal use of client-side javascript
- account-based subscription system
- pagination
- invite-only user management
- comment collapsing, jump-to-next/prev comment
- "search on undelete" url for deleted comments
- over-18, spoiler images are hidden by default

i use lurker daily, and above features are pretty good for
my use. i do not intend to add much more, i don't like
writing js.

### gallery

| ![login](./img/login.png) | ![search](./img/search.png)      | ![subreddit](./img/subreddit.png) |
| ------------------------- | -------------------------------- | --------------------------------- |
| login                     | search                           | subreddit view                    |

| ![subs](./img/subs.png)   | ![gallery](./img/gallery.png)    | ![comments](./img/comments.png)   |
| ------------------------- | -------------------------------- | --------------------------------- |
| subscriptions page        | inline post thumbnail expand     | comments view                     |

| ![collapse](./img/collapse.png) | ![invite](./img/invite.png)      | ![light](./img/light.png)  | ![mobile](./img/mobile.png) |
| ------------------------------- | -------------------------------- | -------------------------- | --------------------------- |
| collapse comments               | admin dashboard & invites table  | light mode                 | mobile optimized page       |

### setup

you can run lurker as a systemd service on nixos:

```nix
inputs.lurker.url= "git+https://git.peppe.rs/web/lurker";
  .
  .
  .
services.lurker = {
  enable = true;
  port = 9495;
};
```

or with the docker image:

```bash
# pull the latest image from gh container registry
$ docker pull ghcr.io/oppiliappan/lurker:latest

REPOSITORY                   TAG       IMAGE ID       CREATED        SIZE
ghcr.io/oppiliappan/lurker   latest    ba3733164889   ???            227MB

# start lurker in a container
#
# lurker stores data in /data,
# so create a volume on the host accordingly:
$ docker run -v /your/host/lurker-data:/data -p 3000 ghcr.io/oppiliappan/lurker:latest
```

or with docker compose:

```yaml
version: '3'
services:
  lurker:
    image: ghcr.io/oppiliappan/lurker:latest
    container_name: lurker
    volumes:
      - /your/host/lurker-data:/data
    ports:
      - "3000:3000"
```

or with just [bun](https://bun.sh/):

```bash
bun run src/index.js 
```

### usage

the instance is open to registrations when first started.
you can head to /register and create an account. this
account will be an admin account. you can click on your
username at the top-right to view the dashboard and to
invite other users to your instance. copy the link and send
it to your friends!

### technical

lurker uses an sqlite db to store accounts, invites and
subscriptions. it creates `lurker.db` in the current
directory. there is no way to configure this right now.

to hack on lurker:

```bash
nix shell .#        # get a devshell
nix build .#lurker  # build the thing
```

### todo

- [ ] avoid js to toggle details in views/index.pug
- [ ] highlights for op, sticky etc.
- [ ] open in reddit/reply in reddit link
- [ ] subscription manager: reorder, mass add
- [ ] support crossposts
- [x] collapse even singular comments
- [x] details tag on safari
- [x] expand/collapse comments
- [x] fix gallery thumbnails
- [x] fix spacing between comments
- [x] fix title rendering in views/comments.pug
- [x] pass query params into templates, add into pagination
- [x] placeholder for unresolvable thumbnails
- [x] set home to sum of subs
- [x] styles for info-containers
- [x] support 'more comments'