Link

↗Link
Ggithub.com
GitHub - cauenapier/TownSquare
- TownSquare is a tiny presence layer for websites with embeddable real-time presence, simple left/right walking, lightweight chat, and bench/tree seat interactions.
- The repo’s current goal is to define a small but clear product boundary so the core widget can be self-hosted now and later extended into a hosted shared service without rewrites.
- Self-hosted TownSquare instances may still communicate with other TownSquares and join a wider network later.
- The codebase is split into a reusable widget module plus a demo bootstrap, with the widget loaded via CSS and the /townsquare.mjs module.
- The widget uses a realtime/backend origin called serverOrigin, with /live as the default websocket path unless a reverse proxy changes it.
- A siteKey is only needed when one hosted TownSquare server serves multiple registered sites.
- Hosted registration is accountless: a user enters a website URL, receives an embed snippet, a private admin token, and an admin link.
- The public siteKey isolates visitors into a site-specific scene, while the private admin token controls settings and moderation.
- Admin actions include viewing install/seen status, marking a site owner, kicking or blocking visitors, disabling chat, disabling the site, and clearing recent in-memory messages.
- The owner badge is server-issued and tied to the specific browser via browserSecret, so it cannot be faked by typing a name or choosing a color.
Your notes
Save this item to your library to add private notes.