Share events between services.
Find a file
2026-05-03 18:39:04 +02:00
npins feat: Add initial Mobilizon => Discord sync (#1) 2026-04-20 18:42:04 +00:00
src feat: Now more timezone aware than ever 2026-05-03 18:39:04 +02:00
templates feat: Add initial Mobilizon => Discord sync (#1) 2026-04-20 18:42:04 +00:00
.envrc feat: Add initial Mobilizon => Discord sync (#1) 2026-04-20 18:42:04 +00:00
.gitignore feat: Add initial Mobilizon => Discord sync (#1) 2026-04-20 18:42:04 +00:00
.pre-commit-config.yaml feat: Add initial Mobilizon => Discord sync (#1) 2026-04-20 18:42:04 +00:00
devenv.nix feat: Now more timezone aware than ever 2026-05-03 18:39:04 +02:00
devenv.yaml Basic env and description 2026-03-16 21:06:33 +01:00
LICENSE Initial commit 2026-03-09 14:18:48 +00:00
pyproject.toml feat: Now more timezone aware than ever 2026-05-03 18:39:04 +02:00
README.md feat: Add initial Mobilizon => Discord sync (#1) 2026-04-20 18:42:04 +00:00
shell.nix feat: Add initial Mobilizon => Discord sync (#1) 2026-04-20 18:42:04 +00:00

kronos

Share events between services.

Setup

Nix is required.

  • Add cachix binary cache (this will speed up building):
cachix use hs3city
  • Set up environment.
direnv allow
  • Set up pre-commit hooks.
pre-commit install
  • Install as editable package.
uv pip install -e .

Run

Once installed, run:

kronos

TODO: add parameters. TODO: add info on how to run as a Podman service.

High level design

kronos is an application able to sync events from a single source of truth to multiple consumer services. E.g., an event defined by Mobilizon is modified -> Discord, Meetup, any other, are updated.

It is deployed as a Docker container, running as a service. Persistent storage is required for SQLite database. Secrets management is used to handle credentials. systemd timer is configured to trigger the app. E.g., kronos is being run every three hours to perform events update.

Each app run performs the following:

  • Request event data from source of truth service (e.g., Mobilizon).
  • Compare event data between received and stored in the database.
    • Update if new data available (last change date is later than known).
    • Stop execution otherwise.
  • Send updates event data to consumers.
┌───────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                               │
│ CONTAINER                                                                                     │
│                                                                                               │
│              ┌───────────────┐               ┌────────┐                                       │
│              │               │               │        │                                       │
│              │ systemd timer │               │ volume │                                       │
│              │               │               │        │                                       │
│              └───────┬───────┘               └────┬───┘                                       │
│                      │                            │                                           │
│ ┌────────────────────┴────────────────────────────┼─────────────────────────────────────────┐ │
│ │                                                 │                                         │ │
│ │  APP                                            │                                         │ │
│ │            ┌───────────────┐               ┌────┴─────┐                ┌────────────────┐ │ │
│ │   trigger  │               │  event data   │          │  event data    │                │ │ │
│ │ ──────────►│ data provider ├──────────────►│ database ├───────────────►│ data consumers │ │ │
│ │            │               │               │          │                │                │ │ │
│ │            └───────────────┘               └──────────┘                └────────────────┘ │ │
│ │                                                                                           │ │
│ └───────────────────────────────────────────────────────────────────────────────────────────┘ │
│                                                                                               │
└───────────────────────────────────────────────────────────────────────────────────────────────┘