Course 02 follows the Kotlin/Spring backend at /home/friedcutlet/Projects/SWEN3-Paperless/paperless-backend. Learn architecture, domain-driven design, the persistence Anti-Corruption Layer, MapStruct, Kotlin compared with Java, and the consistency rules behind real document operations.
The source baseline is commit 28ef27347fb16e076f24449a78072f480bd443d9, captured on 2026-10-26 from a clean checkout. The bundled reference includes all 135 tracked backend files plus 16 repository guidance/deployment/CI files. Generated outputs, downloaded dependencies, local configuration, and the frontend are excluded. File hashes are recorded in the manifest.
Start with the assessment review
Read the grading alignment and backend review before copying the implementation. The supplied rubric and twelve lecture PDFs reveal unfinished requirements and architectural improvements. The existing 131 tests pass, but five additional checks reproduce lost updates, incorrect HTTP errors, and invalid upload acceptance. The report maps every grading row to evidence and separates the checked-out baseline from newer local queue branches.
How to use the course
Read the explanation, follow the complete selected source listings in the website, then perform the practice exercise in a separate checkout. Every chapter has a verification gate. The source browser and raw downloads contain the full pinned backend, so the website builds without the original repository. Saved chapter progress belongs to this course independently of Yokan.
This is a focused architecture and implementation course. Selected files appear inline at the teaching steps; all remaining tracked backend files are available in the source reference. Exercises and future improvements are labeled separately from the current implementation. Source evidence establishes what is currently implemented; the assessment material and stated API contracts establish expectations to check it against. Existing code is not automatically the correct design.
Learning path
Milestones
- Foundations, 01–03: explain build generation, domain vocabulary, dependency direction, and Kotlin semantics.
- Boundaries, 04–06: trace DTO/domain/entity translations and implement a persistence port without leaking entities.
- Consistency, 07–08: preserve versions, reason about authorization races, and distinguish database rollback from file compensation.
- Use cases, 09–10: follow authentication, team access, and the current in-memory search; design a future external-search adapter.
- Verification, 11–12: collect meaningful test evidence and implement an archive-document vertical slice.
Documentation and evidence
Framework explanations were checked with Context7 on 2026-10-26, with the official MapStruct reference used for the detailed injection options. Consult MapStruct 1.6, Kotlin data classes, Kotlin Java interoperability, and Spring transaction semantics. The repository build pins remain the implementation baseline.
The current code has framework-aware ports, service-centered business logic, local filesystem storage, and in-memory search. It does not establish a fully framework-independent domain, a durable distributed transaction, or an external OCR/search worker. The capstone and proposed ports are learning exercises.
Website checks verify links, source hashes, chapter content, and course navigation. The follow-up review executed 131 existing backend tests and five diagnostic checks; see the exact results and limitations. This does not establish a passing PostgreSQL/Compose/worker deployment.