summaryrefslogtreecommitdiff
path: root/docs/developer/introduction.md
blob: 0b6233d0fc13be942f8198d9c10a64c2c1ad2754 (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
# Introduction

This book is for developers looking to make changes to Pilcrow, either on the server, on the included client, or via its data model.

Pilcrow is a web-based chat system that enables users to send and receive short messages with (hopefully) low latency to other users within the same community. It is composed of two main parts: the Pilcrow server, and Pilcrow clients. The following chapters lay out how each of these components is organized and implemented.

A Pilcrow deployment consists of one server, servicing any number of connected clients.

## The Pilcrow server

The Pilcrow server is a Unix application designed to run as a service. It exposes services to Pilcrow users via an HTTP API, both for synchronous operations, and for asynchronous notifications. The primary services are:

- An _event stream_, notifying client applications of operations carried out by other clients or by the server, and
- A collection of _API endpoints_, allowing client applications to submit operations to the server.

The Pilcrow server also includes a Pilcrow client application, served over HTTP.

For ease of deployment and administration, the Pilcrow server stores persistent data in a single database file, on the server's local filesystem.

## Clients

A Pilcrow client consists of one or more applications that connect to the Pilcrow server on behalf of one or more users. A client must subscribe to and consume events, and may submit operations back to the server over its HTTP API.

The included client is a [progressive web application](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps), which runs in most browsers that can run Javascript and provide complex layouts. When run, it connects to the server from which it was downloaded. It can also be installed on any OS or using any browser that supports local installation of progressive web applications.