Skip to content

Introduce Architectural Decision Records (ADR) - #35

Merged
kristinaxm merged 1 commit into
mainfrom
feature/16-introduce-adr-structure
Feb 11, 2026
Merged

Introduce Architectural Decision Records (ADR)#35
kristinaxm merged 1 commit into
mainfrom
feature/16-introduce-adr-structure

Conversation

@annikaholmqvist94

@annikaholmqvist94 annikaholmqvist94 commented Feb 11, 2026

Copy link
Copy Markdown

Changes

Closes #16

What's Added

ADR directory structure in /docs/adr/
README explaining ADR process for the team
TEMPLATE for writing future ADRs
ADR-001 documenting static file serving architecture

Why This Matters

ADRs help document architectural decisions so:

  • Future team members understand the "why" behind choices
  • Design discussions are preserved
  • We avoid repeating past debates

Review Focus

  1. ADR format - Does it work for our team?
  2. ADR-001 content - Is the static file architecture clear?
  3. Process - Any improvements to the ADR workflow?

Size

Small PR: 3 markdown files

Next Steps

After this merges, a follow-up PR will add the actual implementation
of the static file handler documented in ADR-001.

Summary by CodeRabbit

  • Documentation
    • Established Architectural Decision Records (ADRs) framework for documenting design choices.
    • Added first ADR detailing static file serving architecture, covering design decisions, security considerations, error handling, and MIME type resolution.
    • Provided ADR template and guidelines for future architectural documentation.

… ADR process for the team

                                     - Add TEMPLATE for writing future ADRs
                                      - Add ADR-001 documenting static file serving architecture

                                      Closes #16
@annikaholmqvist94 annikaholmqvist94 added the documentation Improvements or additions to documentation label Feb 11, 2026
@coderabbitai

coderabbitai Bot commented Feb 11, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This pull request establishes an Architectural Decision Records (ADR) system for the JavaHttpServer project. It introduces ADR infrastructure (README and template) and documents the first architectural decision regarding static file serving architecture, including security model, MIME type handling, and implementation phases.

Changes

Cohort / File(s) Summary
ADR Infrastructure
docs/adr/README.md, docs/adr/TEMPLATE.md
Establishes ADR system with guidelines, format requirements, workflow, naming conventions, and status definitions for documenting architectural decisions.
Static File Serving Architecture
docs/adr/ADR-001-static-file-serving-architecture.md
First ADR documenting SpringBoot-style static file serving design including core components, security model (path normalization, whitelist validation, directory traversal protection), MIME type handling, error scenarios, implementation phases, and integration points.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hop, hop, hooray! Decisions now clear,
With ADRs written, no more fear,
Architecture documented, layer by layer,
The path forward, bold and fair,
Static files serve with grace divine,
This blueprint's truly fine! 🏗️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and concisely describes the main change: introducing Architectural Decision Records (ADR) to the repository.
Linked Issues check ✅ Passed The PR fully implements all coding-related requirements from issue #16: creates /docs/adr/ directory, provides README explaining ADR process, includes TEMPLATE following standard format, and documents the static file serving architecture as ADR-001.
Out of Scope Changes check ✅ Passed All changes are in scope; the PR introduces only documentation files (README, TEMPLATE, and ADR-001) directly supporting the ADR process objectives outlined in issue #16.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/16-introduce-adr-structure

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@docs/adr/ADR-001-static-file-serving-architecture.md`:
- Around line 236-240: In the "## References" section of
ADR-001-static-file-serving-architecture.md replace the placeholder repository
URL in the link text "Issue `#18`: GET handling for static files" (currently
pointing to https://github.com/your-repo/issues/18) with the actual repository
URL for this project so the issue link resolves correctly; update only that href
to the real repo path while keeping the link text unchanged.
- Around line 3-6: The ADR file ADR-001-static-file-serving-architecture.md
currently sets **Status:** Proposed which conflicts with the ADR index listing
it as Accepted; update the Status line in
ADR-001-static-file-serving-architecture.md from "Proposed" to "Accepted"
(update the Status header text) so the document state matches the ADR index.

In `@docs/adr/README.md`:
- Around line 45-49: The ADR index in README.md lists ADR-001 as "Accepted" but
the ADR file ADR-001-static-file-serving-architecture.md is marked "Proposed";
update one of them so both match (prefer changing the README table row for
ADR-001 to "Proposed" or update the ADR file to "Accepted"), ensuring the
Title/ADR link [001] and status column in the table are consistent with the
status header inside ADR-001-static-file-serving-architecture.md.
🧹 Nitpick comments (1)
docs/adr/ADR-001-static-file-serving-architecture.md (1)

45-56: Add language identifiers to fenced code blocks.

This avoids markdownlint MD040 warnings and improves readability.

Proposed diff
-```
+```text
 src/main/resources/
 └── static/
     ├── index.html
@@
-```
+```text
 StaticFileHandler
 ├── Validates request path (security)
@@
-```java
+```java
 // In connection handler:
 if (request.method().equals("GET")) {
     HttpResponse response = StaticFileHandler.handleRequest(request);
     HttpResponseWriter.write(outputStream, response);
 }
-```
+```
@@
-```
+```text
 src/main/resources/static/
 ├── index.html          (served at GET /)
@@
-```
+```

Also applies to: 65-78, 214-220, 224-232

Comment thread docs/adr/ADR-001-static-file-serving-architecture.md
Comment thread docs/adr/ADR-001-static-file-serving-architecture.md
Comment thread docs/adr/README.md

@LinusWestling LinusWestling left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! Lets ask coderabbit to piss off on those nitpick comments ;)

@TatjanaTrajkovic
TatjanaTrajkovic self-requested a review February 11, 2026 11:25

@TatjanaTrajkovic TatjanaTrajkovic left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@HerrKanin HerrKanin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@kristinaxm
kristinaxm merged commit 410ff28 into main Feb 11, 2026
2 checks passed
@kristinaxm
kristinaxm deleted the feature/16-introduce-adr-structure branch February 18, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce Architectural Decision Records (ADR)

6 participants