Architecture
This page describes the shape of the system at a level that is safe to publish. It explains what each part is for and how results are checked. It leaves out source code, detailed rules and formulas, search methods, data schemas, endpoints, file paths and security configuration on purpose.
1. Overview
Browser: Search · Detail · Documents · Calculator · Plans · Guide
│ │
▼ ▼
Auction service Transaction service
(listings, documents, uploads) (public real-transaction data)
│ │
▼ ▼
Listing and document stores Transaction store
- The auction and transaction services are kept separate.
- Analysis code reads data read-only. Writes go only through dedicated stores.
2. Front-end modules
| Layer | Responsibility |
|---|---|
| Views | Search, listing detail, document summaries, upload, calculator wizard, saved plans, guide |
| Models | Scenario evaluation, tax and fee estimates, recommended bid |
| Rights engine | The staged rights analysis below. It has no network or storage access of its own. |
| Stores | Plan and favorite storage with validation and versioned keys |
The models and the rights engine are deterministic: the same input always gives the same output. This makes them easy to test and to re-check independently.
3. Rights analysis pipeline
court documents ─▶ 1 Facts ─▶ 2 Judgment ─▶ 3 Small-tenant priority ─▶ Execution cost
│
bid price ─────────────────────▶ 4 Distribution ─▶ 5 Buyer burden
│
6-A Calculator link ◀───────────┘
| Stage | Purpose |
|---|---|
| 1. Facts | Turn registry entries, tenants and claims into one consistent set of facts. Unclear or duplicate rows are flagged, not merged. |
| 2. Judgment | Find the candidates for the base right that the sale extinguishes and assess tenant opposability and priority. Conditional cases stay conditional. |
| 3. Small-tenant priority | Apply the statutory small-tenant priority repayment rules that were in force for the relevant date and region. |
| Execution cost | Estimate the court's execution cost from the listing, or use a figure the user provides. |
| 4. Distribution | Simulate the distribution of the sale proceeds at a given bid price. |
| 5. Buyer burden | Split the result into what the buyer may take over, what the sale clears and what needs checking. |
| 6-A. Calculator link | Use the burden in the bid calculator at each bid price, with the evidence and the open questions. |
Implementation status: stages 1–2 are on the main working branch. Stages 3–5 and 6-A are committed on a development branch and not merged yet; browser-level integration testing of these stages is still in progress. The visual rights panel and the inputs for an expected extra burden and an execution-cost total are planned for stage 6-B.
Design principles
- Separated stages. Each stage has its own versioned contract and tests. Integrating a later stage does not change an approved earlier stage.
- Confirmed, conditional or unknown. Every result says which it is. Conditional results keep their alternatives instead of silently picking one.
- Evidence everywhere. Every derived value points back to the document or registry entry it came from.
- No silent zero. When an amount cannot be determined, the calculator holds the result and says why. It does not continue with zero.
- Ranges are labelled. When the documents only support a range, the screen says that the shown amount is not a confirmed total and that the real burden may differ.
- Open questions are structured. Anything the documents do not settle becomes a follow-up item with its evidence, the missing facts and the documents to check.
4. Bid calculator
- Three scenarios: expected market price, target sale price and target profit.
- Costs included: acquisition tax, registration costs, brokerage, loan interest, early-repayment fee, holding costs, unpaid maintenance fees (user input) and the takeover burden from the rights analysis.
- Taxes: a simplified income tax for one case. Capital-gains tax and comparison taxation are listed as not covered.
- Recommended bid: suggests a bid that meets the user's target.
- Every result is a simulation based on the user's assumptions, not a guarantee.
5. Transaction data
- Public real-transaction records are kept by source and property type. Different sources are not merged blindly.
- Partial periods are never shown as complete.
- Address-to-building matching returns confirmed / candidate / unmatched / conflict states. Candidate groups are shown for reference only and never mixed into confirmed statistics.
6. Documents and uploads
- Registry and building-ledger PDFs are processed locally.
- A PDF is attached to a listing only when its identity checks pass. When the checks fail or are unclear, it is held instead of attached.
- An older or undated document cannot replace a newer result.
7. Data protection and safety
- Original datasets, operating databases, backups and validation caches are read-only during development.
- External collection is opt-in and respects access limits.
- Location data and personal data are not sent to third parties and are not shown in public material.
- Credentials are kept out of version control and out of external backups.
- Backups that leave the local machine are encrypted.
- The portfolio demo runs as a separate copy on synthetic data, without credentials and without outgoing connections.
8. Testing approach
- Coverage: unit and contract tests for every stage, plus regression groups for the UI wiring.
- Test data: mostly synthetic. Some fixtures are de-identified samples derived from real records; they stay in the private repository and are never published. Checks on real cases run only on read-only local copies.
- Mutation testing: deliberate changes to key policies must make the tests fail.
- Independent cross-verification: Codex re-checks each stage that Claude implemented, before it is approved and committed. This is a process for finding and reducing errors. It does not guarantee legal correctness.
- Known failures are reported. The Python suite has known failures and skipped tests (see docs/DEVELOPMENT_METRICS.md).
9. Key terms
The terms below are the English working translations used in this portfolio.
| Term | Note |
|---|---|
| court auction | Compulsory sale run by a Korean district court |
| case number | The court's identifier for a case |
| item number | One sale unit within a case |
| list number | One component (land, building, unit) within a sale unit |
| sale-condition statement | Court document listing occupants and rights that survive the sale |
| status survey report | Court officer's report on occupancy |
| appraisal report | |
| registry certificate | Real-property register extract |
| building ledger | Building register |
| appraised value / minimum sale price | |
| failed sale round | Lowers the minimum sale price for the next round |
| base right for extinguishment | Rights registered after it are generally extinguished by the sale |
| opposability | A tenant's right to assert the lease against the buyer |
| small-tenant priority repayment | Statutory priority for small deposits |
| distribution / deadline for distribution claims | |
| takeover (by the buyer) / extinguishment | |
| execution cost | Court costs paid first from the proceeds |
| collateral mortgage / provisional attachment / commencement of auction |