2.3 KiB
Architecture
Binding stack
Use Python and Django for the application, PostgreSQL for persistent storage, schema migrations from the beginning, Docker Compose for local infrastructure, and pytest for automated tests. Changes require explicit owner approval and a documented architectural decision.
Dependency versions and tooling will be selected in the application-skeleton design. This foundation does not prescribe a database schema or UI framework.
Import boundaries
source document
-> source-specific parsing
-> normalization
-> validation
-> duplicate detection
-> preview
-> explicit commit and persistence
-> categorization and reporting
Bank-account parsers consume CSV; Banco do Brasil/Ourocard card parsers consume TXT. OFX is unsupported. Parsers are pure transformations of supplied input; they do not query or write the database. Normalization maps parser output into a common candidate representation without committing transactions.
Validation reports issues for review. Duplicate detection compares candidates with the relevant import and persisted records through a separate boundary. Preview displays candidates and issues without committing financial records. Persistence owns database writes, migrations, and commit integrity. Parser grammars, candidate contracts, duplicate rules, and transaction boundaries are specified and tested when the import subsystem is designed.
Data and accountability
Preserve import provenance. Imports and material data changes record actor, source, timestamp, and outcome so human, application, and automated activity can be distinguished. Keep sensitive audit details in local storage governed by the data policy.
Use separate least-privilege database accounts for development and application processes. Credentials belong in local environment configuration, never in tracked source. The skeleton design must define role provisioning and migration permissions. Schema changes must use migrations, not manual database drift.
Delivery boundaries
The financial domain model, UI, importer grammar, duplicate algorithm, deployment model, and backup implementation each require design before substantial work. Follow the roadmap for sequencing and product scope for acceptance boundaries.