Skip to content

Overview

OriginChats is a self-hostable chat system. originchats-osl is the reference server, written in OSL. It exposes rendered informational pages, asset and attachment endpoints, inbound webhooks, and a JSON WebSocket API from one port.

Surface Transport Purpose
/ WebSocket Authenticated command and event protocol
/ HTTP GET Server home page
/info, /user/{username} HTTP GET Public server and user pages
/server-assets/{name} HTTP GET Server icon and banner
/emojis/{name}, /stickers/{name} HTTP GET Custom assets
/attachments/upload HTTP POST Authenticated attachment upload
/attachments/{id} HTTP GET Attachment download
/webhooks[/…] HTTP GET/POST Webhook discovery and ingestion

The server is intentionally synchronous and legible. Users, roles, and channels are loaded into memory at startup. Small indexes are JSON. Messages are append-friendly JSONL shards. A single dispatcher owns authentication, command permissions, request correlation, and event fan-out so handlers can stay thin.

The handshake advertises protocol version, server identity, limits, upload rules, attachment policy, known permissions, and capabilities. That makes it the compatibility contract between independently developed clients and servers.