> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangrovesystems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Module 6 Exercise: Prepare for Production Deployment

> Optimize your Mangrove Biochar project, create operator documentation, define monitoring requirements, and complete the production readiness quality checklist.

<Panel>
  <Card title="Accounting Academy" className="accounting-academy-card">
    <div className="accounting-academy-content">
      <Steps className="my-0">
        <Step title="MODULE 1: Fundamentals" icon="bookmark" iconType="solid" stepNumber={1} titleSize="p">
          * [1.1: Core Concepts & the Data Lifecycle](/accounting-academy/module-1/1-1-core-concepts-data-lifecycle)
          * [1.2: Translating Methodologies to Mangrove](/accounting-academy/module-1/1-2-translating-methodologies-to-mangrove)
          * [1.3: Events and Datapoints](/accounting-academy/module-1/1-3-events-and-datapoints)
          * [Exercise: Design and Build](/accounting-academy/module-1/1-exercise-design-and-build)
        </Step>

        <Step title="MODULE 2: Calculations" icon="bookmark" iconType="solid" stepNumber={2} titleSize="p">
          * [2.1: Calculation Architecture](/accounting-academy/module-2/2-1-calculation-architecture)
          * [2.2: Expanding Your Data Model](/accounting-academy/module-2/2-2-expanding-your-data-model)
          * [Exercise: Multi-Step Calculations](/accounting-academy/module-2/2-exercise-multi-step-calculations)
        </Step>

        <Step title="MODULE 3: Batch Partitioning & LCA" icon="bookmark" iconType="solid" stepNumber={3} titleSize="p">
          * [3.1: What Is a Batch?](/accounting-academy/module-3/3-1-what-is-a-batch)
          * [3.2: Batch Partitioning Strategies](/accounting-academy/module-3/3-2-batch-partitioning)
          * [3.3: Life Cycle Assessment & Emissions](/accounting-academy/module-3/3-3-lca-and-emissions)
          * [3.4: Allocating Emissions to Batches](/accounting-academy/module-3/3-4-allocating-emissions-to-batches)
          * [Exercise: Batch Partitioning & LCA](/accounting-academy/module-3/3-exercise-batch-partitioning-and-lca)
        </Step>

        <Step title="MODULE 4: Mass Balance with Ledgers" icon="bookmark" iconType="solid" stepNumber={4} titleSize="p">
          * [4.1: Introduction to Mass Balance](/accounting-academy/module-4/4-1-intro-to-mass-balance)
          * [4.2: Designing the Ledger Structure](/accounting-academy/module-4/4-2-designing-the-ledger-structure)
          * [4.3: Multiple Batch Types for Different Stages](/accounting-academy/module-4/4-3-multiple-batch-types)
          * [Exercise: Design & Build Mass Balance](/accounting-academy/module-4/4-exercise-design-and-build-mass-balance)
        </Step>

        <Step title="MODULE 5: Integration Testing" icon="bookmark" iconType="solid" stepNumber={5} titleSize="p">
          * [5.1: The Complete Model Assembly](/accounting-academy/module-5/5-1-the-complete-model-assembly)
          * [5.2: Testing Patterns](/accounting-academy/module-5/5-2-testing-patterns)
          * [5.3: Common Integration Pitfalls](/accounting-academy/module-5/5-3-common-integration-pitfalls)
          * [Exercise: Integration Testing](/accounting-academy/module-5/5-exercise-integration-testing)
        </Step>

        <Step title="MODULE 6: Advanced Patterns & Production" icon="bookmark" iconType="solid" stepNumber={6} titleSize="p">
          * [6.1: Model Design Best Practices](/accounting-academy/module-6/6-1-model-design-best-practices)
          * [6.2: Advanced Techniques](/accounting-academy/module-6/6-2-advanced-techniques)
          * [6.3: Production Readiness](/accounting-academy/module-6/6-3-production-readiness)
          * [Exercise: Production Deployment](/accounting-academy/module-6/6-exercise-production-deployment)
        </Step>
      </Steps>
    </div>
  </Card>
</Panel>

<Check>
  **What you'll build in this exercise:**

  * Complete an optimization pass on your model and configuration
  * Add descriptions to all event types, datapoints, and model nodes
  * Create an operator documentation outline
  * Pass the full production readiness quality checklist
</Check>

This is the capstone exercise. You'll take the Mangrove Biochar project you've built across all modules and prepare it for real-world use. The goal isn't to add new features — it's to make what you've built **robust, documented, and operable** by someone other than you.

