Skip to content

Architecture and Design Principles

Théophile Choutri edited this page Dec 27, 2021 · 16 revisions

Design Principles (in order, TL;DR)

  • 12-factor principles
  • No necessary JS to use the website
  • Be accessible
  • Be self-hostable

Architecture

Web interface

The web interface is served by Servant endpoints, and the UI is designed with Tailwind CSS. A mix of HTML classes and CSS rules is used, when deemed appropriate. Few JS dependencies are required, and it should be a past of least resistance during development.

Storage

All data that is not a package tarball is saved in a PostgreSQL 14 database.

Session Ids are stored in browser cookies, with a default TTL of 1 week when the user wishes to be remembered.

Package tarballs are to be stored in an S3-compatible service when you need to be 12-Factor compliant, or on FS if you need to.

Fundamentally, everything but caching has to be accessible from any applicative server. Load-balancing must be made very easy.

Logging & Metrics

Logging and metrics are first-class components of the server. Optional integrations are available for Prometheus and Sentry.

Clone this wiki locally