日本語のREADMEはこちらです: README.ja.md
A simple, private bulletin board system built with Deno. It features cryptographic user identities, real-time updates, and WebPush notifications.
- Decentralized Identity: User accounts are based on public/private key pairs. No registration or central authority is required.
- WebPush Notifications: Get notified of new posts even when the browser tab is closed.
- Rooms/Channels: Organize discussions into different rooms, configured via a JSON file.
- Rich Interactions: Supports comments, likes, and deletion of posts.
- Simple & Self-Hosted: Runs as a single Deno process with no external database dependencies.
- Customizable Theme: Easily change the look and feel by editing the CSS file.
- Deno (v1.34+)
git clone https://github.com/code4fukui/private-bbs.git
cd private-bbsEdit the static/settings.json file to customize your instance:
{
"title": "PRIVATE BBS",
"css": "style.css",
"url": "http://localhost:8080/",
"rooms": ["General", "Tech", "Random"]
}title: The name of your bulletin board.css: The stylesheet to use (e.g.,style.cssorstyle_nurseket.css).url: The public URL of your service. This must be set correctly for push notifications to work.rooms: An array of strings to define the available discussion rooms.
Generate VAPID keys required for WebPush. This command will create a static/vapidPublicKey.txt for the client and a .env file with the private key for the server.
deno run -A https://code4fukui.github.io/WebPush/init.js yourmailaddress@yourdomainStart the application using the deno serve command.
deno serve --allow-import --allow-write --allow-read --allow-net --port 8080 --host "[::]" server.jsNow, open your browser and navigate to http://localhost:8080.
- Backend: A Deno server (
server.js) handles API requests for posting, fetching data, and managing push subscriptions. - Frontend: A vanilla JavaScript single-page application (
static/index.html). A user's private key is generated on the first visit and stored inlocalStorage. - Data Storage: Posts are stored as individual CBOR-encoded files in the
data/directory, organized by date (data/YYYYMMDD/). Atimeline.jsonlfile tracks the order of all posts for efficient retrieval of the latest content. Access logs are stored in thelog/directory.
The server exposes a simple JSON-RPC-style API to handle client actions:
add: Creates a new post, comment, or interaction (like/remove).getLatest: Retrieves posts created after a specified timestamp.subscribe: Registers a client for WebPush notifications.unsubscribe: Removes a WebPush subscription.
This project is built using several modules from code4fukui:
MIT License