Skip to content

docs: add architecture guide to developer docs#1624

Merged
marcus-oscarsson merged 4 commits into
mxcube:developfrom
hedi-tej:ht-docs-architecture-review
Jul 8, 2026
Merged

docs: add architecture guide to developer docs#1624
marcus-oscarsson merged 4 commits into
mxcube:developfrom
hedi-tej:ht-docs-architecture-review

Conversation

@hedi-tej

@hedi-tej hedi-tej commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add architecture guide under docs/source/dev/architecture.md
  • add architecture page to docs/source/dev/index.rst
  • keep web-related sections

@hedi-tej
hedi-tej force-pushed the ht-docs-architecture-review branch from 2e01812 to c13c8e5 Compare June 10, 2026 13:29
@mockoocy

Copy link
Copy Markdown
Contributor

Sadly our documentation builder does not compile the mermaid.js code.
image

Maybe you could just provide the compiled diagrams and just reference them?

@marcus-oscarsson

Copy link
Copy Markdown
Member

Thanks alot, a very nice initiative :) !. Could you add the rendered versions of the images, we don't currently have a mermaid plugin.

Comment thread docs/conf.py
Comment on lines +112 to +117
# Allow GitHub-style fenced blocks like ```mermaid to be parsed as
# ``{mermaid}`` directives so diagrams render in Sphinx/RTD.
myst_fence_as_directive = [
"mermaid",
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well found :)

Image

Renders perfectly now.

Comment thread docs/source/dev/architecture.md Outdated

subgraph "Application Layer - mxcubeweb"
UI[React Frontend]
API[FastAPI Backend]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks pretty good in general, this should be Flask though and not FastAPI :) I think there one or two more instances of FastAPI. But it otherwise looks quite correct

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching that. This document was generated last year so maybe those were legacy elements ? Anyway i replaced the fastAPI instances in this doc :)

@marcus-oscarsson
marcus-oscarsson force-pushed the ht-docs-architecture-review branch from b36d3b3 to 320d147 Compare June 16, 2026 11:58
Comment thread docs/source/dev/architecture.md Outdated
subgraph "Application Layer - mxcubeweb"
UI[React Frontend]
API[Flask Backend]
WS[WebSocket Server]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
WS[WebSocket Server]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would simply remove the WS WebSocket Server and perhaps include it in API[Flask Backend]. Or make another box around the two.

@marcus-oscarsson

Copy link
Copy Markdown
Member

I went through this again and it does for the most part look correct and I think it can be really useful to get an over view of the project. But it should be taken with a pinch of salt its not really accurate but correct on a conceptual level.

I had one more remark on the graph, and it would be great if you could run the mdformat step of the pre-commit step. Then we can merge :)

@mockoocy

Copy link
Copy Markdown
Contributor

Maybe we could add some remark that the diagrams have been generated based on the existing codebase and written with assist of a coding agent.

Just so that it does not seem authorative, it could help us avoid some potential confusion in the future in case someone were to look at an outdated by then diagram :)

@marcus-oscarsson

Copy link
Copy Markdown
Member

Yes we can add such a comment. But all documentation we add should be revived and accurate for whatever purpose it has. So adding a sort of disclaimer at the same time seems a bit contradictory, but I can understand that it helps.

In that case, perhaps write something like: This documentation was partly generated automatically and is meant to give an architectural overview and idea of the concepts involved and may lack or be some detail.

@mockoocy

Copy link
Copy Markdown
Contributor

In that case, perhaps write something like: This documentation was partly generated automatically and is meant to give an architectural overview and idea of the concepts involved and may lack or be some detail.

Yes, that's more akin to something I had in mind. I've just overemphasized the part regarding outdateness, which is quite hard to avoid :)

@marcus-oscarsson

Copy link
Copy Markdown
Member

@hedi-tej: We are ready to merge this one if you just look at the linting error, I guess its something small ?

@hedi-tej

hedi-tej commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Hello all,

Thank you for your feedback. I just returned from vacation.
This last commit includes the following changes:

  • Combined Flask Backend and WebSocket Server into one box in the diagram
  • Fixed the linting issue
  • Added a disclaimer to clarify the scope of the documentation
    Please let me know if there is anything else that should be addressed.

Best regards,
Hedi

@marcus-oscarsson
marcus-oscarsson force-pushed the ht-docs-architecture-review branch from 9c2c68f to cf55aa9 Compare July 8, 2026 12:46
@marcus-oscarsson

Copy link
Copy Markdown
Member

Well done, thanks. I think it will be quite useful for new developers !

@marcus-oscarsson

Copy link
Copy Markdown
Member

Sorry for taking sometime before merging. Thanks for the nice work !

@marcus-oscarsson
marcus-oscarsson merged commit 4e8fe8c into mxcube:develop Jul 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants