# mulianz/write_your_own_java_framework_exercices architecture

> Architecture diagram of the GitHub repository mulianz/write_your_own_java_framework_exercices, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mulianz/write_your_own_java_framework_exercices
- Repository: https://github.com/mulianz/write_your_own_java_framework_exercices

## Overview

This repository is a collection of small Java-framework exercises, not one integrated application. Its user workflow is to choose a capability, use its API with Java objects or method calls, and get JSON conversion, dependency resolution, interception, or ORM behavior. These are independent domain stages rather than a shared pipeline. The mapper and injector have sampled implementation evidence; the ORM excerpt ends at a TODO, so its documented capability is represented without guessed runtime links. Edges cite only source references visible in the supplied index or excerpts.

Main entry points: [`interceptor/src/main/java/org/github/forax/framework/interceptor/InterceptorRegistry.java`](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/interceptor/src/main/java/org/github/forax/framework/interceptor/InterceptorRegistry.java) (Interceptor registry), [`mapper/src/main/java/com/github/forax/framework/mapper/JSONWriter.java`](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/JSONWriter.java) (JSON writing), [`mapper/src/main/java/com/github/forax/framework/mapper/JSONReader.java`](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/JSONReader.java) (JSON reading), [`injector/src/main/java/com/github/forax/framework/injector/InjectorRegistry.java`](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/injector/src/main/java/com/github/forax/framework/injector/InjectorRegistry.java) (Injector registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mapper["JSON Mapper"]
  node_json_write["JSON writing<br/>[JSONWriter.java]"]
  node_json_property["JSON property names<br/>[JSONProperty.java]"]
  node_json_read["JSON reading<br/>[JSONReader.java]"]
  node_json_parser["JSON parser<br/>[ToyJSONParser.java]"]
end

subgraph group_injector["Dependency Injection"]
  node_inject_registry["Injector registry"]
  node_inject_annotation["Inject annotation<br/>[Inject.java]"]
  node_annotation_scan["Classpath scanning"]
end

subgraph group_interceptor["Method Interception"]
  node_intercept_registry["Interceptor registry"]
  node_interceptor_api["Interceptor<br/>[Interceptor.java]"]
  node_invocation["Invocation chain<br/>[Invocation.java]"]
  node_around_advice["Around advice<br/>[AroundAdvice.java]"]
end

subgraph group_orm["Object Relational Mapping"]
  node_repository["Repository API<br/>[Repository.java]"]
  node_orm_runtime["ORM runtime<br/>[ORM.java]"]
  node_orm_mapping["Mapping annotations<br/>[Table.java]"]
end

node_developer(("Framework user"))

node_json_write -->|"reads names"| node_json_property
node_json_read -->|"parses with"| node_json_parser
node_inject_registry -->|"checks annotation"| node_inject_annotation
node_intercept_registry -->|"registers and dispatches"| node_interceptor_api
node_intercept_registry -->|"builds invocation"| node_invocation
node_intercept_registry -->|"wraps advice"| node_around_advice
node_orm_runtime -->|"resolves repository"| node_repository

click node_json_write "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/JSONWriter.java"
click node_json_property "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/JSONProperty.java"
click node_json_read "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/JSONReader.java"
click node_json_parser "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/ToyJSONParser.java"
click node_inject_registry "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/injector/src/main/java/com/github/forax/framework/injector/InjectorRegistry.java"
click node_inject_annotation "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/injector/src/main/java/com/github/forax/framework/injector/Inject.java"
click node_annotation_scan "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/injector/src/main/java/com/github/forax/framework/injector/AnnotationScanner.java"
click node_intercept_registry "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/interceptor/src/main/java/org/github/forax/framework/interceptor/InterceptorRegistry.java"
click node_interceptor_api "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/interceptor/src/main/java/org/github/forax/framework/interceptor/Interceptor.java"
click node_invocation "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/interceptor/src/main/java/org/github/forax/framework/interceptor/Invocation.java"
click node_around_advice "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/interceptor/src/main/java/org/github/forax/framework/interceptor/AroundAdvice.java"
click node_repository "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/orm/src/main/java/com/github/forax/framework/orm/Repository.java"
click node_orm_runtime "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/orm/src/main/java/com/github/forax/framework/orm/ORM.java"
click node_orm_mapping "https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/orm/src/main/java/com/github/forax/framework/orm/Table.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_json_write,node_json_property,node_json_read,node_json_parser,node_developer toneBlue
class node_inject_registry,node_inject_annotation,node_annotation_scan toneAmber
class node_intercept_registry,node_interceptor_api,node_invocation,node_around_advice toneMint
class node_repository,node_orm_runtime,node_orm_mapping toneRose
```

## Components

### JSON Mapper

- [JSON writing](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/JSONWriter.java): `mapper/src/main/java/com/github/forax/framework/mapper/JSONWriter.java`
- [JSON property names](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/JSONProperty.java): `mapper/src/main/java/com/github/forax/framework/mapper/JSONProperty.java`
- [JSON reading](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/JSONReader.java): `mapper/src/main/java/com/github/forax/framework/mapper/JSONReader.java`
- [JSON parser](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/mapper/src/main/java/com/github/forax/framework/mapper/ToyJSONParser.java): `mapper/src/main/java/com/github/forax/framework/mapper/ToyJSONParser.java`

### Dependency Injection

- [Injector registry](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/injector/src/main/java/com/github/forax/framework/injector/InjectorRegistry.java): `injector/src/main/java/com/github/forax/framework/injector/InjectorRegistry.java`
- [Inject annotation](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/injector/src/main/java/com/github/forax/framework/injector/Inject.java): `injector/src/main/java/com/github/forax/framework/injector/Inject.java`
- [Classpath scanning](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/injector/src/main/java/com/github/forax/framework/injector/AnnotationScanner.java): `injector/src/main/java/com/github/forax/framework/injector/AnnotationScanner.java`

### Method Interception

- [Interceptor registry](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/interceptor/src/main/java/org/github/forax/framework/interceptor/InterceptorRegistry.java): `interceptor/src/main/java/org/github/forax/framework/interceptor/InterceptorRegistry.java`
- [Interceptor](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/interceptor/src/main/java/org/github/forax/framework/interceptor/Interceptor.java): `interceptor/src/main/java/org/github/forax/framework/interceptor/Interceptor.java`
- [Invocation chain](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/interceptor/src/main/java/org/github/forax/framework/interceptor/Invocation.java): `interceptor/src/main/java/org/github/forax/framework/interceptor/Invocation.java`
- [Around advice](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/interceptor/src/main/java/org/github/forax/framework/interceptor/AroundAdvice.java): `interceptor/src/main/java/org/github/forax/framework/interceptor/AroundAdvice.java`

### Object Relational Mapping

- [Repository API](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/orm/src/main/java/com/github/forax/framework/orm/Repository.java): `orm/src/main/java/com/github/forax/framework/orm/Repository.java`
- [ORM runtime](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/orm/src/main/java/com/github/forax/framework/orm/ORM.java): `orm/src/main/java/com/github/forax/framework/orm/ORM.java`
- [Mapping annotations](https://github.com/mulianz/write_your_own_java_framework_exercices/blob/master/orm/src/main/java/com/github/forax/framework/orm/Table.java): `orm/src/main/java/com/github/forax/framework/orm/Table.java`

### Other components

- **Framework user**

## Connections

- JSON writing → JSON property names: reads names (evidence: `mapper/src/main/java/com/github/forax/framework/mapper/JSONWriter.java`)
- JSON reading → JSON parser: parses with (evidence: `mapper/src/main/java/com/github/forax/framework/mapper/JSONReader.java`)
- Injector registry → Inject annotation: checks annotation (evidence: `injector/src/main/java/com/github/forax/framework/injector/InjectorRegistry.java`)
- Interceptor registry → Interceptor: registers and dispatches (evidence: `interceptor/src/main/java/org/github/forax/framework/interceptor/InterceptorRegistry.java`)
- Interceptor registry → Invocation chain: builds invocation (evidence: `interceptor/src/main/java/org/github/forax/framework/interceptor/InterceptorRegistry.java`)
- Interceptor registry → Around advice: wraps advice (evidence: `interceptor/src/main/java/org/github/forax/framework/interceptor/InterceptorRegistry.java`)
- ORM runtime → Repository API: resolves repository (evidence: `orm/src/main/java/com/github/forax/framework/orm/ORM.java`)
