# roborto Accounting — Project Overview ## Purpose and users roborto accounting is a local bookkeeping and accounting application for the roborto sole-trader software-development business. Trading has not begun; the official commencement date is configurable and initially unset. v1 starts clean. Existing ODS files are archive/reference material and are not migrated. ## Workflows and scope The approved v1 covers business settings, a customisable chart of accounts, double-entry journals, clients, suppliers, lightweight projects/jobs, expenses, capital/drawings, transfers, quotations, invoices/payments, credit notes/write-offs, supplier bills/payments/refunds, billable time, rechargeable expenses, recurring definitions, assets, VAT-ready and foreign-currency transactions, reconciliation, period controls, attachments, audit history, backups, integrity checks, reports, CSV/ODS exports, and generated invoice/quotation/report/business-letter PDF documents. It is bookkeeping and tax-preparation support, not tax filing, Revenue submission, authoritative tax advice, payroll, inventory, project management, email delivery, or online banking. Purchase orders and separate estimates are excluded. ## Architecture and data flow SQLite is authoritative. A reusable accounting/domain core is persisted through a database layer, exposed through application services, and consumed by the CLI and report/export components. Supporting documents use managed filesystem storage with SQLite metadata/references. Future Flask API and React frontend work may consume the same services, rules, and persistence layer; neither is v1 functionality. Boundaries are: domain logic; persistence; application services; CLI; reporting/ exports/documents; and supporting-document storage. Accounting logic must not live primarily in CLI commands, and formatted documents must not calculate authoritative values. ## Technology and accounting model Use Python, SQLite, SQLAlchemy, Alembic, and `Decimal`; never binary floating point for money. SQLite stores signed integer micro-units (10^-6) behind a centralized SQLAlchemy type. EUR is the base currency. Foreign transactions preserve original amount, currency, applied rate, and EUR value. VAT fields exist from the beginning but VAT is configurable. Classification and tax treatment are separate; uncertain treatment is `REVIEW`. Every posted journal balances. Issued documents preserve client/rate/line snapshots; annual numbers (`INV-YYYY-NNN`, `Q-YYYY-NNN`, and `CN-YYYY-NNN`) are never reused. Pre-trading dates remain actual and distinguishable. Cash flow uses payment dates while incurred dates remain available for accrual views. Closed periods reject ordinary edits; normal operations do not permanently delete history. ## CLI, persistence, and reporting The CLI supports interactive and reliable non-interactive use through shared services; missing required non-interactive values fail clearly. Alembic owns schema evolution; development must not recreate databases to change schema. Reports include ledgers, trial balance, P&L, Cash Flow, receivables/payables, assets, profitability, and tax preparation/review views over arbitrary date ranges. CSV/ODS/PDF are outputs; SQLite remains authoritative. Printable output uses the approved shared light-mode Roborto A4 family in `docs/design/DOCUMENT_DESIGN.md`, with the invoice reference canonical. Users send generated documents manually. Business letters use a narrow persisted draft/finalize workflow with recipient and content snapshots, explicit PDF finalization, and managed archive metadata; the application does not send or automate correspondence. Default runtime data is location-independent from the source checkout and follows XDG user directories: configuration in `~/.config/roborto-accounting`, authoritative data, documents, and backups in `~/.local/share/roborto-accounting`, and state in `~/.local/state/roborto-accounting`. An optional env file belongs at `~/.config/roborto-accounting/env`, never in the repository. ## Repository structure - `src/roborto_accounting/`: package and separated layers - `tests/`: isolated automated tests - `src/roborto_accounting/migrations/`: packaged Alembic migrations - `src/roborto_accounting/assets/branding/`: packaged document-branding resources - `docs/`: maintained context - `AGENTS.md`: working instructions ## Permanent constraints No silent destruction/history rewriting, number reuse, casual closed-period edits, guessed tax treatment, ambiguous automatic bank matching, automatic recurring transaction creation/issuance, secrets in settings/docs, or v1 web/authentication/ cloud/Revenue/email integrations.