Describe project architecture and save it into docs/ARCHITECTURE.md #14

Closed
opened 2026-07-09 10:53:17 +00:00 by frx · 1 comment
Owner

The document should contain:

  • patterns used
  • logic placement
  • layers
  • structure
The document should contain: - patterns used - logic placement - layers - structure
hermes was assigned by frx 2026-07-09 10:53:17 +00:00
Collaborator

Issue #14 Resolved — Merged

PR: #15 (merged by @hermes at 2026-07-09T13:16:54Z)
Merge commit: 596e8bb

Root Cause

The project lacked any architectural documentation — the hexagonal (ports & adapters) structure with CQRS-style application layer was only discoverable by reading the code.

Key Changes

Created docs/ARCHITECTURE.md (349 lines) covering all requested aspects:

  • Patterns: Hexagonal architecture, CQRS (Command-Query Responsibility Segregation), Decorator pattern for logging/tracing, Repository Interface Segregation, External Client Abstraction
  • Logic placement: Full mapping table of concerns → directories (entities, handlers, adapters, ports, config, migrations, etc.)
  • Layers: 7 layers documented in detail — Domain, Application, Common Infrastructure, Adapters, Ports, Service (composition root), Entry Points (cmd/)
  • Structure: Complete directory tree with file-level descriptions
  • Data flow: ASCII diagrams for both read path (HTTP request → SQLite) and write path (cron → sravni.ru → batch insert)
  • Key design decisions: Pure-Go SQLite, embedded migrations, templ, CGO_ENABLED=0, OpenTelemetry, single composition root

Verification

  • Build: go build ./... — passes
  • File is well-structured markdown with ASCII diagrams

## Issue #14 Resolved — Merged **PR:** [#15](https://git.loyso.ru/frx/kurious/pulls/15) (merged by @hermes at 2026-07-09T13:16:54Z) **Merge commit:** `596e8bb` ### Root Cause The project lacked any architectural documentation — the hexagonal (ports & adapters) structure with CQRS-style application layer was only discoverable by reading the code. ### Key Changes Created `docs/ARCHITECTURE.md` (349 lines) covering all requested aspects: - **Patterns:** Hexagonal architecture, CQRS (Command-Query Responsibility Segregation), Decorator pattern for logging/tracing, Repository Interface Segregation, External Client Abstraction - **Logic placement:** Full mapping table of concerns → directories (entities, handlers, adapters, ports, config, migrations, etc.) - **Layers:** 7 layers documented in detail — Domain, Application, Common Infrastructure, Adapters, Ports, Service (composition root), Entry Points (`cmd/`) - **Structure:** Complete directory tree with file-level descriptions - **Data flow:** ASCII diagrams for both read path (HTTP request → SQLite) and write path (cron → sravni.ru → batch insert) - **Key design decisions:** Pure-Go SQLite, embedded migrations, templ, CGO_ENABLED=0, OpenTelemetry, single composition root ### Verification - Build: `go build ./...` — passes - File is well-structured markdown with ASCII diagrams --- - Changes: 1 file (+349/-0) - Issue: #14
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: frx/kurious#14
No description provided.