Skip to content

Architecture and Design Principles

Théophile Choutri de Tarlé edited this page Jan 1, 2025 · 16 revisions

Design Principles (in order, TL;DR)

  • 12-factor principles
  • Be accessible
  • Minimal JS requirements
  • Be self-hostable

Architecture

flora-schema-2025-01

https://excalidraw.com/#json=VaoQ4J_IGx4dLt_-Kk9Td,wL4N1kRCPaR_1XzBTHFHVg

Web interface

The web interface is served by Servant endpoints. 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 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 the filesystem 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
  • Sentry.