Skip to content

Introduce Architectural Decision Records (ADR)#7

Closed
annikaholmqvist94 wants to merge 11 commits intomainfrom
feature/16-introduce-adr-structure
Closed

Introduce Architectural Decision Records (ADR)#7
annikaholmqvist94 wants to merge 11 commits intomainfrom
feature/16-introduce-adr-structure

Conversation

@annikaholmqvist94
Copy link

@annikaholmqvist94 annikaholmqvist94 commented Feb 11, 2026

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, PR #2 will add the actual implementation
of the static file handler.

Summary by CodeRabbit

Release Notes

  • New Features

    • Functional HTTP server with request parsing and response handling capabilities.
    • Docker containerization support for deployment.
    • GitHub Actions CI/CD pipeline for automated testing and image publishing.
  • Documentation

    • Added architectural decision records documenting design decisions and guidance.
  • Chores

    • Upgraded Java version and enhanced code quality tooling.

fmazmz and others added 11 commits February 6, 2026 08:44
* chore: Update POM to Java 25 and rename artifactId/groupId

* update folder name from example to juv25d

---------

Co-authored-by: WHITEROSE <firasmoussa60@gmail.com>
* http parser

* Bunny fixes. (only using input stream to recieve requests)

* Bunny review improvements

* Improved http parser ReadLine helper method to eliminate dependency on mark() and reset(). Implemented handleClient() using socket as a try-with-resources to avoid memory leakage in case of exception thrown by httpparser-methods.

* NumberFormatException fix on line 53 -> 60

* chore: Update POM to Java 25 and rename artifactId/groupId (#11)

* chore: Update POM to Java 25 and rename artifactId/groupId

* update folder name from example to juv25d

---------

Co-authored-by: WHITEROSE <firasmoussa60@gmail.com>

* resolve conflicts

---------

Co-authored-by: Kristina <kristina0x7@gmail.com>
Co-authored-by: WHITEROSE <firasmoussa60@gmail.com>
* Add ServerLogging.java as separate class for logging. Implement said class in SocketServer.java to return logging information upon opening socket and user connecting to server.

* Update ServerLogging.java to include a static initializer block and an empty utility class to prevent instantiation.

* Update ServerLogging.java to reference same class in getLogger argument.

* Update ServerLogging.java to check if handler has already been instantiated and allow for log level to be set by args in JVM (default level 'INFO' if no args provided).

* normalize logging statements to be consistent

* remove unused imports

* Update SockerServer.java to properly log server socket errors.

---------

Co-authored-by: Mats Rönnqvist <mats.f.ronnqvist@gmail.com>
Co-authored-by: WHITEROSE <firasmoussa60@gmail.com>
* update POM with pitest

* add junit plugin dependency
Rebased 4 commits in this PR.
…#27)

* Fix PiTest by defining argLine and removing invalid Mockito javaagent

* self close argline
… 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
Copy link

coderabbitai bot commented Feb 11, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR establishes a complete Java HTTP server project by introducing build infrastructure (Maven wrapper, Dockerfile, CI/CD pipelines), architectural documentation framework (ADR README, template, and initial static file serving design), and core server components (socket handling, HTTP request parsing, response modeling, and logging utilities).

Changes

Cohort / File(s) Summary
Project Configuration
.editorconfig, .mvn/wrapper/maven-wrapper.properties
EditorConfig formatting standards and Maven wrapper configuration with version 3.3.4 and distribution settings.
Build & Packaging
pom.xml, Dockerfile
Project coordinates updated (org.juv25d/JavaHttpServer), Java 25 toolchain, added spotless and pitest plugins, multi-stage Docker build for Java 21.
Maven Wrapper Scripts
mvnw, mvnw.cmd
Unix/Linux and Windows shell scripts implementing Maven wrapper logic with download, SHA validation, and distribution extraction.
CI/CD Workflows
.github/workflows/ci.yml, .github/workflows/docker-release.yml
GitHub Actions pipeline for testing and code style checks on push/PR; automated multi-architecture Docker image publishing on release events.
Architectural Documentation
docs/adr/README.md, docs/adr/TEMPLATE.md, docs/adr/ADR-001-static-file-serving-architecture.md
ADR framework documentation, standard template, and initial decision record for static file serving architecture with security and MIME type handling.
HTTP Server Core Components
src/main/java/org/juv25d/HttpRequest.java, src/main/java/org/juv25d/http/HttpResponse.java, src/main/java/org/juv25d/http/HttpResponseWriter.java
Immutable HTTP request/response data models with serialization utility for writing HTTP/1.1 formatted responses.
Request Parsing & Server
src/main/java/org/juv25d/parser/HttpParser.java, src/main/java/org/juv25d/SocketServer.java
HTTP request parser extracting method, path, query, headers, and body; socket server accepting connections on port 3000 with virtual thread per client.
Utilities & Entry Point
src/main/java/org/juv25d/App.java, src/main/java/org/juv25d/logging/ServerLogging.java
Application entry point invoking socket server; logging utility with configurable level from system properties/environment variables.
Test Files
src/test/java/org/juv25d/AppIT.java, src/test/java/org/juv25d/AppTest.java, src/test/java/org/juv25d/http/HttpResponseWriterTest.java
Package namespace updates and new tests validating HTTP response serialization (200 OK and 404 Not Found scenarios).

Sequence Diagram

sequenceDiagram
    participant Client
    participant SocketServer
    participant HttpParser
    participant HttpResponseWriter
    participant App

    App->>SocketServer: createSocket()
    SocketServer->>SocketServer: listen on port 3000
    Client->>SocketServer: connect
    SocketServer->>HttpParser: parse(InputStream)
    HttpParser->>HttpParser: readLine() × n
    HttpParser->>HttpParser: extract method, path, version
    HttpParser->>HttpParser: parse headers & body
    HttpParser-->>SocketServer: HttpRequest
    SocketServer->>HttpResponseWriter: write(OutputStream, HttpResponse)
    HttpResponseWriter->>HttpResponseWriter: format status line
    HttpResponseWriter->>HttpResponseWriter: write headers
    HttpResponseWriter->>HttpResponseWriter: write body
    HttpResponseWriter-->>Client: HTTP/1.1 response
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly Related Issues

Poem

🐰 A server springs to life, so grand!
With sockets, parsers, ready-made,
HTTP requests understand,
Through Docker's multi-stage cascade.
ADRs chart the path ahead—
Our Java server's birth is fed! 🚀

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@met4lk1tty met4lk1tty 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.

5 participants