diff --git a/README.md b/README.md
index 884ecd9..e7b45da 100644
--- a/README.md
+++ b/README.md
@@ -232,6 +232,15 @@ An example for such custom (de)serialization can be found in the file
Checkout the test cases for further examples. Relevant files are in
the directories `lib/tests` and `generator/tests`.
+## Architecture
+The following diagram gives an overview about the architecture of the code generator and wrapper library
+around RapidJSON:
+
+![Architectue overview](/doc/arch.svg)
+
+* blue: classes from LibTooling/Clang
+* grey: conceivable extension or use
+
## Install instructions
### Dependencies
diff --git a/doc/arch.graphml b/doc/arch.graphml
new file mode 100644
index 0000000..efe99e3
--- /dev/null
+++ b/doc/arch.graphml
@@ -0,0 +1,778 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Helper functions
+
+
+
+
+
+
+ in namespace
+JsonReflector
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code generator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CodeFactory
+
+
+
+
+
+
+
+
+ addDeclaration()
+generate()
+
+
+
+
+
+
+
+
+
+
+
+ CodeGenerator
+
+
+
+
+
+
+
+
+ addDeclaration()
+generate()
+
+
+
+
+
+
+
+
+
+
+
+ JsonSerializationCodeGenerator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FooCodeGenerator
+
+
+
+
+
+
+
+ ....
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ clang::tooling::ToolInvocation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FrontendAction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ clang::ASTFrontendAction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Consumer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ clang::ASTConsumer
+
+
+
+
+
+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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generates
+
+
+
+
+
+
+
+
+
+
+
+
+ use
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/arch.svg b/doc/arch.svg
new file mode 100644
index 0000000..e10a7f2
--- /dev/null
+++ b/doc/arch.svg
@@ -0,0 +1,297 @@
+