Skip to content

ERP Documentation Templates

These are the canonical templates used to build every ERP page. They are the same files the scaffolder reads, so what you download here is exactly what the generator produces.

Two ways to use them

1. Generator (recommended) — creates the whole folder tree in one command:

bash
npm run new:erp -- <Module> "<Entity>"            # transactional entity (8 ops)
npm run new:erp -- <Module> "<Entity>" --master   # master-data entity (6 ops)

2. By hand — download a template below, replace the and TODOs, and save it as index.md in the right folder.

Token reference

TokenReplaced with
Module name, e.g. Sales
Entity name, e.g. Sales Invoice
Operation name, e.g. Add
Operation name, lower-case, e.g. add
Auto-built table of a module's entities
Auto-built table of an entity's operations

Operation page — Business / Backend / Frontend tabs

Used for add, edit, view, delete, post, unpost, print. Three tabbed perspectives plus a User Stories section.

⬇ Download operation-page.template.md   ·   See it rendered →

Preview source
md
---
title: {{ENTITY}} — {{OP}}
---

# {{ENTITY}} — {{OP}}

Documentation for the **{{OP}}** operation of **{{ENTITY}}**, split into
Business, Backend, and Frontend perspectives.

<PageTabs default="Business">

<PageTab label="Business">

## Business Rules

TODO: describe the business purpose, rules, and validations for the {{OP_LOWER}} operation.

![{{ENTITY}} {{OP}} — business flow](/.attachments/REPLACE-ME.png)

| Rule | Description |
| ---- | ----------- |
| TODO | TODO |

</PageTab>

<PageTab label="Backend">

## Backend

TODO: API contract, persistence, and side effects.

```mermaid
sequenceDiagram
  actor U as User
  participant FE as Frontend
  participant BE as ERP Backend
  U->>FE: {{OP}} {{ENTITY}}
  FE->>BE: TODO request
  BE-->>FE: TODO response
```

</PageTab>

<PageTab label="Frontend">

## Frontend

TODO: screens, components, and validation behavior.

![{{ENTITY}} {{OP}} — UI](/.attachments/REPLACE-ME.png)

</PageTab>

</PageTabs>

## User Stories

> Each row links to an Azure DevOps work item **or** an internal page — author's choice.

| ID | Title | Link |
| -- | ----- | ---- |
| US-XXX | TODO | [Open story](#) |

List page — plain (no tabs)

Used for the List operation: documents the grid/index screen (columns, filters, row actions). No Business/Backend/Frontend tabs.

⬇ Download list-page.template.md   ·   See it rendered →

Preview source
md
---
title: {{ENTITY}} — List
---

# {{ENTITY}} — List

Documentation for the **List** view of **{{ENTITY}}** — the grid/index screen
that displays {{ENTITY}} records.

## Overview

TODO: describe the purpose of the {{ENTITY}} list screen and who uses it.

![{{ENTITY}} List — screen](/.attachments/REPLACE-ME.png)

## Columns

| Column | Description |
| ------ | ----------- |
| TODO | TODO |

## Filters & Search

TODO: available filters, search fields, and default sorting.

## Row Actions

TODO: per-row actions (view, edit, delete, print, …) and any permission rules.

## User Stories

> Each row links to an Azure DevOps work item **or** an internal page — author's choice.

| ID | Title | Link |
| -- | ----- | ---- |
| US-XXX | TODO | [Open story](#) |

Entity home page

The landing page for an entity: overview, lifecycle diagram, and a table linking to its operations.

⬇ Download entity-home.template.md   ·   See it rendered →

Preview source
md
---
title: {{ENTITY}}
---

# {{ENTITY}}

Overview of the **{{ENTITY}}** entity in the **{{MODULE}}** module: what it
represents, its lifecycle, and the operations available.

## Lifecycle

```mermaid
flowchart LR
  Draft --> Posted --> Closed
  Draft --> Cancelled
```

## Operations

| Operation | Purpose |
| --------- | ------- |
{{OPS_TABLE}}

## Related

- [{{MODULE}} module overview](../)

Module landing page

The landing page for a module: an auto-built table of its entities. (The generator regenerates this file, so edit entity/operation pages instead.)

⬇ Download module-landing.template.md   ·   See it rendered →

Preview source
md
---
title: {{MODULE}}
---

<!-- AUTO-GENERATED INDEX — regenerated by scripts/new-erp-entity.mjs. Edit entity/operation pages instead. -->

# {{MODULE}} Module

Documentation for the **{{MODULE}}** module. Each entity below links to its
operations (add, edit, view, post, …).

## Entities

| Entity | Description |
| ------ | ----------- |
{{ENTITIES_TABLE}}

Internal Documentation — Microtec