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