Skip to content

Instantly share code, notes, and snippets.

@brittanyellich
Last active April 5, 2025 23:15
Show Gist options
  • Save brittanyellich/262d8d94d8b80cfd9ec5dad677d2fef8 to your computer and use it in GitHub Desktop.
Save brittanyellich/262d8d94d8b80cfd9ec5dad677d2fef8 to your computer and use it in GitHub Desktop.
new-codebase-discovery-template

Overview

How to document a new codebase Use this template to document a new codebase.

Business Logic

A place to record any important logic that you come across that is worth documenting.

Landmarks

Refers to the different landmarks of a codebase to help you navigate around. Where are the API methods defined? Where are interactions with the database?

Documentation

Link to any documentation you come across that may help you better understand the codebase. Include documentation on the specific codebase, videos you find (check rewatch!), as well as documentation on the technologies used that you come across, in case it helps you refer back to it in the future. Make some notes or check things off as you go through them to keep track of which you have already reviewed.

Local Development Tips

Instructions on how to get a local environment up and running as well as any tips for testing specific things (ex. testing a specific type of customer which may have a different experience from others).

Potential Improvements

This is a place to track updates to docs as you come across them while learning a new codebase. Track things like where information is missing, where information is duplicated, anything that you think can be updated to be more clear, etc. It may be a good idea to wait until you have a picture of the entire landscape of documentation prior to recommending changes.

Questions

Throw any questions that you think of here. If there is an area that you don't know about and want to explore, add a question to explore it in the future.

Diagrams

Create diagrams of the overall flow as well as entity relationship diagrams of the data as you work through the system. Included are some mermaid diagrams to get started.

  • Repo Link
  • Technologies used
  • Acronyms and Terminology

Business Logic

Landmarks

Documentation

Codebase Documentation

Videos

Technologies Used Documentation

Recent Changes

  • Issues, PRs, etc., of recent changes to the codebase and what they were for

Local Development Tips

  • How to get a development environment setup
  • Important scripts to know
  • Tips to test different scenarios

Potential Improvements

Questions

Diagrams

Data Flow

flowchart LR
id1[(Database)] --> API
Loading

Data

erDiagram 
CUSTOMER ||--o{ ORDER : places 
CUSTOMER { string name string custNumber string sector } 
ORDER ||--|{ LINE-ITEM : contains 
ORDER { int orderNumber string deliveryAddress } 
LINE-ITEM { string productCode int quantity float pricePerUnit }
Loading
@silverqx
Copy link

I want to ask how you generated those SVG diagrams or what SW do you use for that? thx

@brittanyellich
Copy link
Author

@silverqx awesome question, they're mermaid diagrams! Here's a blog post about them. I use an Obsidian plugin to make mine!

@silverqx
Copy link

Thx, I didn't even know something like this is possible. @brittanyellich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment