Lurker News
I'm about to leave my job for another and i'm tasked with documenting the existing architecture and flow of the app.

I'd also have to document why certain decisions were taken. I'm looking for any openly available similar documents for guidance mostly around how to structure the document.

Comments (49) 31 threads

Earlier comments
lllr_finger#
ADRs are great, and don't need to be overly formal or use tooling. We've been hand-writing Markdown-based ADRs (https://github.com/adr/madr) checked in with our code in a docs/adr directory.

You don't put every little decision in of course, but most projects have at least 1-2 areas where even the people involved with the decision have a hard time recollecting all the context for the decision.
The downside, at least for OP, is that they're usually something you capture at the time the decision is made - not when you're leaving a project.

myrloc#
PlantUML is useful for diagramming anything from sequences to system architecture to state machines. It's also widely supported in many modern text editors like emacs and VSCode. PlantUML components for AWS are widely available [1]. You may find RealWorldPlantUML a good place to start looking for examples [2].

[1] https://github.com/milo-minderbinder/AWS-PlantUML [2] https://real-world-plantuml.com/

Geee#
I've used the C4 model to draw an overall system architecture (container level + external systems). https://c4model.com
markmiro#
I think it's worth looking at it like another product that you produce. I like to imagine someone seeing my code for the first time and trying to make sense of it.

Architecture: this is often documented with some kind of diagram. I personally find them to be unhelpful.
Flow: I'm guessing people aren't familiar with your UI. The best way to document would be to record a video, but that might be a little extra. I would make a powerpoint doc with screenshots to show the common flows.
For me, it kinda looks like this:
- Assume expertise in the individual technologies you've used
- If you picked the tech, then write why you did, and link to resources to learn more about it
- Write down which general constraints I placed on myself that might not be common. EX: naming patterns, cyclomatic complexity, using a functional approach, or being more point-free in a language where it's not common, choices around duplicate code
- Make a nested list of the folder structure and describe what each folder is for (even if it feels obvious), and describe how the different parts interact with each other. The questions to answer are: what are the high-level dependencies between dirs? Are there any cyclical dependencies?
- Find the knots (especially complex parts of the codebase) and make sure they're documented properly

Load more comments