```mermaid theme={null}
flowchart LR
    OPTIMIZE["1. Optimize"] --> DOCUMENT["2. Document"]
    DOCUMENT --> MONITOR["3. Monitor"]
    MONITOR --> CHECKLIST["4. Quality<br/>Checklist"]
    CHECKLIST --> READY["Production<br/>Ready ✓"]

    style OPTIMIZE fill:#42a5f5,stroke:#1976d2,stroke-width:2px,color:#000
    style DOCUMENT fill:#66bb6a,stroke:#388e3c,stroke-width:2px,color:#000
    style MONITOR fill:#ffa726,stroke:#f57c00,stroke-width:2px,color:#000
    style CHECKLIST fill:#ab47bc,stroke:#7b1fa2,stroke-width:2px,color:#000
    style READY fill:#ef5350,stroke:#c62828,stroke-width:2px,color:#000
```

**Prerequisites:** Complete all lessons in Module 6 ([Lesson 6.1](/accounting-academy/module-6/6-1-model-design-best-practices), [Lesson 6.2](/accounting-academy/module-6/6-2-advanced-techniques), [Lesson 6.3](/accounting-academy/module-6/6-3-production-readiness)). Your Mangrove Biochar project should have passed all Module 5 integration tests.

***

## Part 1: Design (30 min)

### 1. Review and optimize

Walk through your model and configuration with the four design principles in mind:

<Steps>
  <Step title="Least Complexity">
    Are there any redundant calculations? Can any steps be simplified without losing methodology compliance? Are there model nodes that don't correspond to a methodology requirement?
  </Step>

  <Step title="Explicit Over Implicit">
    Are all unit conversions visible as separate nodes? Are there complex Keisan expressions that should be broken into simpler steps? Can a new team member understand each node's purpose from its name?
  </Step>

  <Step title="Audit Trail">
    Can you trace every batch output back to source events and evidence? Are there any "orphan" calculations that don't connect to the output?
  </Step>

  <Step title="DRY">
    Are any emission factors hardcoded as constants instead of static inputs? Are there duplicate calculations across different parts of the model?
  </Step>
</Steps>

### 2. Plan documentation

Outline the documentation you'll create:

| Document                 | Audience                   | Key Contents                                                         |
| ------------------------ | -------------------------- | -------------------------------------------------------------------- |
| In-platform descriptions | Anyone opening the project | Event type purposes, datapoint units/ranges, model node calculations |
| Data collection guide    | Field operators            | What data to collect, how to enter it, evidence requirements         |
| Operations runbook       | Accounting team            | Batch generation cadence, validation troubleshooting, ledger review  |

### 3. Define monitoring requirements

| Metric            | Threshold     | Action                                                       |
| ----------------- | ------------- | ------------------------------------------------------------ |
| Events per month  | \< 15 or > 30 | Check with operations — data may be missing or duplicated    |
| Batch net carbon  | \< 0 tCO2e    | Review — emissions may exceed gross carbon for small batches |
| Ledger balance    | Negative      | Investigate immediately — mass balance violation             |
| Validation errors | > 0           | Resolve before submitting batches                            |

***

## Part 2: Build in Mangrove (1.5 hrs)

### Step 1: Optimization pass

1. Open the <a href="/production-accounting/models" target="_blank" rel="noopener noreferrer">Model Editor</a>

   and review every node:

   * Remove any nodes that don't feed into an output
   * Consolidate redundant intermediate calculations
   * Replace any hardcoded constants with static input references
   * Ensure all node names are descriptive
2. Run the model Console with your test data and verify outputs haven't changed after optimization.

<Warning>
  After any optimization, **re-run your Module 5 test cases** to verify that outputs match. Optimization should not change results — only simplify the model structure.
</Warning>

### Step 2: Add in-platform documentation

Add descriptions to every configurable element:

**Event types** (in Data Inputs > Input Settings):

| Event Type         | Description to Add                                                                                                                |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| Feedstock Receipt  | "Records raw feedstock arriving at the facility. Source: weighbridge system. Required for mass balance tracking."                 |
| Lab Analysis       | "Records laboratory test results for biochar quality. Source: certified lab reports. Required for permanence factor calculation." |
| Biochar Delivery   | "Records biochar delivered to application sites. Source: delivery tickets and weighbridge slips. Primary production unit."        |
| Energy Consumption | "Monthly energy usage for LCA calculations. Source: utility bills and supplier invoices. Allocated proportionally to batches."    |
| Transportation     | "Per-delivery transport data for LCA. Source: driver logs and GPS records. Allocated directly to the associated delivery batch."  |

