Skip to content

Configuration & Environment

Kryptofolio is configured primarily via environment files (.env for development, .env.production for production). Because it is a local-first application, configuration controls file system locations, analytical parameters, and security policies.


Variable Type Default Description
PORT number 3001 The HTTP port where the Hono backend server listens.
KRYPTOFOLIO_DATA_DIR string Workspace Root Base directory holding every database file. When set, relative paths anchor to this folder.
LEDGER_DB_PATH string kryptofolio_ledger.db Path to the SQLite transactional ledger containing spot/futures transactions and audit logs.
VAULT_DB_PATH string kryptofolio.db Path to the encrypted SQLite database storing AES-256-GCM API credentials.
DUCKDB_PATH string fiscal.duckdb Path to the DuckDB OLAP database used for vectorized tax and risk calculations.
DUCKDB_POOL_SIZE number 4 Number of pooled read-side DuckDB connections over the single instance.
PARQUET_DATA_PATH string data/historical/prices Directory path containing Hive-partitioned .parquet historical price time-series.
MOCK_MODE boolean false When true, DuckDB and SQLite run :memory:, ignoring disk files for fast testing.
KRYPTO_MASTER_KEY string undefined Optional 32-byte Base64 key for headless/Docker deployments where OS keyring is unavailable.

Variable Type Default Description
VITE_API_URL string http://localhost:3001 Base URL used by the Hono RPC client (BffClient.ts).
VITE_APP_LANG string en Initial interface language. Supported values: en, es.

Kryptofolio features a zero-dependency, environment-driven dictionary system located in apps/frontend/src/i18n/.

Change VITE_APP_LANG in your .env file and restart the development server:

Terminal window
VITE_APP_LANG=es # Spanish
# or
VITE_APP_LANG=en # English
  1. Create a new dictionary file apps/frontend/src/i18n/dictionaries/de.ts.
  2. Implement the I18nDictionary interface by translating keys from en.ts.
  3. Register the new dictionary in apps/frontend/src/core/infrastructure/i18n/EnvI18nAdapter.ts:
    import { en } from '@/i18n/dictionaries/en';
    import { es } from '@/i18n/dictionaries/es';
    import { de } from '@/i18n/dictionaries/de';
    const dictionaries: Record<string, I18nDictionary> = { en, es, de };
  4. Set VITE_APP_LANG=de in apps/frontend/.env.

When running with default settings, the database files are structured as follows:

kryptofolio/
β”œβ”€β”€ kryptofolio_ledger.db # Primary SQLite OLTP ledger (Transactions, Accounts)
β”œβ”€β”€ kryptofolio_ledger.db-wal # SQLite Write-Ahead Log
β”œβ”€β”€ kryptofolio.db # Encrypted API credentials vault
β”œβ”€β”€ fiscal.duckdb # DuckDB OLAP database (Materialized FIFO chain)
β”œβ”€β”€ fiscal.duckdb.wal # DuckDB WAL file
└── data/
└── historical/
└── prices/ # Hive-partitioned Parquet time-series
β”œβ”€β”€ year=2024/
β”œβ”€β”€ year=2025/
└── year=2026/
└── month=01/
└── btc_eur.parquet