Skip to content

Instantly share code, notes, and snippets.

@ynwd
Last active December 20, 2023 09:54
Show Gist options
  • Save ynwd/2e9c81472cc4eb93fa5dbc23d31b48d1 to your computer and use it in GitHub Desktop.
Save ynwd/2e9c81472cc4eb93fa5dbc23d31b48d1 to your computer and use it in GitHub Desktop.
Technical Documentation Template

Technical Documentation Template

First of all, you need to understand you are not writing documentation for you, nor for your current team. You are writing documentation for the future developers that were not there when you first wrote this code. Worst of it, they might think it is bad code for many reasons and won’t understand why you wrote this way.

Taken from: How to write good software technical documentation

Table of contents

Code documentation

You can put this information in the readme.md file

  • how to install
  • how to run
  • logic flow
  • entry point
  • env variable
  • error handling
  • code convention

Functions header comments

Add a description of your function and examples of use in the header comments.

Example:

/**
 * Create a HTTP server
 *
 *     import { serve } from "https://deno.land/std/http/server.ts";
 *     const body = "Hello World\n";
 *     const server = serve({ port: 8000 });
 *     for await (const req of server) {
 *       req.respond({ body });
 *     }
 */
export function serve(addr: string | HTTPOptions): Server {
  if (typeof addr === "string") {
    addr = _parseAddrFromStr(addr);
  }

  const listener = Deno.listen(addr);
  return new Server(listener);
}

Product documentation

  • bussiness requirement
  • use cases diagram

Software Architecture Schemas

  • Logical architecture

    logical architecture

  • Physical Architecture

    physical architercture

Database schemas

  • relation of tables and databases

    database

Sequence diagram

  • Diagram that describe logic and flow for every step

    Sequence diagram

Technical decision log

  • Why choose some libraries or modules
  • Tell any technical changes

You can put those information in the release
Example: https://github.com/denoland/deno/releases

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