**Datapoints** — for each datapoint, add:

* **Unit** (e.g., "tonnes", "kWh", "km")
* **Expected range** (e.g., "Typically 5-20 t. Values > 50 t should be verified.")
* **Source** (e.g., "Weighbridge reading")

**Model nodes** — for each calculated node, add:

* The **methodology equation** it implements (e.g., "Equation 3.2 from Isometric Biochar Protocol v2.1")
* The **unit** of the output (e.g., "tCO2e")

### Step 3: Create operator documentation outline

Create a brief document (in a spreadsheet, FigJam, or text file) covering:

<Tabs>
  <Tab title="Data Collection Guide">
    **For field operators and data entry staff:**

    1. **Feedstock Receipt**: Record when feedstock arrives. Required fields: wet mass, moisture %, feedstock type. Attach weighbridge slip as evidence.
    2. **Lab Analysis**: Record when lab results are received. Required: carbon %, H:C ratio. Attach lab certificate.
    3. **Biochar Delivery**: Record each delivery. Required: mass, carbon %. Attach delivery ticket and application record.
    4. **Energy Consumption**: Record monthly. Required: electricity (kWh), propane (gallons). Attach utility bills.
    5. **Transportation**: Record per delivery. Required: distance (km). Attach trip log or GPS record.
  </Tab>

  <Tab title="Operations Runbook">
    **For the accounting team:**

    1. **Generate batches** at the end of each month for the previous month's accounting period.
    2. **Resolve validation errors** — most common: missing events, date range mismatches.
    3. **Review batch outputs** — compare against expected ranges. Flag any batch with net carbon \< 0.
    4. **Check ledger balances** — all should be non-negative. Investigate immediately if negative.
    5. **Generate reports** when ready for <a href="/reporting/fundamentals" target="_blank" rel="noopener noreferrer">verification submission</a>

       .
  </Tab>
</Tabs>

### Step 4: Quality checklist

Walk through the complete production readiness checklist:

**Configuration:**

* All 5 event types configured with correct datapoints and value types
* All static inputs (emission factors, constants) populated with current values
* Model validated — all nodes produce correct outputs in Console
* Batch type configured with per-delivery partitioning
* Ledgers configured with correct units and allocation rules

**Testing:**

* Module 5 happy path tests still pass after optimization
* Edge cases (high moisture, high H:C, small delivery) handled correctly
* Batch generation completes in \< 5 minutes for a typical month
* All ledger balances reconcile — no negative balances

**Documentation:**

* All event type descriptions written
* All datapoint descriptions include unit, range, and source
* All model node descriptions reference methodology equations
* Data collection guide outline created
* Operations runbook outline created

**Operational readiness:**

* Monitoring thresholds defined for events, batch outputs, ledger balances
* Monthly batch generation cadence established
* Escalation path defined (operator → accounting → implementation team)
* Test data cleaned up (or clearly labeled as test data)

***

## Success criteria

You have completed the Module 6 exercise and the full Accounting U course when:

* **Optimization complete** — no redundant nodes, all constants moved to static inputs, all node names are descriptive
* **Results unchanged** — post-optimization outputs match pre-optimization test results
* **In-platform documentation** — every event type, datapoint, and model node has a clear description
* **Operator guides** — data collection guide and operations runbook outlines created
* **Monitoring defined** — thresholds for events, batch outputs, ledger balances, and validation errors
* **Quality checklist passed** — all items checked across configuration, testing, documentation, and operations

***

## Congratulations!

You've completed the full Accounting U curriculum. Your Mangrove Biochar project now has:

* **5 event types** capturing operational data from feedstock receipt through delivery
* **Multi-step production models** calculating gross and net carbon removal
* **Per-delivery batch partitioning** with LCA emissions allocated to each batch
* **Mass balance tracking** across multiple ledgers
* **Comprehensive testing** with documented test cases and expected outputs
* **Production-ready documentation** and monitoring

You're equipped to configure and deploy production accounting projects in Mangrove. For questions or support, reach out on **Slack #team-implementation**.

Return to the [Course Overview](/accounting-academy/overview) to review the full curriculum.
