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.
What you’ll build in this exercise:
- Design a Biochar Delivery event type with 3-5 datapoints
- Build the event type and a simple model in Mangrove
- Generate a batch and verify the calculated output
Part 1: Design (30 min)
Before touching the app, design your first event type and dataflow in a spreadsheet or FigJam.1. Identify one key activity
Pick one key activity in the Mangrove Biochar process to model first. We suggest “Biochar Delivery” — the moment biochar is delivered to a field for application. Each delivery is a natural unit of production and a good candidate for an event.2. List the datapoints
For the activity you chose, list the datapoints the event must capture:Measurements
- Biochar mass (tonnes)
- Carbon content (%)
- Delivery date
Identifiers
- Delivery ticket ID
- Tracking ID (optional)
Evidence
- Delivery ticket
- Weighbridge slip
- Application record
3. Sketch the flow: Event → Model → Output
Event
One Biochar Delivery with values for each datapoint (e.g., mass = 10 t, carbon content = 80%).
Model
A calculation that reads those datapoints and produces one output. Formula:
carbon_delivered = mass × (carbon_content / 100) × 3.67(3.67 is the CO2-to-carbon mass ratio.)Part 2: Build in Mangrove (1 hr)
Using your duplicated Mangrove Biochar project, implement the design. The starter project already has the ledger and batch type set up, so you only need to create the event type, build the model, and generate batches.Step 1: Create one event type with 3-5 datapoints
- Open your project and go to Data Inputs > Input Settings.
- Add a new event type (e.g., name: “Biochar Delivery”, slug:
biochar-delivery). - Add 3-5 datapoint types:
| Datapoint | Value Type |
|---|---|
| Delivery date | date/datetime |
| Biochar mass (tonnes) | number |
| Carbon content (%) | number |
| Delivery ticket ID | text |
Step 2: Create a simple model
- Open the Models section and the Model Editor (click Edit/Test next to the model). See building accounting models .
-
Build a minimal tree:
- Input nodes — reference the slugs for biochar mass and carbon content
- Constant node — value 3.67 (CO2-to-carbon mass ratio)
- Output node —
operator: product,data_point_type: carbon-delivered-tco2e
If carbon content is stored as a percentage (0-100), include a division by 100 in the formula or an intermediate node.
- Validate the model in the Console and save. Ensure the output datapoint slug matches what the batch type expects.
Step 3: Generate batches
The starter project already has the ledger and batch type configured. You only need to run the dataflow.- Go to Production Accounting and use Generate Batches .
- Choose an accounting period that includes your test event’s date.
- Validate that required datapoints are present, then Submit.
Step 4: Test end-to-end
Create a sample event
Go to Data Inputs and add an event directly. Select Biochar Delivery, set the date range, and fill in your datapoints (e.g., mass = 10 t, carbon content = 80%). Optionally add a Tracking ID and evidence.
Generate batches
Trigger batch generation for a period including your test event. Resolve any validation messages. If validations show missing data, try adjusting the datetime range or using the show time option per Generate batches.
Success criteria
You have completed the Module 1 exercise when:- One event type exists (e.g., Biochar Delivery) with 3-5 datapoints in Data Inputs > Input Settings
- One simple model reads your event’s datapoints and computes carbon delivered (e.g.
mass × carbon_content × 3.67) - Batches generated — you ran Generate Batches and a batch was created for your test event
- End-to-end test — the batch shows the expected calculated output (e.g. ~29.36 tCO2e for 10 t at 80% carbon content)