chirkle 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -196
- package/bin/release/darwin-amd64/chirkle-server +2 -2
- package/bin/release/darwin-arm64/chirkle-server +0 -0
- package/bin/release/linux-amd64/chirkle-server +0 -0
- package/bin/release/linux-arm64/chirkle-server +0 -0
- package/package.json +18 -5
- package/pb_hooks/lib/account.js +541 -6
- package/pb_hooks/lib/collections.js +9 -7
- package/pb_hooks/lib/dms.js +1 -1
- package/pb_hooks/lib/handles.js +24 -2
- package/pb_hooks/lib/http.js +2 -2
- package/pb_hooks/lib/inbox.js +7 -6
- package/pb_hooks/lib/invites.js +266 -0
- package/pb_hooks/lib/media.js +2 -2
- package/pb_hooks/lib/messages.js +11 -2
- package/pb_hooks/lib/moderation.js +1 -1
- package/pb_hooks/lib/retention.js +3 -0
- package/pb_hooks/lib/site.js +1 -1
- package/pb_hooks/lib/users.js +70 -11
- package/pb_hooks/main.pb.js +27 -1
- package/pb_hooks/telegram/api.js +64 -12
- package/pb_hooks/telegram/inbound.js +111 -15
- package/pb_hooks/telegram/links.js +12 -1
- package/pb_hooks/telegram/outbound.js +119 -39
- package/pb_hooks/telegram/worker.js +61 -16
- package/pb_migrations/1760000052_deleted_accounts.js +19 -0
- package/pb_migrations/1760000053_account_jobs.js +45 -0
- package/pb_migrations/1760000054_room_invites.js +39 -0
- package/pb_migrations/1760000055_invite_barred.js +16 -0
- package/pb_migrations/1760000056_telegram_fetch.js +21 -0
- package/pb_migrations/1760000057_reactions_seen.js +17 -0
- package/pb_migrations/1760000058_users_kind_public.js +20 -0
- package/pb_public/assets/access-KVSI7EFH.js +2 -0
- package/pb_public/assets/access-KVSI7EFH.js.br +0 -0
- package/pb_public/assets/access-KVSI7EFH.js.gz +0 -0
- package/pb_public/assets/access-KVSI7EFH.js.map +7 -0
- package/pb_public/assets/access-XGNXIUR5.css +2 -0
- package/pb_public/assets/access-XGNXIUR5.css.br +0 -0
- package/pb_public/assets/access-XGNXIUR5.css.gz +0 -0
- package/pb_public/assets/access-XGNXIUR5.css.map +7 -0
- package/pb_public/assets/account-EBCPOLWT.css +2 -0
- package/pb_public/assets/account-EBCPOLWT.css.br +0 -0
- package/pb_public/assets/account-EBCPOLWT.css.gz +0 -0
- package/pb_public/assets/account-EBCPOLWT.css.map +7 -0
- package/pb_public/assets/account-api-J6A6IYVX.js +2 -0
- package/pb_public/assets/account-api-J6A6IYVX.js.br +0 -0
- package/pb_public/assets/account-api-J6A6IYVX.js.gz +0 -0
- package/pb_public/assets/account-api-J6A6IYVX.js.map +7 -0
- package/pb_public/assets/app-5JOOV6JX.js +3 -0
- package/pb_public/assets/app-5JOOV6JX.js.br +0 -0
- package/pb_public/assets/app-5JOOV6JX.js.gz +0 -0
- package/pb_public/assets/app-5JOOV6JX.js.map +7 -0
- package/pb_public/assets/app-7OMYYLCI.css +2 -0
- package/pb_public/assets/app-7OMYYLCI.css.br +0 -0
- package/pb_public/assets/app-7OMYYLCI.css.gz +0 -0
- package/pb_public/assets/app-7OMYYLCI.css.map +7 -0
- package/pb_public/assets/chunk-5PKDEWJS.js +2 -0
- package/pb_public/assets/chunk-5PKDEWJS.js.br +0 -0
- package/pb_public/assets/chunk-5PKDEWJS.js.gz +0 -0
- package/pb_public/assets/chunk-5PKDEWJS.js.map +7 -0
- package/pb_public/assets/chunk-AG73QNUN.js +2 -0
- package/pb_public/assets/chunk-AG73QNUN.js.br +0 -0
- package/pb_public/assets/chunk-AG73QNUN.js.gz +0 -0
- package/pb_public/assets/chunk-AG73QNUN.js.map +7 -0
- package/pb_public/assets/chunk-DCLJRQ53.js +2 -0
- package/pb_public/assets/chunk-DCLJRQ53.js.br +0 -0
- package/pb_public/assets/chunk-DCLJRQ53.js.gz +0 -0
- package/pb_public/assets/chunk-DCLJRQ53.js.map +7 -0
- package/pb_public/assets/chunk-EO3AMXJN.js +2 -0
- package/pb_public/assets/chunk-EO3AMXJN.js.br +0 -0
- package/pb_public/assets/chunk-EO3AMXJN.js.gz +0 -0
- package/pb_public/assets/chunk-EO3AMXJN.js.map +7 -0
- package/pb_public/assets/chunk-LDZPNZ2E.js +2 -0
- package/pb_public/assets/chunk-LDZPNZ2E.js.br +0 -0
- package/pb_public/assets/chunk-LDZPNZ2E.js.gz +0 -0
- package/pb_public/assets/chunk-LDZPNZ2E.js.map +7 -0
- package/pb_public/assets/chunk-RPCBA7VF.js.br +0 -0
- package/pb_public/assets/chunk-RPCBA7VF.js.gz +0 -0
- package/pb_public/assets/chunk-RYZHXNLF.js +2 -0
- package/pb_public/assets/chunk-RYZHXNLF.js.br +0 -0
- package/pb_public/assets/chunk-RYZHXNLF.js.gz +0 -0
- package/pb_public/assets/chunk-RYZHXNLF.js.map +7 -0
- package/pb_public/assets/chunk-UZDXAORM.js +2 -0
- package/pb_public/assets/chunk-UZDXAORM.js.br +0 -0
- package/pb_public/assets/chunk-UZDXAORM.js.gz +0 -0
- package/pb_public/assets/chunk-UZDXAORM.js.map +7 -0
- package/pb_public/assets/chunk-VSHXXDW4.js +2 -0
- package/pb_public/assets/chunk-VSHXXDW4.js.br +0 -0
- package/pb_public/assets/chunk-VSHXXDW4.js.gz +0 -0
- package/pb_public/assets/chunk-VSHXXDW4.js.map +7 -0
- package/pb_public/assets/chunk-VTOUI25E.js.br +0 -0
- package/pb_public/assets/chunk-VTOUI25E.js.gz +0 -0
- package/pb_public/assets/{chunk-DZC4SY4M.js → chunk-Y5MCBN66.js} +2 -2
- package/pb_public/assets/chunk-Y5MCBN66.js.br +0 -0
- package/pb_public/assets/chunk-Y5MCBN66.js.gz +0 -0
- package/pb_public/assets/{chunk-DZC4SY4M.js.map → chunk-Y5MCBN66.js.map} +3 -3
- package/pb_public/assets/collections-FZB6G4W4.css +2 -0
- package/pb_public/assets/collections-FZB6G4W4.css.br +0 -0
- package/pb_public/assets/collections-FZB6G4W4.css.gz +0 -0
- package/pb_public/assets/collections-FZB6G4W4.css.map +7 -0
- package/pb_public/assets/emoji-IHRUMGCY.css +2 -0
- package/pb_public/assets/emoji-IHRUMGCY.css.br +0 -0
- package/pb_public/assets/emoji-IHRUMGCY.css.gz +0 -0
- package/pb_public/assets/emoji-IHRUMGCY.css.map +7 -0
- package/pb_public/assets/{emoji-picker-K6JTK2GV.js → emoji-picker-W27IJER2.js} +2 -2
- package/pb_public/assets/emoji-picker-W27IJER2.js.br +0 -0
- package/pb_public/assets/emoji-picker-W27IJER2.js.gz +0 -0
- package/pb_public/assets/{forward-267HRNPY.js → forward-5TJEYGEV.js} +2 -2
- package/pb_public/assets/forward-5TJEYGEV.js.br +0 -0
- package/pb_public/assets/forward-5TJEYGEV.js.gz +0 -0
- package/pb_public/assets/inbox-2AXY3INA.css +2 -0
- package/pb_public/assets/inbox-2AXY3INA.css.br +0 -0
- package/pb_public/assets/inbox-2AXY3INA.css.gz +0 -0
- package/pb_public/assets/inbox-2AXY3INA.css.map +7 -0
- package/pb_public/assets/{inbox-CLMYESNI.js → inbox-A46J7ZU2.js} +2 -2
- package/pb_public/assets/inbox-A46J7ZU2.js.br +0 -0
- package/pb_public/assets/inbox-A46J7ZU2.js.gz +0 -0
- package/pb_public/assets/{inbox-CLMYESNI.js.map → inbox-A46J7ZU2.js.map} +2 -2
- package/pb_public/assets/invite-6BCBF4KV.js +2 -0
- package/pb_public/assets/invite-6BCBF4KV.js.br +0 -0
- package/pb_public/assets/invite-6BCBF4KV.js.gz +0 -0
- package/pb_public/assets/invite-6BCBF4KV.js.map +7 -0
- package/pb_public/assets/invite-api-7G7XPXQW.js +2 -0
- package/pb_public/assets/invite-api-7G7XPXQW.js.br +0 -0
- package/pb_public/assets/invite-api-7G7XPXQW.js.gz +0 -0
- package/pb_public/assets/lazy-OVEJT5CP.js +2 -0
- package/pb_public/assets/lazy-OVEJT5CP.js.br +0 -0
- package/pb_public/assets/lazy-OVEJT5CP.js.gz +0 -0
- package/pb_public/assets/lazy-OVEJT5CP.js.map +7 -0
- package/pb_public/assets/login-FZY6GOMF.js +2 -0
- package/pb_public/assets/login-FZY6GOMF.js.br +0 -0
- package/pb_public/assets/login-FZY6GOMF.js.gz +0 -0
- package/pb_public/assets/{login-ECFBJP6Q.js.map → login-FZY6GOMF.js.map} +1 -1
- package/pb_public/assets/media-BCKZQR2R.css +2 -0
- package/pb_public/assets/media-BCKZQR2R.css.br +0 -0
- package/pb_public/assets/media-BCKZQR2R.css.gz +0 -0
- package/pb_public/assets/media-BCKZQR2R.css.map +7 -0
- package/pb_public/assets/{media-WZ4653L5.js → media-VCJWBQJZ.js} +2 -2
- package/pb_public/assets/media-VCJWBQJZ.js.br +0 -0
- package/pb_public/assets/media-VCJWBQJZ.js.gz +0 -0
- package/pb_public/assets/{mention-suggest-ODJD2IC5.js → mention-suggest-K3UUHR4D.js} +2 -2
- package/pb_public/assets/mention-suggest-K3UUHR4D.js.br +0 -0
- package/pb_public/assets/mention-suggest-K3UUHR4D.js.gz +0 -0
- package/pb_public/assets/notify-EPDM772N.js.br +0 -0
- package/pb_public/assets/notify-EPDM772N.js.gz +0 -0
- package/pb_public/assets/profile-7KMXLX5U.js +2 -0
- package/pb_public/assets/profile-7KMXLX5U.js.br +0 -0
- package/pb_public/assets/profile-7KMXLX5U.js.gz +0 -0
- package/pb_public/assets/profile-7KMXLX5U.js.map +7 -0
- package/pb_public/assets/rooms-forms-IADHTHBZ.js +2 -0
- package/pb_public/assets/rooms-forms-IADHTHBZ.js.br +0 -0
- package/pb_public/assets/rooms-forms-IADHTHBZ.js.gz +0 -0
- package/pb_public/assets/rooms-forms-IADHTHBZ.js.map +7 -0
- package/pb_public/assets/search-HOPAWIMQ.js +2 -0
- package/pb_public/assets/search-HOPAWIMQ.js.br +0 -0
- package/pb_public/assets/search-HOPAWIMQ.js.gz +0 -0
- package/pb_public/assets/search-HOPAWIMQ.js.map +7 -0
- package/pb_public/assets/sidebar-forms-ETSRVSPY.css +2 -0
- package/pb_public/assets/sidebar-forms-ETSRVSPY.css.br +0 -0
- package/pb_public/assets/sidebar-forms-ETSRVSPY.css.gz +0 -0
- package/pb_public/assets/sidebar-forms-ETSRVSPY.css.map +7 -0
- package/pb_public/assets/stats-5GSWDHZI.css +2 -0
- package/pb_public/assets/stats-5GSWDHZI.css.br +0 -0
- package/pb_public/assets/stats-5GSWDHZI.css.gz +0 -0
- package/pb_public/assets/stats-5GSWDHZI.css.map +7 -0
- package/pb_public/assets/stats-Y3LIXAZR.js +2 -0
- package/pb_public/assets/stats-Y3LIXAZR.js.br +0 -0
- package/pb_public/assets/stats-Y3LIXAZR.js.gz +0 -0
- package/pb_public/assets/stats-Y3LIXAZR.js.map +7 -0
- package/pb_public/assets/switcher-TFSO45KV.js.br +0 -0
- package/pb_public/assets/switcher-TFSO45KV.js.gz +0 -0
- package/pb_public/assets/user-search-GUNMIBSB.js +2 -0
- package/pb_public/assets/user-search-GUNMIBSB.js.br +0 -0
- package/pb_public/assets/user-search-GUNMIBSB.js.gz +0 -0
- package/pb_public/assets/user-search-GUNMIBSB.js.map +7 -0
- package/pb_public/assets/{viewer-2Y5FJBW4.js → viewer-BHKVAADP.js} +2 -2
- package/pb_public/assets/viewer-BHKVAADP.js.br +0 -0
- package/pb_public/assets/viewer-BHKVAADP.js.gz +0 -0
- package/pb_public/assets/viewer-JBZU46HP.css +2 -0
- package/pb_public/assets/viewer-JBZU46HP.css.br +0 -0
- package/pb_public/assets/viewer-JBZU46HP.css.gz +0 -0
- package/pb_public/assets/{viewer-P7GYCBYM.css.map → viewer-JBZU46HP.css.map} +2 -2
- package/pb_public/index.html +11 -8
- package/pb_public/stats.html +3 -3
- package/scripts/service.mjs +201 -0
- package/scripts/start.mjs +9 -2
- package/pb_public/assets/access-LHPD2EHG.js +0 -2
- package/pb_public/assets/access-LHPD2EHG.js.map +0 -7
- package/pb_public/assets/access-PB77EH4F.css +0 -2
- package/pb_public/assets/access-PB77EH4F.css.map +0 -7
- package/pb_public/assets/app-6ETOTHXQ.js +0 -3
- package/pb_public/assets/app-6ETOTHXQ.js.map +0 -7
- package/pb_public/assets/app-ZGHECF33.css +0 -2
- package/pb_public/assets/app-ZGHECF33.css.map +0 -7
- package/pb_public/assets/chunk-56ACD3V5.js +0 -2
- package/pb_public/assets/chunk-56ACD3V5.js.map +0 -7
- package/pb_public/assets/chunk-GXMWOXBX.js +0 -2
- package/pb_public/assets/chunk-GXMWOXBX.js.map +0 -7
- package/pb_public/assets/chunk-IFQGGTSP.js +0 -2
- package/pb_public/assets/chunk-IFQGGTSP.js.map +0 -7
- package/pb_public/assets/chunk-PWNJABVI.js +0 -2
- package/pb_public/assets/chunk-PWNJABVI.js.map +0 -7
- package/pb_public/assets/collections-DHJEOLHW.css +0 -2
- package/pb_public/assets/collections-DHJEOLHW.css.map +0 -7
- package/pb_public/assets/emoji-WWNPWCF3.css +0 -2
- package/pb_public/assets/emoji-WWNPWCF3.css.map +0 -7
- package/pb_public/assets/inbox-3FSOPY2T.css +0 -2
- package/pb_public/assets/inbox-3FSOPY2T.css.map +0 -7
- package/pb_public/assets/lazy-H3KIJVB5.js +0 -2
- package/pb_public/assets/lazy-H3KIJVB5.js.map +0 -7
- package/pb_public/assets/login-ECFBJP6Q.js +0 -2
- package/pb_public/assets/media-7TCBG7WM.css +0 -2
- package/pb_public/assets/media-7TCBG7WM.css.map +0 -7
- package/pb_public/assets/profile-NQQLAEDT.js +0 -2
- package/pb_public/assets/profile-NQQLAEDT.js.map +0 -7
- package/pb_public/assets/search-WCHOGAJQ.js +0 -2
- package/pb_public/assets/search-WCHOGAJQ.js.map +0 -7
- package/pb_public/assets/stats-A2TBRUI6.css +0 -2
- package/pb_public/assets/stats-A2TBRUI6.css.map +0 -7
- package/pb_public/assets/stats-ARDU576A.js +0 -2
- package/pb_public/assets/stats-ARDU576A.js.map +0 -7
- package/pb_public/assets/user-search-3HQOCQWL.js +0 -2
- package/pb_public/assets/viewer-P7GYCBYM.css +0 -2
- /package/pb_public/assets/{emoji-picker-K6JTK2GV.js.map → emoji-picker-W27IJER2.js.map} +0 -0
- /package/pb_public/assets/{forward-267HRNPY.js.map → forward-5TJEYGEV.js.map} +0 -0
- /package/pb_public/assets/{user-search-3HQOCQWL.js.map → invite-api-7G7XPXQW.js.map} +0 -0
- /package/pb_public/assets/{media-WZ4653L5.js.map → media-VCJWBQJZ.js.map} +0 -0
- /package/pb_public/assets/{mention-suggest-ODJD2IC5.js.map → mention-suggest-K3UUHR4D.js.map} +0 -0
- /package/pb_public/assets/{viewer-2Y5FJBW4.js.map → viewer-BHKVAADP.js.map} +0 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Mentions & replies, which load on first use).
|
|
|
8
8
|
|
|
9
9
|
<picture>
|
|
10
10
|
<source media="(prefers-color-scheme: dark)" srcset="docs/screenshot-dark.png">
|
|
11
|
-
<img alt="A room in Chirkle: the
|
|
11
|
+
<img alt="A room in Chirkle: the sidebar on the left, with the faces of who mentioned you, unread dots and mention counts; messages with avatars, a reply, an @mention of you, a photo and emoji reactions on the right" src="docs/screenshot-light.png">
|
|
12
12
|
</picture>
|
|
13
13
|
|
|
14
14
|
- Runs on a $5 VPS (1 vCPU, 1 GB of RAM): about 1,000 people online at a normal pace (2,000
|
|
@@ -31,7 +31,7 @@ Mentions & replies, which load on first use).
|
|
|
31
31
|
- Links in messages are clickable and open in a new tab (http, https and www. addresses only)
|
|
32
32
|
- Emoji: a picker in the composer with search by name, ":name" suggestions as you type, and reactions on any message
|
|
33
33
|
(as many different ones as you like), live for everyone
|
|
34
|
-
- Attachments: up to 10 files of 20 MB per message, with an upload progress bar; images shown as thumbnails and videos as their first frame (4 tiles, then "+N"); files
|
|
34
|
+
- Attachments: up to 10 files of 20 MB per message, with an upload progress bar; images shown as thumbnails and videos as their first frame (4 tiles, then "+N"); files open by a link that can't be guessed, and stops working when the message is deleted
|
|
35
35
|
- Image viewer: click a thumbnail to see it full size (or a video to play it) and step through the room's images and videos (buttons, arrow keys, swipe);
|
|
36
36
|
loaded only when first used, so it adds nothing to the page's first load
|
|
37
37
|
- Collections: save any image or video from the chat to collections of your own, public or private, and attach from them to messages; subscribe to other people's public collections to use theirs too, with a count of what's new and the new items highlighted; media attached from a collection link to it (or say "Private collection")
|
|
@@ -39,6 +39,8 @@ Mentions & replies, which load on first use).
|
|
|
39
39
|
- Unread counts on every room and DM, live, and in sync across your tabs and devices; the total shows in the tab's favicon and title;
|
|
40
40
|
a room with unread messages opens at the first of them, under a "New" line
|
|
41
41
|
- What you were typing is kept per room, even across a reload; "Jump to latest" whenever you are scrolled up
|
|
42
|
+
- Invite links for private rooms: share one link that adds whoever opens it (after logging in or signing up) as a
|
|
43
|
+
member; it works for 1, 7 or 30 days and can be revoked or replaced at any time (web and Android)
|
|
42
44
|
- Moderators, chosen by the admin: they delete anyone's messages, change any room's access, archive rooms, and ban or
|
|
43
45
|
unban people (a banned account can't log in); DMs and private rooms they aren't in stay out of their reach
|
|
44
46
|
- Usage statistics at `/stats` for moderators and the admin: people online now, messages and active people over
|
|
@@ -47,7 +49,7 @@ Mentions & replies, which load on first use).
|
|
|
47
49
|
- Your own branding (title and logo) and, if you like, invite-only signups: set by the admin in PocketBase
|
|
48
50
|
- Forgot password: once the admin sets up email, "Forgot password?" on the login page (web and Android) emails a link
|
|
49
51
|
that sets a new password and logs out every device
|
|
50
|
-
- Telegram bridge (optional): link rooms to Telegram groups through a bot; messages, replies, edits, files and (with the bot an admin) reactions go both ways (deletes from Chirkle to Telegram), Telegram people show under stand-in accounts with their names and pictures — see [Telegram
|
|
52
|
+
- Telegram bridge (optional): link rooms to Telegram groups through a bot; messages, replies, edits, files and (with the bot an admin) reactions go both ways (deletes from Chirkle to Telegram), Telegram people show under stand-in accounts with their names and pictures — see [the Telegram bridge](https://chirkle.com/docs/telegram/)
|
|
51
53
|
- Fast room switching: each room's latest messages are kept in the browser (IndexedDB) and shown at once while the
|
|
52
54
|
server answers; unread rooms are fetched ahead. Attachment thumbnails are kept by the service worker, so going back
|
|
53
55
|
to a room (or reloading) doesn't download them again. All of it is cleared on logout
|
|
@@ -57,13 +59,16 @@ Mentions & replies, which load on first use).
|
|
|
57
59
|
- Installable as an app (PWA: Add to Home Screen, the browser's Install button); it opens offline to its shell
|
|
58
60
|
- Optimistic sending with safe retries, reconnect gap-fill, light/dark themes, works on phones
|
|
59
61
|
- A native Android app (Kotlin, Jetpack Compose) with the same features, notifications and a 3 MB download — see
|
|
60
|
-
[Android app](
|
|
62
|
+
[the Android app](https://chirkle.com/docs/android/)
|
|
61
63
|
|
|
62
64
|
<picture>
|
|
63
65
|
<source media="(prefers-color-scheme: dark)" srcset="docs/collections-dark.png">
|
|
64
66
|
<img alt="A collection in Chirkle: the private Moodboard's pictures by month, with Upload, Rename and Make public; the sidebar lists your collections with their counts and a followed one with 3 new" src="docs/collections-light.png">
|
|
65
67
|
</picture>
|
|
66
68
|
|
|
69
|
+
**Documentation: [chirkle.com/docs](https://chirkle.com/docs/)**: installing and deploying, the user guide, administration, the
|
|
70
|
+
Android app, linked servers, the Telegram bridge and the configuration reference.
|
|
71
|
+
|
|
67
72
|
Design: [`docs/DESIGN.md`](docs/DESIGN.md) · Android app: [`docs/ANDROID.md`](docs/ANDROID.md) · QA: [`docs/QA.md`](docs/QA.md) · Refactoring plan: [`docs/REFACTOR.md`](docs/REFACTOR.md) · Archived plans: [MVP build](docs/history/BUILD_PLAN.md), [avatars, DMs, attachments](docs/history/NEXT_FEATURES_PLAN.md)
|
|
68
73
|
|
|
69
74
|
## Requirements
|
|
@@ -91,8 +96,7 @@ Open the page and sign up. The first run prints a link to create the admin (supe
|
|
|
91
96
|
`npx chirkle superuser upsert you@example.com <password>` (`npm start -- superuser upsert …` in a clone).
|
|
92
97
|
`HOST` and `PORT` choose the address (default `127.0.0.1:8090`; `HOST=0.0.0.0` to reach it from other machines),
|
|
93
98
|
`CHIRKLE_DATA` the data directory (default `./pb_data`), and any other `pocketbase serve` flags can follow
|
|
94
|
-
(`npx chirkle --http=0.0.0.0:80`).
|
|
95
|
-
apply as they are. The package ships the server built for Linux and macOS (x64, arm64): no Go or PocketBase download
|
|
99
|
+
(`npx chirkle --http=0.0.0.0:80`). Every setting is in the [configuration reference](https://chirkle.com/docs/reference/configuration/). The package ships the server built for Linux and macOS (x64, arm64): no Go or PocketBase download
|
|
96
100
|
needed.
|
|
97
101
|
|
|
98
102
|
## Getting started (development)
|
|
@@ -128,8 +132,9 @@ The PocketBase admin UI is at http://127.0.0.1:8090/_/ (create a superuser with
|
|
|
128
132
|
| `npm run doctor` | Is this machine ready for the tests? Go, the server binary, ffmpeg, versitygw, free space in `TMPDIR`, stray test servers, free e2e ports, and a browser that starts and draws text (`-- --browsers=chromium,firefox,webkit`). The e2e setup runs it first |
|
|
129
133
|
|
|
130
134
|
Every test run starts its own PocketBase on a free port with a temp data dir — nothing to clean up, and no fakes
|
|
131
|
-
except a stub Telegram Bot API for the bridge's tests. CI (`.github/workflows/ci.yml`) runs
|
|
132
|
-
per browser
|
|
135
|
+
except a stub Telegram Bot API for the bridge's tests. CI (`.github/workflows/ci.yml`) runs small jobs all side by side, so a failed one is re-run alone: typecheck, lint,
|
|
136
|
+
build, Go, unit, component, integration (3 shards), e2e (2 shards per browser: Chromium, Firefox, WebKit), the speed
|
|
137
|
+
check, and the Android app's lint, tests and size. A final "CI passed" job is green only when all of them are.
|
|
133
138
|
|
|
134
139
|
## Project layout
|
|
135
140
|
|
|
@@ -149,144 +154,42 @@ android/ the Android app (docs/ANDROID.md): core/data (API, realtime, da
|
|
|
149
154
|
|
|
150
155
|
## Deploying
|
|
151
156
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
platform with `GOOS`/`GOARCH` (`node scripts/build-server.mjs --all` builds them all into `bin/release/`).
|
|
155
|
-
Migrations run automatically on start, and nothing is served until they are done, so they change only the database.
|
|
156
|
-
What stored files need moving (the shared files of DESIGN.md §37) the media worker does afterwards, while the server
|
|
157
|
-
runs.
|
|
158
|
-
|
|
159
|
-
```sh
|
|
160
|
-
npm ci && npm run setup && npm run build
|
|
161
|
-
rsync -a bin/chirkle-server pb_public pb_migrations pb_hooks server:/opt/chirkle/
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
With a domain pointing at the server, PocketBase serves HTTPS itself (Let's Encrypt):
|
|
165
|
-
|
|
166
|
-
```ini
|
|
167
|
-
# /etc/systemd/system/chirkle.service
|
|
168
|
-
[Unit]
|
|
169
|
-
Description=Chirkle (PocketBase)
|
|
170
|
-
After=network-online.target
|
|
171
|
-
|
|
172
|
-
[Service]
|
|
173
|
-
User=chirkle
|
|
174
|
-
WorkingDirectory=/opt/chirkle
|
|
175
|
-
ExecStart=/opt/chirkle/chirkle-server serve chat.example.com --hooksPool=100 --dir=/opt/chirkle/pb_data --publicDir=/opt/chirkle/pb_public --migrationsDir=/opt/chirkle/pb_migrations --hooksDir=/opt/chirkle/pb_hooks
|
|
176
|
-
Restart=on-failure
|
|
177
|
-
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
178
|
-
LimitNOFILE=65536
|
|
179
|
-
|
|
180
|
-
[Install]
|
|
181
|
-
WantedBy=multi-user.target
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
```sh
|
|
185
|
-
sudo systemctl enable --now chirkle
|
|
186
|
-
sudo -u chirkle /opt/chirkle/chirkle-server superuser upsert you@example.com <password> --dir=/opt/chirkle/pb_data
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Behind an existing reverse proxy instead, use `serve --http=127.0.0.1:8090` and proxy to it (keep
|
|
190
|
-
`/api/realtime` unbuffered — it is a Server-Sent Events stream — and let request bodies through up to 210 MB, since a
|
|
191
|
-
message may carry 10 files of 20 MB), and start PocketBase with
|
|
192
|
-
`TRUSTED_PROXY=X-Forwarded-For` (`Environment=` in the unit). The rate limits are per client IP: without it, every
|
|
193
|
-
request seems to come from the proxy, and one client tripping a limit trips it for everyone. The rightmost address of
|
|
194
|
-
the header is used, the one your proxy added. The Docker image sets it (Dokku always runs a proxy in front); run it
|
|
195
|
-
with `-e TRUSTED_PROXY=off` if clients reach port 8090 directly, since they could then choose their own IP. Unset, the
|
|
196
|
-
setting is left as configured under *Settings → Application* in the admin UI.
|
|
197
|
-
|
|
198
|
-
### Dokku
|
|
199
|
-
|
|
200
|
-
The `Dockerfile` builds the production image (frontend + pinned PocketBase), and `app.json` gives Dokku its health
|
|
201
|
-
check. On the server:
|
|
202
|
-
|
|
203
|
-
```sh
|
|
204
|
-
dokku apps:create chirkle
|
|
205
|
-
# All data (SQLite + uploads) lives in /pb_data: keep it on the host. The directory is owned by uid 32767, the
|
|
206
|
-
# image's user.
|
|
207
|
-
dokku storage:ensure-directory chirkle
|
|
208
|
-
dokku storage:mount chirkle /var/lib/dokku/data/storage/chirkle:/pb_data
|
|
209
|
-
dokku domains:set chirkle chat.example.com
|
|
210
|
-
# nginx allows 1 MB bodies by default; a message may carry 10 files of 20 MB.
|
|
211
|
-
dokku nginx:set chirkle client-max-body-size 210m
|
|
212
|
-
dokku letsencrypt:enable chirkle # with the dokku-letsencrypt plugin
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
Then deploy. The light way is to run the image GitHub builds: after CI passes on `master`,
|
|
216
|
-
`.github/workflows/image.yml` pushes `ghcr.io/border-radius/chirkle:<commit>` (and `:latest`), so the server only pulls
|
|
217
|
-
and restarts, however many apps run it:
|
|
157
|
+
On a Linux server with Node 22+ and a domain pointing at it, one command installs Chirkle as a systemd service that
|
|
158
|
+
serves HTTPS itself (Let's Encrypt, on :80/:443):
|
|
218
159
|
|
|
219
160
|
```sh
|
|
220
|
-
|
|
161
|
+
sudo npx chirkle install-service chat.example.com
|
|
221
162
|
```
|
|
222
163
|
|
|
223
|
-
|
|
224
|
-
refs/heads/master` names; until its image exists (CI and the build take a few minutes, and a commit that fails CI
|
|
225
|
-
gets none) `docker pull` of it fails, and the app keeps running what it has.
|
|
164
|
+
The documentation covers the rest:
|
|
226
165
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
sets `TRUSTED_PROXY` for Dokku's proxy. `dokku logs chirkle -t` shows PocketBase's output; the app's own log (request
|
|
236
|
-
log and errors from hooks) is in the admin UI under *Logs*.
|
|
237
|
-
|
|
238
|
-
### Running it
|
|
239
|
-
|
|
240
|
-
**Branding and invite-only signups:** in the admin UI, *Collections → site*, edit the one record: `title` and `logo`
|
|
241
|
-
are shown in the app bar, on the login page and in the tab's title. Tick `invite_only` and fill `invite_code` to let
|
|
242
|
-
only people who have the code sign up (they enter it on the Sign up form; it is case-sensitive). Change the code to stop
|
|
243
|
-
the old one working; leave it empty to close signups. Existing accounts are unaffected, and you can still create
|
|
244
|
-
accounts yourself under *Collections → users*.
|
|
245
|
-
|
|
246
|
-
**Moderators and statistics:** in the admin UI, *Collections → users*, tick `moderator` on someone's record. They
|
|
247
|
-
then delete messages, change room access, archive rooms and ban people from the app (`banned` on the same record
|
|
248
|
-
undoes a ban), and find usage statistics on Settings; superusers signed in to the admin UI open `/stats` directly.
|
|
249
|
-
Tick `no_stats` on the *site* record to stop recording them.
|
|
250
|
-
|
|
251
|
-
**Forgot password:** in the admin UI, set *Settings → Application → Application URL* to the server's public
|
|
252
|
-
address (the emailed link starts with it) and the sender under *Settings → Mail settings*, and turn on *Use SMTP
|
|
253
|
-
mail server* with your provider's host, port and login; *Send test email* checks it. Only then do the login pages
|
|
254
|
-
offer "Forgot password?" (an SMTP server set but turned off isn't used). The link opens `/reset-password/…` on the
|
|
255
|
-
web, works once for 30 minutes, and logs out every device of the account. The email's wording is under *Collections →
|
|
256
|
-
users → Options → Default Password reset email template*; keep `{APP_URL}/reset-password/{TOKEN}` as its link.
|
|
257
|
-
|
|
258
|
-
**Backups:** in the admin UI, *Settings → Backups* — schedule automatic backups (optionally to S3-compatible
|
|
259
|
-
storage). Uploaded files (avatars, attachments) live in `pb_data/storage` (or S3, under *Settings → Files storage*) and
|
|
260
|
-
are part of the backups, so plan disk space for them. **Rate limits** (per IP: messages 10 per 5 s, edits/deletes 20
|
|
261
|
-
per 10 s, reactions 30 per 10 s, forwarding and deleting several messages 20 requests per minute each, password changes 5 per minute, password reset emails 5 per 10 minutes, new rooms 5 per minute, opening DMs 10 per minute, marking rooms read 120 per minute, signups 20 per minute; PocketBase defaults for the rest)
|
|
262
|
-
are set by the migrations and adjustable under *Settings → Rate limits*.
|
|
166
|
+
- [Run it on a server](https://chirkle.com/docs/deploy/): the one-command install and its options, updating, uninstalling, and running the
|
|
167
|
+
server by hand
|
|
168
|
+
- [Docker](https://chirkle.com/docs/deploy/docker/) and [Dokku](https://chirkle.com/docs/deploy/dokku/), including running the image GitHub builds for every
|
|
169
|
+
commit on `master` and following it from cron
|
|
170
|
+
- [Behind a reverse proxy](https://chirkle.com/docs/deploy/reverse-proxy/): nginx and Caddy examples, and `TRUSTED_PROXY`
|
|
171
|
+
- [Administration](https://chirkle.com/docs/admin/): branding, invite-only signups, moderators, anonymous rooms, email, backups and S3,
|
|
172
|
+
rate limits, [link previews and video thumbnails](https://chirkle.com/docs/admin/previews-and-thumbnails/), metrics
|
|
173
|
+
- [Configuration reference](https://chirkle.com/docs/reference/configuration/): every environment variable, flag and setting in one place
|
|
263
174
|
|
|
264
175
|
## Android app
|
|
265
176
|
|
|
266
|
-
|
|
267
|
-
|
|
177
|
+
A native client for any server running Chirkle (Kotlin, Jetpack Compose), with several accounts at once on one server
|
|
178
|
+
or many, and notifications without Google services. Installing it, and what a server's admin can set up for it (room
|
|
179
|
+
links that open in the app, a minimum app version, a build for your own server):
|
|
180
|
+
[the Android app](https://chirkle.com/docs/android/) and [for admins](https://chirkle.com/docs/android/for-admins/).
|
|
268
181
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
rest. Its tests start the server from `bin/`, so run `npm run setup` first.
|
|
182
|
+
To work on it (`android/`), you need JDK 17+ (21 recommended) and the Android SDK (`ANDROID_HOME`, or `sdk.dir` in
|
|
183
|
+
`android/local.properties`); Gradle fetches the rest. Its tests start the server from `bin/`, so run `npm run setup`
|
|
184
|
+
first.
|
|
273
185
|
|
|
274
186
|
```sh
|
|
275
187
|
cd android
|
|
276
188
|
./gradlew assembleDebug # app/build/outputs/apk/debug: offers http://10.0.2.2:8090 (the dev server, from the emulator)
|
|
277
189
|
./gradlew check # lint, unit tests, API tests against PocketBase, UI tests on Robolectric
|
|
278
|
-
./gradlew checkApkSize -Pchirkle.server=https://chat.example.org -Pchirkle.appId=org.example.chirkle
|
|
279
190
|
```
|
|
280
191
|
|
|
281
|
-
|
|
282
|
-
A build only sets the server offered first: `-Pchirkle.devServer=http://192.168.1.20:8090` for a debug build on a device,
|
|
283
|
-
`chirkle.server` for a release (without one, the app asks for a server, and no host's links open in the app). Debug builds
|
|
284
|
-
take http addresses; release builds take https only. The app notifies of DMs and replies to you by checking each
|
|
285
|
-
account's server about every 15 minutes (WorkManager), with no Google services and nothing to set up on the server
|
|
286
|
-
(ANDROID.md §21). Links to rooms on the build's server open in the app once `ANDROID_CERT_SHA256` is
|
|
287
|
-
set (`/.well-known/assetlinks.json`; `ANDROID_APP_ID` only for a build with another `chirkle.appId`). An admin can set
|
|
288
|
-
`min_android_version` on the site record to make older apps ask for an update. What is built and what isn't yet:
|
|
289
|
-
[`docs/ANDROID.md` §16](docs/ANDROID.md#16-implementation-2026-10-18), and [`android/PARITY.md`](android/PARITY.md).
|
|
192
|
+
Design: [`docs/ANDROID.md`](docs/ANDROID.md). What it has of the web app's features: [`android/PARITY.md`](android/PARITY.md).
|
|
290
193
|
|
|
291
194
|
## Releasing
|
|
292
195
|
|
|
@@ -297,77 +200,16 @@ Commit, push, then publish a GitHub Release with the new tag `v0.2.0`. The Relea
|
|
|
297
200
|
stages `chirkle@0.2.0` on npm; approve it on npmjs.com (2FA) to publish it. Setup and details:
|
|
298
201
|
[`docs/ANDROID.md` §28.7](docs/ANDROID.md#287-one-release-for-the-app-and-the-npm-package-2026-11-08).
|
|
299
202
|
|
|
300
|
-
## Link previews
|
|
301
|
-
|
|
302
|
-
Messages show a line under them for each link: the page's favicon and title ([`docs/DESIGN.md` §28](docs/design/28-link-previews.md)).
|
|
303
|
-
The server fetches them with `curl` (in the Docker image), only from public addresses. Set `LINK_PREVIEWS=off` to turn
|
|
304
|
-
it off.
|
|
305
|
-
|
|
306
|
-
## Media grid
|
|
307
|
-
|
|
308
|
-
Each room's Media button shows its images and videos as a grid ([`docs/DESIGN.md` §30](docs/design/30-media-grid.md)). A worker on
|
|
309
|
-
the server makes their thumbnails ahead of time, and a poster frame for each video with `ffmpeg` (in the Docker
|
|
310
|
-
image), which the room shows too, so browsers don't load videos just to draw their first frame. Set `FFMPEG=off` to
|
|
311
|
-
go without: videos then show their first frame in the room as before, and plain tiles in the grid.
|
|
312
|
-
|
|
313
203
|
## Telegram integration
|
|
314
204
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
the bot posts Chirkle messages with the author's name above them.
|
|
319
|
-
|
|
320
|
-
**Setup**
|
|
321
|
-
|
|
322
|
-
1. Create a bot with [@BotFather](https://t.me/BotFather) (`/newbot`) and keep its token. Turn its privacy mode off
|
|
323
|
-
(`/setprivacy` → Disable) so it sees group messages; if the bot is already in a group, remove it and add it again.
|
|
324
|
-
2. Set the environment and restart:
|
|
325
|
-
- `TELEGRAM_BOT_TOKEN` — the bot's token (without it the bridge is off)
|
|
326
|
-
- `TELEGRAM_WEBHOOK_URL` — `https://<your domain>/api/telegram/webhook` (without it the bridge polls Telegram,
|
|
327
|
-
for local development)
|
|
328
|
-
|
|
329
|
-
With Dokku: `dokku config:set chirkle TELEGRAM_BOT_TOKEN='…' TELEGRAM_WEBHOOK_URL='https://chat.example.com/api/telegram/webhook'`.
|
|
330
|
-
3. Add the bot to a Telegram group. A row for it appears in the admin UI under *Collections → tg_links*: pick the
|
|
331
|
-
room and tick `enabled`. `/chatid` in the group says whether it is linked. Make the bot a group admin to bring
|
|
332
|
-
reactions over: Telegram tells only admins about them. Tick `anonymous` too to repost the
|
|
333
|
-
room's messages to that group without their authors' names.
|
|
334
|
-
|
|
335
|
-
To make a room **anonymous**, tick `anonymous` on its row under *Collections → rooms* in the admin UI. Messages
|
|
336
|
-
posted from then on show the room's name instead of their authors to everyone but the authors themselves (and
|
|
337
|
-
superusers); see DESIGN.md §35. Telegram groups linked to it get the room's name as the author too.
|
|
338
|
-
|
|
339
|
-
The bridge is self-contained: `pb_hooks/telegram.pb.js`, `pb_hooks/telegram/` and its own `tg_*` collections. Delete
|
|
340
|
-
the first two to remove it.
|
|
205
|
+
Link rooms to Telegram groups and channels through your own bot: messages, replies, edits and files go both ways, and
|
|
206
|
+
reactions too with the bot an admin. Set `TELEGRAM_BOT_TOKEN` and `TELEGRAM_WEBHOOK_URL`, add the bot to a group, and
|
|
207
|
+
link the group to a room in the admin UI. Setup, options and limits: [the Telegram bridge](https://chirkle.com/docs/telegram/).
|
|
341
208
|
|
|
342
209
|
## Linked instances
|
|
343
210
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
replies, reactions and files go both ways. People from the other server show under stand-in users named after them
|
|
347
|
-
("Ann (B)"). Only the admins of both servers pair them and choose which rooms to share.
|
|
348
|
-
|
|
349
|
-
**Setup** (on each server)
|
|
350
|
-
|
|
351
|
-
1. Turn it on: in the admin UI, set *Settings → Application → Application URL* to the server's public address, e.g.
|
|
352
|
-
`https://chat.example.com`, then tick `federation` on the record under *Collections → site*. Peers are reached over
|
|
353
|
-
https, on public addresses only. The address is part of the ids the peers keep, so it can't be changed while any
|
|
354
|
-
peer is listed. (A server set up with the old `FEDERATION_ORIGIN` variable gets both done by its next start's
|
|
355
|
-
migration; the variable is no longer read after that.)
|
|
356
|
-
2. Pair: on server A, under *Collections → fed_peers*, add a row with B's address and a short label for its people
|
|
357
|
-
(`B`); tick `dms` to let people write DMs across. A sends B the request, and it shows on B as a row with status
|
|
358
|
-
`requested` (B checks with A that it really asked). B's admin accepts by setting its status to `active`, choosing
|
|
359
|
-
a label for A's people (and `dms`); both rows are then `active`. Deleting the request declines it. A request B
|
|
360
|
-
can't be reached for is sent again every minute; one nobody accepts expires after 7 days. If both admins add
|
|
361
|
-
each other, they pair at once.
|
|
362
|
-
3. Share a room: on its home, add a row under *fed_shares* with the room and the peer. The peer's admin finds it under
|
|
363
|
-
*fed_shares* there and ticks `accepted`; the room then appears there, named "general (A)", with its latest 200
|
|
364
|
-
messages. Private rooms too: each side's admins add their own people (on the copy, by editing its members), and the
|
|
365
|
-
room's creator can add people from the other server by their address, `ann@b.example`.
|
|
366
|
-
4. DMs: with `dms` ticked on both sides, people type `name@b.example` in "New message".
|
|
367
|
-
|
|
368
|
-
Suspend a peer by setting its `status` to `suspended`; delete its row to unpair (the copies are archived, DMs become
|
|
369
|
-
read-only). The feature is self-contained: `pb_hooks/federation.pb.js`, `pb_hooks/federation/` and the `fed_*`
|
|
370
|
-
collections; while `federation` isn't ticked, its routes answer 404 and nothing is sent.
|
|
211
|
+
Chirkle servers can be paired by their admins to share rooms, public or private, and let their people DM each other.
|
|
212
|
+
Off by default. Setup, sharing, moderation and unpairing: [linked servers](https://chirkle.com/docs/linking/).
|
|
371
213
|
|
|
372
214
|
## License
|
|
373
215
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/bin/release/darwin-amd64/chirkle-server
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 34443616 bytes
|
|
4
|
+
sha256: 699ea474005e640f9ea524a65f4ffe9fa9fd20fc1829614da19e91c1a77d08c0
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chirkle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "A small, fast, real-time group chat: one PocketBase server, a vanilla TypeScript web app",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/border-radius/chirkle.git"
|
|
9
9
|
},
|
|
10
|
-
"
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/border-radius/chirkle/issues"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://chirkle.com/",
|
|
11
14
|
"keywords": [
|
|
12
15
|
"chat",
|
|
13
|
-
"
|
|
16
|
+
"messenger",
|
|
17
|
+
"team-chat",
|
|
18
|
+
"group-chat",
|
|
14
19
|
"self-hosted",
|
|
15
|
-
"
|
|
20
|
+
"selfhosted",
|
|
21
|
+
"slack-alternative",
|
|
22
|
+
"discord-alternative",
|
|
23
|
+
"telegram",
|
|
24
|
+
"pocketbase",
|
|
25
|
+
"sqlite",
|
|
26
|
+
"realtime",
|
|
27
|
+
"pwa"
|
|
16
28
|
],
|
|
17
29
|
"type": "module",
|
|
18
30
|
"bin": {
|
|
@@ -23,6 +35,7 @@
|
|
|
23
35
|
"pb_hooks/",
|
|
24
36
|
"pb_migrations/",
|
|
25
37
|
"scripts/start.mjs",
|
|
38
|
+
"scripts/service.mjs",
|
|
26
39
|
"bin/release/"
|
|
27
40
|
],
|
|
28
41
|
"engines": {
|
|
@@ -70,7 +83,7 @@
|
|
|
70
83
|
"eventsource": "5.1.2",
|
|
71
84
|
"happy-dom": "20.14.5",
|
|
72
85
|
"playwright-core": "1.63.0",
|
|
73
|
-
"pocketbase": "0.
|
|
86
|
+
"pocketbase": "0.29.0",
|
|
74
87
|
"typescript": "7.0.2",
|
|
75
88
|
"vitest": "5.0.2"
|
|
76
89
|
},
|