Technical Architecture

Design view focused on real operations: accounting traceability, roles and approval workflows for small organizations.

System layers

Layer 1 · API

abhackus-rest-api (Rust + Axum + SQLx) exposes auth, users, accounting, reporting and support with role-based rules and traceability.

Layer 2 · Data

PostgreSQL 14+ as source of truth, using DATABASE_URL=postgres://user:password@host:5432/abhackus and versioned migrations in abhackus-dborm/migrations.

Layer 3 · Interfaces

Web (Leptos + Tailwind) for daily operations and TUI (Ratatui) for terminal administration.

Layer 4 · Operations

ODS import, admin validation for sensitive payments, periodic reconciliation and exportable reports.

Engineering decisions

REST-first as active standard

Reduces operational complexity and speeds web/TUI integration.

CLP integer amounts

Avoids rounding issues and simplifies accounting reconciliation.

Mandatory approval for member fees/voluntary contributions

Protects cash consistency and separates submission from admin validation.

Transition audit trail

Every state change records actor, reason and UTC timestamp.

Minimum runbook

Reference commands to prepare PostgreSQL, obtain connection parameters, and bootstrap API/local operations.

# 1) Verificar conexion actual a PostgreSQL
psql -h 127.0.0.1 -p 5432 -U postgres -d postgres -c '\conninfo'

# 2) Definir parametros y construir DATABASE_URL
export PGHOST=127.0.0.1
export PGPORT=5432
export PGUSER=app_user
export PGPASSWORD=app_password
export PGDATABASE=app_db
export DATABASE_URL="postgres://$PGUSER:$PGPASSWORD@$PGHOST:$PGPORT/$PGDATABASE"

# 3) Migrar y ejecutar stack principal
make migrate
ABHACKUS_JWT_SECRET='change-me' make rest-run
make tailwind-watch
cargo run -p abhackus-tui