Skip to content
Samuele Cieri

(04) Systems

Systems & architecture

Two projects I built to learn data engineering on real data.

  • Multi-user personal finance platform, in Rust and PostgreSQL.

    Multi-user personal finance platform: a layered Rust workspace (pure domain, SQLx data layer, Axum API, background worker) over PostgreSQL, serving an Expo app for iOS, Android and web plus a Tauri desktop shell.

    Engineering decisions

    • Hexagonal crate split: an I/O-free domain checked in CI
    • Row-level security scoped on every pooled connection
    • Transactional outbox for push notifications, SKIP LOCKED job claims
    • Rotating refresh tokens, rate-limited login, typed error codes
    • Prometheus metrics, OTLP traces, health probes, graceful shutdown
    • Playwright E2E on the real stack, k6 load tests, compile-time checked SQL

    Topology

    1. Expo · Tauri

      Mobile, web & desktop

    2. Rust · Axum

      Typed HTTP API, JWT

    3. Rust · Tokio

      Scheduled jobs

    4. PostgreSQL 18

      Triggers, RLS, analytics

    What it shows for data engineering

    Integrity enforced in the database: balances maintained only by triggers, row-level security per user, SQL analytics functions for trends and budgets, idempotent imports of third-party exports.

    Version

    v1.3.1

    Read the case studyPrivate code: demo on request
  • Data platform for air quality in Emilia-Romagna.

    End-to-end data platform for Emilia-Romagna air quality on ARPAE open data, enriched with Open-Meteo weather: Rust ingestion into partitioned Parquet, dbt models on DuckDB locally and BigQuery on GCP, Dagster orchestration. It runs locally with Docker, dashboard and CI included, and the same models ran on BigQuery in a real Google Cloud project with results identical to DuckDB.

    Engineering decisions

    • Idempotent incremental ingestion: rolling-window reprocessing and upserts on the natural key
    • Layered dbt models (staging, intermediate, marts) with SCD Type 2 station history
    • Data quality as code: uniqueness, completeness and freshness tests
    • Completeness measured against an expected time grid, never filled in raw
    • Legal limits in a dbt seed, never hardcoded
    • Same models on DuckDB and BigQuery, infrastructure via Terraform

    Topology

    1. Rust

      ARPAE and Open-Meteo, idempotent

    2. Parquet

      Raw partitioned by year/month

    3. dbt · DuckDB · BigQuery

      Staging, intermediate, marts

    4. Dagster

      Schedules, backfills, lineage

    What it shows for data engineering

    A pure data engineering project: provisional measurements revised after validation, gaps and inconsistent formats in the source, turned into a historized, tested dataset that answers legal-limit exceedances, pollutant trends and weather correlation.

    Version

    v1.2.0

    Read the case studyRepository