julius

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT

README

Julius

Julius is a personal finance application with a local first-run wizard, a bilingual interface, and accounts and transactions in BRL, USD, and EUR. It supports SQLite and PostgreSQL, a single owner, manual accounts, and a fully synthetic demo.

First run

Extract the archive for your operating system and CPU, then run:

./julius version
./julius serve

On Windows use julius.exe. Julius prints a local setup URL and opens your browser on the first run. Paste the printed URL if the browser does not open. The token in its fragment authorizes the single setup form; choose a login, password, language, reporting currency, and timezone. Successful setup creates the owner, preferences, initial categories, and session together, then opens Home. Invalid setup saves nothing. Once complete, setup stays closed.

Open Settings to load the fictional demo or create a manual account. Demo accounts and transactions cover BRL, USD, and EUR and use fixed synthetic dates. Repeating the demo load is idempotent. Home and Accounts keep balances separate by currency; reporting currency does not silently convert or combine them. Transactions show the amount settled in the account currency, with an original amount when supplied.

Choose English or Brazilian Portuguese and a system, light, or dark theme in Settings. Log out to end the current session; log in again with the owner's credentials. Sessions survive a server restart and expire after 30 days. Stop the server with Ctrl+C; POSIX SIGTERM also drains requests. Use ./julius serve --no-browser for headless use. /health reports process health.

Configuration

Defaults create a private local SQLite database and a master key. No .env file is loaded automatically. Explicit empty settings are errors. Settings, database connection, migrations, key, and origin are checked before serving; failures print a clear error without exposing database credentials.

Variable Default Purpose
JULIUS_HTTP_ADDR 127.0.0.1:8080 Literal IP and port 1–65535
JULIUS_SHUTDOWN_TIMEOUT 5s Positive Go duration, at most 1m
JULIUS_DATA_DIR OS data directory below Local data and key location
JULIUS_DB_DRIVER sqlite sqlite or postgres
JULIUS_DATABASE_URL <data-dir>/julius.db SQLite file path or PostgreSQL connection URI
JULIUS_BACKUP_DIR <data-dir>/backups Pre-migration backups
JULIUS_MASTER_KEY_FILE <data-dir>/master.key Private session-signing key
JULIUS_PUBLIC_ORIGIN HTTP origin of the loopback address Exact browser origin; HTTPS is required for remote origins or exposed listeners

Data directories are $XDG_DATA_HOME/julius or ~/.local/share/julius on Linux, ~/Library/Application Support/Julius on macOS, and %LOCALAPPDATA%/Julius on Windows. To try an isolated installation, set JULIUS_DATA_DIR to an empty directory before starting. Keep the key alongside backups; an initialized database without its key fails closed.

PostgreSQL requires version 17 or newer and an explicitly configured URI. Initial empty databases migrate automatically. Before changing an existing schema Julius creates a backup; PostgreSQL requires the matching pg_dump client on PATH and permissions to back up the database. Backup failure stops migration. Updates only move forward; released migrations are immutable and no binary downgrade is supported. See storage and updates.

Use the loopback default locally. For remote use, configure an HTTPS public origin and a trusted reverse proxy. Browser mutations require the exact Origin and request/CSRF header; session cookies are HttpOnly, SameSite, and Secure for HTTPS. The master key and financial data must remain outside the public repository.

Verify a download

Get the archive, its <archive>.sbom.json, and checksums.txt from the same published release. Compare SHA-256 with the named entry and verify provenance:

gh attestation verify julius_0.0.1_linux_amd64.tar.gz \
  --repo greg0x46/julius \
  --signer-workflow greg0x46/julius/.github/workflows/release.yml \
  --source-ref refs/tags/v0.0.1 --deny-self-hosted-runners

Replace the example filename and tag with an available release. Linux/macOS archives are .tar.gz; Windows uses .zip. Both amd64 and arm64 are supported. Linux provides sha256sum, macOS shasum -a 256, and PowerShell Get-FileHash -Algorithm SHA256. See release verification.

Executables are unsigned and macOS builds are not notarized. After verifying the download, macOS users can approve it in System Settings → Privacy & Security; Windows may offer approval in SmartScreen. Managed devices may require administrator approval.

Development

Requires Go 1.26.6+, Node 24.21+, Python 3.10+, GNU Make, gofumpt v0.12.0, and golangci-lint v2.14.0.

npm ci --prefix web
make check
# Install Chromium once for browser tests:
cd web && npx playwright install chromium && cd ..
make e2e
make snapshot  # GoReleaser v2.18.2 and Syft v1.54.0

make check validates Go formatting/lint/vet, policy tests, race-enabled tests, frontend lint/types/unit tests, structural OpenAPI validation and generated types, an embedded binary build, and an isolated first-run/demo smoke test. make test uses temporary SQLite files. Set JULIUS_TEST_POSTGRES_DSN to a disposable test database to also run the stores, schema parity, setup, and gateway checks on PostgreSQL; each test uses its own temporary schema. Never point it at personal or production records.

make build embeds the frontend. go test ./cmd/... ./api/... ./internal/... and go build ./cmd/julius work without Node through the development fallback. make snapshot builds the frontend once and reuses it for all six archives, SBOMs, and checksums. Local checks execute only the host-native archive; native macOS/Windows and remote provenance checks run on GitHub after an authorized push/tag.

The OpenAPI contract generates Go and TypeScript types; regenerate with make api-generate. API errors use application/problem+json, with a stable code and request ID. Financial values are strings. Arithmetic uses variable-precision decimals in Go, with explicit currency and half-even final rounding.

For frontend development, run the API on 127.0.0.1:8080 with JULIUS_PUBLIC_ORIGIN=http://127.0.0.1:5173 and an explicit, separate JULIUS_DATA_DIR containing synthetic data. Run npm run dev --prefix web in another terminal. Vite uses port 5173 and proxies API/health requests to JULIUS_HTTP_ADDR (port 8080 by default); the printed setup URL opens the Vite interface. Use the embedded make build binary for the complete distribution experience.

See CONTRIBUTING, SECURITY, architecture, and versioning. Licensed under MIT.

Directories

Path Synopsis
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
cmd
julius command
internal
connections
Package connections normalizes provider data before it enters the ledger.
Package connections normalizes provider data before it enters the ledger.
fx
Package fx stores explicit, dated foreign exchange rates.
Package fx stores explicit, dated foreign exchange rates.
httpapi
Package httpapi exposes the generated same-origin API contract.
Package httpapi exposes the generated same-origin API contract.
ledger
Package ledger owns normalized accounts, transactions, and money totals.
Package ledger owns normalized accounts, transactions, and money totals.
money
Package money represents exact monetary values with an explicit currency.
Package money represents exact monetary values with an explicit currency.
platform/config
Package config validates the settings used by the Julius process.
Package config validates the settings used by the Julius process.
platform/db
Package db owns database setup, dialect adaptation, and schema migrations.
Package db owns database setup, dialect adaptation, and schema migrations.
platform/db/dbtest
Package dbtest creates isolated databases for store and migration tests.
Package dbtest creates isolated databases for store and migration tests.
platform/frontend
Package frontend serves Julius's embedded browser application.
Package frontend serves Julius's embedded browser application.
platform/httpx
Package httpx contains the foundation HTTP server.
Package httpx contains the foundation HTTP server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL