Skip to content

Restructure FDM documentation and add authentication pages#339

Merged
SvenVw merged 13 commits into
developmentfrom
docs/20251119
Nov 24, 2025
Merged

Restructure FDM documentation and add authentication pages#339
SvenVw merged 13 commits into
developmentfrom
docs/20251119

Conversation

@SvenVw
Copy link
Copy Markdown
Collaborator

@SvenVw SvenVw commented Nov 19, 2025

Summary by CodeRabbit

  • New Features

    • Added many new docs covering Fields, Cultivations, Fertilizers, Harvests, Soil Analyses, Authentication, Authorization, Organizations, Insights (norms) and an FDM App overview.
  • Documentation

    • Large reorganization of Getting Started, Core Concepts and Contributing sections; database/schema content expanded; several legacy guides removed or consolidated; sidebar ordering and homepage "Get started" link updated.
  • Chores

    • Docusaurus packages bumped, Markdown linting script added, and editor markdown formatting default configured.

✏️ Tip: You can customize this high-level summary in your review settings.

@SvenVw SvenVw self-assigned this Nov 19, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Nov 19, 2025

🦋 Changeset detected

Latest commit: 6a2c827

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@svenvw/fdm-docs Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 19, 2025

Walkthrough

This PR restructures and expands fdm-docs: reorders categories, rewrites Getting Started and Contributing into new pages, adds many Core Concepts, Insights, and FDM App pages, updates the Database Schema doc (naming/new harvest fields, Drizzle/SRID notes), removes obsolete docs, and bumps Docusaurus/tooling and linting scripts.

Changes

Cohort / File(s) Summary
Changeset Entry
\.changeset/slick-bees-post.md``
New changeset for @svenvw/fdm-docs describing a minor docs release.
Top-level README & Installation
\fdm-docs/docs/README.md`, `fdm-docs/docs/installation.md``
README rewritten (now "Introduction"); Installation page removed.
Core Concepts — schema & pages
Core Concepts
\fdm-docs/docs/core-concepts/01-database-schema.md`, `fdm-docs/docs/core-concepts/02-.md`, `fdm-docs/docs/core-concepts/03-.md`, `fdm-docs/docs/core-concepts/04-.md`, `fdm-docs/docs/core-concepts/05-.md`, `fdm-docs/docs/core-concepts/06-.md`, `fdm-docs/docs/core-concepts/07-.md`, `fdm-docs/docs/core-concepts/08-.md`, `fdm-docs/docs/core-concepts/09-.md`, `fdm-docs/docs/core-concepts/10-.md`, `fdm-docs/docs/core-concepts/11-.md``
Database Schema renamed/expanded: adds Drizzle ORM note, SRID/geography guidance, renames (e.g., fertilizerApplication), new/renamed harvestable yield/composition fields and index/constraint notes; many new core-concepts pages (Farms, Fields, Cultivations, Harvests, Fertilizers, Soil Analyses, Catalogues, Authentication, Authorization, Organizations).
Removed Core Concepts pages
\fdm-docs/docs/core-concepts/01-asset-action-model.md`, `fdm-docs/docs/core-concepts/03-catalogues.md`, `fdm-docs/docs/core-concepts/04-architecture-overview.md`, `fdm-docs/docs/core-concepts/05-authorization.md``
Deleted obsolete/relocated core-concepts pages.
Getting Started — restructure
\fdm-docs/docs/getting-started/*`, `fdm-docs/docs/getting-started/category.json``
Added What Is FDM, Asset‑Action intro, Quick Start; removed old prerequisites, setup connection, basic usage, catalogue usage, and running calculations pages; updated category position/description.
Contributing — split & add
\fdm-docs/docs/contributing.md`, `fdm-docs/docs/contributing/01-project-architecture.md`, `fdm-docs/docs/contributing/02-setting-up-local-environment.md`, `fdm-docs/docs/contributing/03-releasing-fdm.md`, `fdm-docs/docs/contributing/category.json``
Removed top-level contributing.md and introduced a contributing subsection with project architecture, local setup, release guide, and category metadata.
Insights & Norms
\fdm-docs/docs/insights/*`, `fdm-docs/docs/insights/category.json`, `fdm-docs/docs/insights/fertilizer-application-norms/**``
New Insights category and pages: moved/edited Nitrogen Balance, added Insights metadata, added NL 2025 fertilizer application norms and related pages (fosfaat, stikstof, dierlijke-mest).
FDM App Section
\fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md`, `fdm-docs/docs/fdm-app/category.json``
New FDM App category and introduction describing features and technical stack.
Navigation & Config
\fdm-docs/docusaurus.config.ts`, `fdm-docs/src/pages/index.tsx`, `fdm-docs/package.json`, `.vscode/settings.json``
Updated footer/docs navigation targets and homepage "Get started" link, removed Installation link, added markdown lint script and markdownlint-cli2, bumped Docusaurus packages, added VSCode Markdown formatter setting.
Removed/Updated category entries
\fdm-docs/docs/balance/category.json`, `fdm-docs/docs/norms/category.json``
Deleted old Nutrient Balance and old Norms category metadata entries.
Misc docs edits (formatting/content tweaks)
\fdm-docs/docs/insights/01-nitrogen-balance.md`, `fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/*.md`, `fdm-docs/README.md`, `fdm-docs/docs/contributing/03-releasing-fdm.md``
Formatting, title, and minor wording adjustments across nitrogen and norm pages; added fosfaat and stikstof norm pages; README/contributing small edits.

Sequence Diagram(s)

sequenceDiagram
  participant Client as Client / App
  participant Docs as fdm-docs Site
  participant Authz as fdm-authz (DB/service)

  Note right of Client: user action triggers permission check (docs describe flow)
  Client->>Authz: checkPermission(principalId, resourceId, action)
  alt allowed
    Authz-->>Client: allowed
    Client->>Docs: proceed (display/edit)
  else denied
    Authz-->>Client: denied
    Client->>Docs: show denied / audit note
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Focus review on:
    • correctness and consistency of schema renames and added harvest/harvestable fields in core-concepts/01-database-schema.md
    • doc navigation/sidebar order and links in docusaurus.config.ts and _category_.json files
    • cross-links between moved/renamed pages (Getting Started ↔ Core Concepts ↔ Insights)
    • package.json dependency bumps and the new markdown lint script

Possibly related PRs

Suggested reviewers

  • gerardhros
  • BoraIneviNMI

Poem

🐇 In my burrow I hop through docs anew,

Pages rearranged with a hop and a chew,
Fields and norms take their places just so,
Schemas and guides in a neat little row,
Hooray — the rabbits polished the doc-voo!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main changes: comprehensive restructuring of FDM documentation architecture and addition of new authentication/authorization pages.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/20251119

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.70%. Comparing base (0e34722) to head (6a2c827).
⚠️ Report is 14 commits behind head on development.

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #339   +/-   ##
============================================
  Coverage        87.70%   87.70%           
============================================
  Files               70       70           
  Lines             3675     3675           
  Branches          1045     1045           
============================================
  Hits              3223     3223           
  Misses             452      452           
Flag Coverage Δ
fdm-calculator 88.10% <ø> (ø)
fdm-core 87.03% <ø> (ø)
fdm-data 92.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot changed the title @coderabbitai Restructure FDM documentation and add authentication pages Nov 19, 2025
@coderabbitai coderabbitai Bot added branch:development Issue only affecting development, not the main branch (yet) dependencies Pull requests that update a dependency file fdm-docs labels Nov 19, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9484c80 and 1da9360.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (45)
  • .changeset/slick-bees-post.md (1 hunks)
  • fdm-docs/docs/README.md (1 hunks)
  • fdm-docs/docs/balance/_category_.json (0 hunks)
  • fdm-docs/docs/contributing.md (0 hunks)
  • fdm-docs/docs/contributing/01-project-architecture.md (1 hunks)
  • fdm-docs/docs/contributing/02-setting-up-local-environment.md (1 hunks)
  • fdm-docs/docs/contributing/03-releasing-fdm.md (1 hunks)
  • fdm-docs/docs/contributing/_category_.json (1 hunks)
  • fdm-docs/docs/core-concepts/01-asset-action-model.md (0 hunks)
  • fdm-docs/docs/core-concepts/01-database-schema.md (4 hunks)
  • fdm-docs/docs/core-concepts/02-farms.md (1 hunks)
  • fdm-docs/docs/core-concepts/03-catalogues.md (0 hunks)
  • fdm-docs/docs/core-concepts/03-fields.md (1 hunks)
  • fdm-docs/docs/core-concepts/04-architecture-overview.md (0 hunks)
  • fdm-docs/docs/core-concepts/04-cultivations.md (1 hunks)
  • fdm-docs/docs/core-concepts/05-authorization.md (0 hunks)
  • fdm-docs/docs/core-concepts/05-harvests.md (1 hunks)
  • fdm-docs/docs/core-concepts/06-fertilizers.md (1 hunks)
  • fdm-docs/docs/core-concepts/07-soil-analyses.md (1 hunks)
  • fdm-docs/docs/core-concepts/08-catalogues.md (1 hunks)
  • fdm-docs/docs/core-concepts/09-authentication.md (1 hunks)
  • fdm-docs/docs/core-concepts/10-authorization.md (1 hunks)
  • fdm-docs/docs/core-concepts/11-organizations.md (1 hunks)
  • fdm-docs/docs/core-concepts/_category_.json (1 hunks)
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md (1 hunks)
  • fdm-docs/docs/fdm-app/_category_.json (1 hunks)
  • fdm-docs/docs/getting-started/01-prerequisites.md (0 hunks)
  • fdm-docs/docs/getting-started/01-what-is-fdm.md (1 hunks)
  • fdm-docs/docs/getting-started/02-setup-connection.md (0 hunks)
  • fdm-docs/docs/getting-started/02-the-asset-action-model.md (1 hunks)
  • fdm-docs/docs/getting-started/03-basic-usage-fdm-core.md (0 hunks)
  • fdm-docs/docs/getting-started/03-quick-start-guide.md (1 hunks)
  • fdm-docs/docs/getting-started/04-using-catalogues-fdm-data.md (0 hunks)
  • fdm-docs/docs/getting-started/05-running-calculations-fdm-calculator.md (0 hunks)
  • fdm-docs/docs/getting-started/_category_.json (1 hunks)
  • fdm-docs/docs/insights/01-nitrogen-balance.md (1 hunks)
  • fdm-docs/docs/insights/_category_.json (1 hunks)
  • fdm-docs/docs/insights/fertilizer-application-norms/01-index.md (1 hunks)
  • fdm-docs/docs/insights/fertilizer-application-norms/_category_.json (1 hunks)
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md (2 hunks)
  • fdm-docs/docs/installation.md (0 hunks)
  • fdm-docs/docs/norms/_category_.json (0 hunks)
  • fdm-docs/docusaurus.config.ts (1 hunks)
  • fdm-docs/package.json (2 hunks)
  • fdm-docs/src/pages/index.tsx (1 hunks)
💤 Files with no reviewable changes (13)
  • fdm-docs/docs/contributing.md
  • fdm-docs/docs/balance/category.json
  • fdm-docs/docs/getting-started/01-prerequisites.md
  • fdm-docs/docs/getting-started/05-running-calculations-fdm-calculator.md
  • fdm-docs/docs/norms/category.json
  • fdm-docs/docs/core-concepts/04-architecture-overview.md
  • fdm-docs/docs/getting-started/03-basic-usage-fdm-core.md
  • fdm-docs/docs/core-concepts/05-authorization.md
  • fdm-docs/docs/getting-started/04-using-catalogues-fdm-data.md
  • fdm-docs/docs/getting-started/02-setup-connection.md
  • fdm-docs/docs/installation.md
  • fdm-docs/docs/core-concepts/03-catalogues.md
  • fdm-docs/docs/core-concepts/01-asset-action-model.md
🧰 Additional context used
🧠 Learnings (48)
📓 Common learnings
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:70-76
Timestamp: 2025-04-18T14:20:40.975Z
Learning: The organization schema in fdm-core/src/db/schema-authn.ts is managed by better-auth, and modifications to field constraints (like making the slug field non-nullable) should maintain compatibility with better-auth's expectations, even if application code assumes non-null values.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:69-76
Timestamp: 2025-04-18T14:18:44.350Z
Learning: The authentication schema (fdm-authn) is based on better-auth's schema structure, which does not include `updatedAt` fields for tables like `organization`.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 279
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.norms.tsx:277-283
Timestamp: 2025-09-26T08:34:50.413Z
Learning: In the fdm project, fdm-core and fdm-app are updated together as part of a monorepo structure, which eliminates legacy data concerns when new fields like b_isproductive are introduced. Both packages are synchronized, so there's no need for defensive coding against undefined values for newly introduced database fields.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:70-76
Timestamp: 2025-04-18T14:20:40.975Z
Learning: The schema defined in fdm-core/src/db/schema-authn.ts follows better-auth's structure and requirements. While the schema is defined in the application code, modifications to it should maintain compatibility with better-auth's expectations.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 88
File: fdm-core/src/cultivation.ts:246-246
Timestamp: 2025-03-04T11:09:08.169Z
Learning: In the FDM codebase, the `fdm` parameter should be documented as "The FDM instance providing the connection to the database. The instance can be created with {link createFdmServer}." in JSDoc comments.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/organization.ts:300-339
Timestamp: 2025-04-18T14:51:48.033Z
Learning: The `getUsersInOrganization` function in fdm-core/src/organization.ts will be updated in commit b17fac16c9e5a0de56d0346e712b2ce966d305d5 to include id and email fields, which are necessary for subsequent role updates and user removal operations.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 0
File: :0-0
Timestamp: 2025-08-13T10:33:05.313Z
Learning: In the fdm project, fdm-calculator integration for new features like b_lu_variety is handled in separate updates from the core data model changes. When fdm-core functions are updated to support new fields, fdm-calculator can consume these enhanced APIs without requiring changes in the same PR that introduces the core functionality.
📚 Learning: 2025-09-26T08:34:50.413Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 279
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.norms.tsx:277-283
Timestamp: 2025-09-26T08:34:50.413Z
Learning: In the fdm project, fdm-core and fdm-app are updated together as part of a monorepo structure, which eliminates legacy data concerns when new fields like b_isproductive are introduced. Both packages are synchronized, so there's no need for defensive coding against undefined values for newly introduced database fields.

Applied to files:

  • fdm-docs/docs/contributing/02-setting-up-local-environment.md
  • fdm-docs/docs/README.md
  • fdm-docs/docs/getting-started/03-quick-start-guide.md
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • fdm-docs/docs/core-concepts/03-fields.md
  • fdm-docs/package.json
  • fdm-docs/docs/core-concepts/02-farms.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
  • fdm-docs/docs/fdm-app/_category_.json
  • fdm-docs/docs/contributing/01-project-architecture.md
  • fdm-docs/docs/core-concepts/01-database-schema.md
  • .changeset/slick-bees-post.md
📚 Learning: 2025-01-24T11:39:57.805Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 49
File: fdm-core/src/cultivation.ts:625-671
Timestamp: 2025-01-24T11:39:57.805Z
Learning: Every cultivation has an associated `cultivationTerminating` record created by `addCultivation`, with `b_terminate_date` initially set to null. Therefore, `updateCultivation` can safely assume the record exists and only needs to handle updates.

Applied to files:

  • fdm-docs/docs/core-concepts/04-cultivations.md
📚 Learning: 2025-01-23T15:18:57.212Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 49
File: fdm-core/src/db/schema.ts:407-426
Timestamp: 2025-01-23T15:18:57.212Z
Learning: In the farm data model, each cultivation (b_lu) can have only one termination date but can have multiple harvest dates. This is enforced through the database schema where cultivationTerminating uses b_lu as primary key while cultivationHarvesting uses a composite primary key of b_id_harvestable and b_lu.

Applied to files:

  • fdm-docs/docs/core-concepts/04-cultivations.md
  • fdm-docs/docs/core-concepts/05-harvests.md
  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-04-04T14:27:39.518Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 116
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx:111-154
Timestamp: 2025-04-04T14:27:39.518Z
Learning: In the FDM application, cultivation retrieval logic should be centralized in utility functions rather than duplicated across loader and action functions to improve maintainability and ensure consistent behavior.

Applied to files:

  • fdm-docs/docs/core-concepts/04-cultivations.md
  • fdm-docs/docs/core-concepts/05-harvests.md
📚 Learning: 2025-02-13T08:28:00.183Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 71
File: fdm-core/src/cultivation.ts:572-597
Timestamp: 2025-02-13T08:28:00.183Z
Learning: In the FDM database schema, `b_id_harvesting` is a primary key in the `cultivationHarvesting` table, ensuring no duplicate harvest entries can exist. Therefore, duplicate checking is not needed when processing harvest records from database queries.

Applied to files:

  • fdm-docs/docs/core-concepts/04-cultivations.md
  • fdm-docs/docs/core-concepts/05-harvests.md
  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-07-21T12:06:07.070Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 156
File: fdm-calculator/src/norms/nl/2025/stikstofgebruiksnorm.ts:295-303
Timestamp: 2025-07-21T12:06:07.070Z
Learning: Functions in the fdm-calculator with "NL2025" in their names are specifically designed for Netherlands 2025 agricultural norms calculation and hardcoded 2025 dates are appropriate in this context, as different years would have separate calculation modules.

Applied to files:

  • fdm-docs/docs/insights/fertilizer-application-norms/01-index.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md
📚 Learning: 2025-09-23T12:27:07.391Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:151-204
Timestamp: 2025-09-23T12:27:07.391Z
Learning: In the FDM application, field overview functionality is implemented as a dedicated page accessible via `farm/{farmId}/{calendar}/field` rather than as a direct listing on the dashboard. The dashboard includes a "Perceelsoverzicht" quick action card that provides navigation to this comprehensive field management interface.

Applied to files:

  • fdm-docs/docs/insights/fertilizer-application-norms/01-index.md
  • fdm-docs/docs/README.md
  • fdm-docs/docs/getting-started/03-quick-start-guide.md
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • fdm-docs/docs/core-concepts/03-fields.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/core-concepts/02-farms.md
  • fdm-docs/docs/getting-started/02-the-asset-action-model.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
  • fdm-docs/docs/core-concepts/07-soil-analyses.md
📚 Learning: 2025-08-13T10:33:05.313Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 0
File: :0-0
Timestamp: 2025-08-13T10:33:05.313Z
Learning: In the fdm project, fdm-calculator integration for new features like b_lu_variety is handled in separate updates from the core data model changes. When fdm-core functions are updated to support new fields, fdm-calculator can consume these enhanced APIs without requiring changes in the same PR that introduces the core functionality.

Applied to files:

  • fdm-docs/docs/README.md
  • fdm-docs/docs/getting-started/03-quick-start-guide.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
  • fdm-docs/docs/contributing/01-project-architecture.md
  • .changeset/slick-bees-post.md
📚 Learning: 2025-09-23T12:37:58.711Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.field._index.tsx:113-148
Timestamp: 2025-09-23T12:37:58.711Z
Learning: In the FDM application, the current field data fetching implementation using Promise.all with individual API calls (getCultivations, getFertilizerApplications, getCurrentSoilData) performs acceptably even with farms containing 90+ fields. No performance issues have been observed in practice with this approach.

Applied to files:

  • fdm-docs/docs/getting-started/03-quick-start-guide.md
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • fdm-docs/docs/core-concepts/03-fields.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/core-concepts/05-harvests.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
  • fdm-docs/docs/core-concepts/07-soil-analyses.md
📚 Learning: 2025-03-04T11:09:08.169Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 88
File: fdm-core/src/cultivation.ts:246-246
Timestamp: 2025-03-04T11:09:08.169Z
Learning: In the FDM codebase, the `fdm` parameter should be documented as "The FDM instance providing the connection to the database. The instance can be created with {link createFdmServer}." in JSDoc comments.

Applied to files:

  • fdm-docs/docs/getting-started/03-quick-start-guide.md
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
  • fdm-docs/docs/core-concepts/01-database-schema.md
  • .changeset/slick-bees-post.md
📚 Learning: 2025-06-02T10:31:27.097Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 151
File: fdm-app/app/routes/signin._index.tsx:101-101
Timestamp: 2025-06-02T10:31:27.097Z
Learning: In fdm-app/app/routes/signin._index.tsx, the redirect destinations are intentionally inconsistent by design: the component defaults new sign-ins to "/welcome" (line 101) while the loader redirects authenticated users to "/farm" (line 80) and the action uses "/farm" as fallback (line 434). This creates appropriate user flows where new users complete their profile via the welcome page, while existing authenticated users bypass it and go directly to the main application.

Applied to files:

  • fdm-docs/docusaurus.config.ts
  • fdm-docs/src/pages/index.tsx
📚 Learning: 2024-11-25T12:42:32.783Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 6
File: fdm-app/vite.config.ts:5-9
Timestamp: 2024-11-25T12:42:32.783Z
Learning: In the `fdm-app` project, SvenVw is preparing for migration to Remix v3 and may include type declarations or configurations for v3 features in advance, such as in `vite.config.ts`.

Applied to files:

  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • .changeset/slick-bees-post.md
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: A comprehensive farm layout system has been created in `components/custom/farm-layouts/` with `BaseFarmLayout` and `FarmSidebarLayout` components. The system supports both simple and sidebar-based layouts while maintaining consistent header and farm selection functionality across all farm routes.

Applied to files:

  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-01-31T15:05:14.310Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 67
File: fdm-app/app/routes/farm.create.$b_id_farm.fields.$b_id.tsx:601-610
Timestamp: 2025-01-31T15:05:14.310Z
Learning: When using `updateField` from fdm-core, all 8 parameters must be provided in order: fdm, b_id, b_name, b_geometry, b_area, b_id_source, b_id_farm, and b_id_farm_source.

Applied to files:

  • fdm-docs/docs/core-concepts/03-fields.md
📚 Learning: 2025-01-23T15:17:23.027Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 49
File: fdm-app/app/routes/farm.create.$b_id_farm.atlas.tsx:208-208
Timestamp: 2025-01-23T15:17:23.027Z
Learning: The `addField` function in fdm-core should verify field creation within the same transaction by checking the existence of the field and all its required relations (field data, acquiring info, geometry) before resolving its promise.

Applied to files:

  • fdm-docs/docs/core-concepts/03-fields.md
📚 Learning: 2025-01-31T15:05:14.310Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 67
File: fdm-app/app/routes/farm.create.$b_id_farm.fields.$b_id.tsx:601-610
Timestamp: 2025-01-31T15:05:14.310Z
Learning: The `updateField` function in fdm-core requires 8 parameters: fdm, b_id (required), and 6 optional parameters (b_name, b_id_source, b_geometry, b_acquiring_date, b_acquiring_method, b_discarding_date).

Applied to files:

  • fdm-docs/docs/core-concepts/03-fields.md
📚 Learning: 2025-10-15T08:11:10.649Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 299
File: fdm-docs/package.json:22-35
Timestamp: 2025-10-15T08:11:10.649Z
Learning: Docusaurus versions 3.7 and later support both React 18 and React 19. The peerDependencies are specified as "react": "^18.0.0 || ^19.0.0" and "react-dom": "^18.0.0 || ^19.0.0".

Applied to files:

  • fdm-docs/package.json
📚 Learning: 2025-10-22T08:09:17.727Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 285
File: fdm-calculator/src/norms/nl/2025/filling/fosfaatgebruiksnorm.ts:6-9
Timestamp: 2025-10-22T08:09:17.727Z
Learning: In fdm-calculator for NL 2025 phosphate stimulus ("Stimuleren organische stofrijke meststoffen"), the correct RVO mestcode groupings are: 25% discount group includes ["111", "112"] (Compost and Zeer schone compost), and the 75% discount group for organic farms includes ["40"] (Varkens - Vaste mest). The 75% base group includes ["110", "10", "61", "25", "56"].

Applied to files:

  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md
📚 Learning: 2025-03-04T10:56:35.540Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 88
File: fdm-calculator/src/doses/calculate-dose.ts:18-18
Timestamp: 2025-03-04T10:56:35.540Z
Learning: In the FDM calculator, fertilizer nutrient rates (p_n_rt, p_p_rt, p_k_rt) are measured in g/kg, and are converted to fractions by dividing by 10 during dose calculations.

Applied to files:

  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
📚 Learning: 2025-09-23T12:29:34.184Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:160-163
Timestamp: 2025-09-23T12:29:34.184Z
Learning: In the FDM application, the fertilizer application route intentionally uses `${calendar}/field/fertilizer` instead of the originally planned `/farm/{farmId}/add/fertilizer` structure. This design decision prioritizes starting from the field list view to provide better field selection workflow before applying fertilizer, rather than direct dashboard-to-action navigation.

Applied to files:

  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/core-concepts/02-farms.md
  • fdm-docs/docs/getting-started/02-the-asset-action-model.md
  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-09-24T14:02:48.574Z
Learnt from: BoraIneviNMI
Repo: SvenVw/fdm PR: 272
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.fertilizer.manage.new.$p_id.tsx:85-101
Timestamp: 2025-09-24T14:02:48.574Z
Learning: The getFertilizer function in svenvw/fdm-core does not perform authorization checks, unlike getFertilizers which includes a checkPermission call to verify farm access. This means getFertilizer(fdm, p_id) can potentially return fertilizer details for any fertilizer ID without validating user permissions.

Applied to files:

  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/core-concepts/10-authorization.md
📚 Learning: 2025-09-23T10:02:32.123Z
Learnt from: BoraIneviNMI
Repo: SvenVw/fdm PR: 272
File: fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fertilizers.$b_lu_catalogue.manage.$p_id.tsx:151-164
Timestamp: 2025-09-23T10:02:32.123Z
Learning: The getFertilizer function from svenvw/fdm-core throws an exception if the fertilizer doesn't exist, rather than returning null or undefined.

Applied to files:

  • fdm-docs/docs/core-concepts/06-fertilizers.md
📚 Learning: 2025-09-24T14:02:48.574Z
Learnt from: BoraIneviNMI
Repo: SvenVw/fdm PR: 272
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.fertilizer.manage.new.$p_id.tsx:85-101
Timestamp: 2025-09-24T14:02:48.574Z
Learning: Both getFertilizer and getFertilizers functions in svenvw/fdm-core perform authorization checks using the user's principal_id to verify farm access before returning fertilizer data.

Applied to files:

  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/core-concepts/10-authorization.md
📚 Learning: 2025-01-09T16:06:08.547Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: .changeset/yellow-sheep-wash.md:1-5
Timestamp: 2025-01-09T16:06:08.547Z
Learning: The `b_sector` column has been removed from the farms table and replaced with `b_businessid_farm`, `b_address_farm`, and `b_postalcode_farm` columns for better business information management.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: The farm layout system has been reorganized into separate components (`FarmHeader`, `ContentLayout`, `PaginationLayout`) to support different navigation patterns (sidebar, pagination) while maintaining consistent styling. Each layout component is designed to be used independently or combined as needed.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-03-04T09:03:04.358Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 87
File: fdm-core/src/farm.ts:22-25
Timestamp: 2025-03-04T09:03:04.358Z
Learning: In the FDM codebase, functions that insert/create data (like `addFarm`) intentionally use `principal_id: string` instead of `PrincipalId` to enforce that only a single principal ID can be used for creation operations, while read operations use the more flexible `PrincipalId` type which supports both single IDs and arrays of IDs.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: A shared layout component `FarmLayoutBase` has been created in `components/custom/farm-layout-base.tsx` to maintain consistency across farm-related pages. The component handles farm selection dropdown, breadcrumb navigation, and provides a common layout structure.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: The `FarmLayout` component in `components/custom/farm-layout.tsx` provides a reusable layout structure for farm-related pages, with support for farm selection dropdown, customizable breadcrumb titles, and flexible content rendering through either children or Outlet components.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-04-18T14:51:48.033Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/organization.ts:300-339
Timestamp: 2025-04-18T14:51:48.033Z
Learning: The `getUsersInOrganization` function in fdm-core/src/organization.ts will be updated in commit b17fac16c9e5a0de56d0346e712b2ce966d305d5 to include id and email fields, which are necessary for subsequent role updates and user removal operations.

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2025-04-18T14:18:44.350Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:69-76
Timestamp: 2025-04-18T14:18:44.350Z
Learning: The authentication schema (fdm-authn) is based on better-auth's schema structure, which does not include `updatedAt` fields for tables like `organization`.

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
  • fdm-docs/docs/core-concepts/09-authentication.md
  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-04-18T14:20:40.975Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:70-76
Timestamp: 2025-04-18T14:20:40.975Z
Learning: The organization schema in fdm-core/src/db/schema-authn.ts is managed by better-auth, and modifications to field constraints (like making the slug field non-nullable) should maintain compatibility with better-auth's expectations, even if application code assumes non-null values.

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
  • fdm-docs/docs/core-concepts/09-authentication.md
  • fdm-docs/docs/core-concepts/01-database-schema.md
  • .changeset/slick-bees-post.md
📚 Learning: 2025-04-18T14:51:48.033Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/organization.ts:300-339
Timestamp: 2025-04-18T14:51:48.033Z
Learning: The `getUsersInOrganization` function in fdm-core/src/organization.ts needs to include user ID and email fields to support role updates and user removal operations, which will be fixed in a future commit (b17fac16c9e5a0de56d0346e712b2ce966d305d5).

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2025-04-18T14:51:48.033Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/organization.ts:300-339
Timestamp: 2025-04-18T14:51:48.033Z
Learning: The `getUsersInOrganization` function in fdm-core/src/organization.ts needed to include id and email fields for users, which was fixed in commit b17fac16c9e5a0de56d0346e712b2ce966d305d5.

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2025-04-18T14:51:48.033Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/organization.ts:300-339
Timestamp: 2025-04-18T14:51:48.033Z
Learning: The `getUsersInOrganization` function in fdm-core/src/organization.ts currently returns only firstname, surname, image, and role, but needs to include id and email fields to support downstream operations like role updates and user removal. This will be fixed in commit b17fac16c9e5a0de56d0346e712b2ce966d305d5.

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2025-07-31T11:38:50.661Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 194
File: fdm-core/src/harvest.ts:488-644
Timestamp: 2025-07-31T11:38:50.661Z
Learning: The validation logic in updateHarvest is intentionally different from checkHarvestDateCompability because updateHarvest is for updating existing harvests while checkHarvestDateCompability is for inserting new harvests. The insertion function includes checks that don't apply to updates, such as verifying no harvest already exists for "once" harvestable cultivations.

Applied to files:

  • fdm-docs/docs/core-concepts/05-harvests.md
📚 Learning: 2025-06-10T15:05:38.163Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 163
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.field._index.tsx:27-29
Timestamp: 2025-06-10T15:05:38.163Z
Learning: In the fdm-app codebase, the component directory structure is intentionally organized with `~/components/custom/` containing small reusable components that can be used in both blocks and pages, while `~/components/blocks/` contains larger block-level components. Not all components should be migrated from custom to blocks - the custom directory serves as a library of smaller utility components.

Applied to files:

  • fdm-docs/docs/fdm-app/_category_.json
📚 Learning: 2025-08-14T14:31:55.384Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 236
File: fdm-calculator/src/balance/nitrogen/index.ts:173-0
Timestamp: 2025-08-14T14:31:55.384Z
Learning: In nitrogen balance calculations for agricultural systems, the balance should only include ammonia emissions (emission.ammonia.total) and should not include nitrate leaching from the emission calculation. The nitrate component (emission.nitrate) should be excluded from the balance formula.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-05-26T10:32:00.674Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 134
File: fdm-calculator/src/balance/nitrogen/index.ts:162-168
Timestamp: 2025-05-26T10:32:00.674Z
Learning: In the nitrogen balance calculation system (fdm-calculator), removal and volatilization values are negative by definition. This means the balance calculation using supply.total.add(removal.total).add(volatilization.total) is correct, as it effectively computes supply - |removal| - |volatilization|.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-05-26T10:32:15.538Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 134
File: fdm-calculator/src/balance/nitrogen/index.ts:236-238
Timestamp: 2025-05-26T10:32:15.538Z
Learning: In nitrogen balance calculations for agricultural systems, removal and volatilization are calculated as negative values by definition since they represent nitrogen losses from the system. The balance calculation uses addition (.add()) for all components because removal and volatilization are already negative, so adding them effectively subtracts the losses from the supply.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-04-18T14:20:40.975Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:70-76
Timestamp: 2025-04-18T14:20:40.975Z
Learning: The schema defined in fdm-core/src/db/schema-authn.ts follows better-auth's structure and requirements. While the schema is defined in the application code, modifications to it should maintain compatibility with better-auth's expectations.

Applied to files:

  • fdm-docs/docs/core-concepts/09-authentication.md
  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2024-12-19T13:20:44.152Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 23
File: fdm-app/app/routes/app.addfarm.new.tsx:15-17
Timestamp: 2024-12-19T13:20:44.152Z
Learning: Authentication for the “app.addfarm.new” route is already handled globally in “fdm-app/app/routes/app.tsx,” automatically redirecting unauthenticated users to the SignIn page.

Applied to files:

  • fdm-docs/docs/core-concepts/09-authentication.md
📚 Learning: 2025-01-14T16:06:21.832Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 45
File: fdm-app/app/routes/farm.$b_id_farm.settings._index.tsx:1-1
Timestamp: 2025-01-14T16:06:21.832Z
Learning: In the fdm project, `redirect` and other routing utilities should be imported from `react-router` instead of `react-router-dom`.

Applied to files:

  • fdm-docs/src/pages/index.tsx
📚 Learning: 2025-04-18T13:49:17.029Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-app/app/components/custom/farm/farm-title.tsx:3-3
Timestamp: 2025-04-18T13:49:17.029Z
Learning: In the fdm project, NavLink and other routing components can be imported from either "react-router" or "react-router-dom" as react-router-dom is included in react-router.

Applied to files:

  • fdm-docs/src/pages/index.tsx
📚 Learning: 2025-01-14T16:06:24.294Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 45
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:1-1
Timestamp: 2025-01-14T16:06:24.294Z
Learning: In the fdm-app codebase, the `redirect` function should be imported from `react-router`, not `react-router-dom`.

Applied to files:

  • fdm-docs/src/pages/index.tsx
📚 Learning: 2025-09-17T08:56:42.489Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 267
File: fdm-calculator/src/balance/nitrogen/emission/ammonia/residues.ts:100-106
Timestamp: 2025-09-17T08:56:42.489Z
Learning: In the fdm-calculator, b_lu_hi (harvest index) represents the ratio of harvested yield to total biomass in agricultural calculations. This value should naturally be non-negative and typically between 0 and 1. Negative values are not expected or physically meaningful in this agricultural domain context.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-02-13T08:35:59.306Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 71
File: fdm-app/app/routes/farm.$b_id_farm.field.$b_id.cultivation.$b_lu.harvest.$b_id_harvesting.tsx:114-124
Timestamp: 2025-02-13T08:35:59.306Z
Learning: The HarvestForm component in fdm-app expects undefined (not 0) for b_lu_yield when no yield information is available, as 0 would incorrectly imply that yield data exists.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-08-11T12:14:28.354Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 233
File: fdm-core/src/db/schema.ts:370-0
Timestamp: 2025-08-11T12:14:28.354Z
Learning: In the FDM database schema, the field `b_lu_rest_oravib` in the `cultivations_catalogue` table is intentionally nullable (can be undefined). When undefined, it should be treated as `false` in the UI layer. This allows distinguishing between "explicitly set to false" and "not set" at the database level while providing simplified boolean logic in the UI.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
🪛 GitHub Actions: Test deployment of fdm-docs
fdm-docs/docs/contributing/02-setting-up-local-environment.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/04-cultivations.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/insights/fertilizer-application-norms/01-index.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/README.md

[error] 20-20: Markdown link with URL ./agronomic-calculations/01-nitrogen-balance.md couldn't be resolved. Ensure the target file exists.


[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/insights/fertilizer-application-norms/_category_.json

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/getting-started/03-quick-start-guide.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/_category_.json

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docusaurus.config.ts

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/insights/_category_.json

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/03-fields.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/package.json

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/06-fertilizers.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/08-catalogues.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/contributing/_category_.json

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/02-farms.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/11-organizations.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/10-authorization.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/05-harvests.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/getting-started/_category_.json

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/getting-started/02-the-asset-action-model.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/getting-started/01-what-is-fdm.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/fdm-app/_category_.json

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/insights/01-nitrogen-balance.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/contributing/01-project-architecture.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/07-soil-analyses.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/09-authentication.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/src/pages/index.tsx

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/contributing/03-releasing-fdm.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

fdm-docs/docs/core-concepts/01-database-schema.md

[error] 1-1: Docusaurus build failed: Unable to build website for locale en. Command 'pnpm build-docs' failed with exit code 1.

🪛 LanguageTool
fdm-docs/docs/contributing/02-setting-up-local-environment.md

[style] ~15-~15: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...pm` for package management, so you will need to have it installed. * Git: FDM is ...

(REP_NEED_TO_VB)


[style] ~16-~16: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...** FDM is hosted on GitHub, so you will need to have Git installed to clone the reposit...

(REP_NEED_TO_VB)


[style] ~21-~21: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... ## Cloning the Repository First, you need to clone the FDM repository from GitHub: ...

(REP_NEED_TO_VB)


[style] ~29-~29: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... ## Installing Dependencies Next, you need to install the dependencies for all the pa...

(REP_NEED_TO_VB)


[style] ~37-~37: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... manage environment variables. You will need to create a .env file in the fdm-app p...

(REP_NEED_TO_VB)


[style] ~43-~43: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...example fdm-app/.env ``` You will then need to fill in the values for the environment ...

(REP_NEED_TO_VB)

fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md

[style] ~39-~39: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ent data entry and reference. * @svenvw/fdm-calculator: A library for perform...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md

[style] ~13-~13: ‘takes into account’ might be wordy. Consider a shorter alternative.
Context: ... be applied to a field. The calculation takes into account the main crop, the geographical locatio...

(EN_WORDINESS_PREMIUM_TAKES_INTO_ACCOUNT)

fdm-docs/docs/core-concepts/08-catalogues.md

[style] ~7-~7: Consider using a more concise synonym.
Context: ...pre-defined, standardized data sets for a variety of agricultural concepts. These data sets ...

(A_VARIETY_OF)

fdm-docs/docs/core-concepts/11-organizations.md

[style] ~35-~35: ‘in conjunction with’ might be wordy. Consider a shorter alternative.
Context: ... within that organization itself. This, in conjunction with the organization's inherited roles on f...

(EN_WORDINESS_PREMIUM_IN_CONJUNCTION_WITH)

fdm-docs/docs/getting-started/01-what-is-fdm.md

[grammar] ~7-~7: Ensure spelling is correct
Context: ...rm management solutions that lowers the barries to deliver latest agronomic insights to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

fdm-docs/docs/contributing/01-project-architecture.md

[style] ~26-~26: Consider using a different verb to strengthen your wording.
Context: ...ch as caching and parallel execution to speed up the build process.

(SPEED_UP_ACCELERATE)

🪛 markdownlint-cli2 (0.18.1)
fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md

23-23: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


24-24: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


25-25: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


28-28: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


29-29: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


30-30: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


31-31: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


32-32: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


35-35: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


36-36: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


37-37: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


38-38: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


39-39: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


42-42: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


43-43: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


46-46: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


47-47: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


48-48: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


49-49: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


52-52: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


53-53: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

fdm-docs/docs/core-concepts/10-authorization.md

15-15: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


16-16: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


17-17: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

🔇 Additional comments (34)
fdm-docs/docs/getting-started/02-the-asset-action-model.md (2)

5-60: Install dependencies to resolve the build failure—this is not a markdown issue.

The build error is sh: 1: typedoc: not found, which occurs because node_modules is missing. The build:api script fails before Docusaurus even starts. This is a build setup issue, not a problem with the markdown content in 02-the-asset-action-model.md.

The markdown file itself is syntactically valid. To fix the build, run:

cd fdm-docs
pnpm install

Then retry the build. The markdown content and structure require no changes.

Likely an incorrect or invalid review comment.


1-3: File is properly registered via autogenerated sidebar configuration—no additional action required.

The new document is correctly positioned to be automatically included by the sidebars.ts configuration, which uses autogeneration (type: "autogenerated"). The file has valid YAML frontmatter, properly structured markdown content, and the _category_.json is correctly configured. The document will be picked up and ordered sequentially (as 02-...) within the Getting Started category.

.changeset/slick-bees-post.md (1)

1-5: Changeset format is valid.

The changeset entry correctly specifies a minor version bump for @svenvw/fdm-docs with an appropriate description summarizing the documentation restructuring.

fdm-docs/docs/insights/01-nitrogen-balance.md (1)

2-3: Frontmatter updates are appropriate.

Title and sidebar_label adjustments make the navigation label consistent and concise. Note that the H1 heading remains "Nitrogen Balance Calculation", which is slightly more descriptive than the title—this is acceptable for documentation.

fdm-docs/docs/insights/_category_.json (1)

1-8: Valid Docusaurus category configuration.

The JSON structure follows standard Docusaurus conventions with appropriate label, position, and generated-index link. The description accurately characterizes the Insights section's purpose.

fdm-docs/package.json (1)

22-35: Docusaurus patch update is appropriate and safe.

Upgrading from 3.9.1 to 3.9.2 is a standard patch maintenance update across core and dev dependencies. The versions are kept consistent, and React 19.2.0 compatibility is maintained. Per retrieved learnings, Docusaurus 3.9.2 supports React 19 peerDependencies.

fdm-docs/docs/getting-started/03-quick-start-guide.md (1)

1-127: Comprehensive and well-structured quick start guide.

The guide provides clear, practical steps for getting started with FDM, from installation through core operations. Code examples are concrete with appropriately marked dummy data. The progression from database setup → farm creation → field management → crop sowing follows a logical workflow that matches FDM's data model hierarchy.

fdm-docs/docs/getting-started/01-what-is-fdm.md (1)

1-37: Well-structured introductory documentation.

The content effectively introduces FDM's purpose, target audience, and key value propositions. The "What Problem Does FDM Solve" section clearly articulates the pain points, and the features section concisely summarizes core capabilities. The organization provides a good foundation for onboarding new users.

fdm-docs/docs/core-concepts/10-authorization.md (1)

1-33: Comprehensive authorization documentation.

The page clearly explains FDM's resource-based permission model, role hierarchy, and the checkPermission flow. The step-by-step breakdown of access control logic and audit trail functionality provides developers with the understanding needed to implement proper authorization checks. Content aligns well with authorization patterns described in retrieved learnings.

fdm-docs/docs/core-concepts/05-harvests.md (2)

2-5: Frontmatter and heading updates improve consistency.

The change from singular "Harvest" to plural "Harvests" in the title and H1 heading aligns with the document's comprehensive coverage of harvest structures and multiple harvest events per cultivation. Plural form better reflects the content scope.


14-14: Semantic improvements enhance clarity.

The updated wording clarifies that each harvest event can produce multiple harvestables and notes the 1:1 relationship limitation in fdm-core functions. The typo fix from "haverstables" to "harvestables" improves professionalism, and the expanded explanation helps developers understand the data model constraints.

fdm-docs/docs/core-concepts/09-authentication.md (2)

7-7: Well-structured authentication documentation.

The content clearly explains Better Auth integration, supported strategies, and session management. The documentation appropriately references the core implementation location.


1-38: Verify the actual Docusaurus build failure with error details.

The file system checks found no evidence of the issues mentioned in this review:

  • All referenced files exist (authentication.ts, what-is-fdm.md)
  • Category positions at the top level are unique (1, 2, 3, 5, 6); nested position 1 values are at different hierarchy levels and do not conflict
  • No broken relative links detected
  • Sidebar configuration uses standard autogenerated approach

However, without actual Docusaurus build error output, I cannot confirm whether a build failure exists or its root cause. Please share the specific Docusaurus build error message to identify the actual issue. The review's specific claims about broken links, missing pages, or category conflicts lack supporting evidence in the codebase.

fdm-docs/docs/core-concepts/11-organizations.md (1)

7-36: LGTM! Clear explanation of the organizations concept.

The documentation effectively explains how organizations enable multi-farm access management, the schema structure (based on better-auth), and the role inheritance mechanism. The use cases (centralized access control, streamlined onboarding, multi-farm analysis) are well articulated.

Based on learnings: The organization schema is managed by better-auth and does not include updatedAt fields by design.

fdm-docs/docs/getting-started/_category_.json (1)

2-7: LGTM! Category configuration aligns with docs reorganization.

The position change from 4 to 1 and the expanded description appropriately reflect the Getting Started section's role as the primary entry point for developers. This aligns with the broader documentation restructuring evident in the PR.

fdm-docs/docs/core-concepts/03-fields.md (1)

7-37: LGTM! Comprehensive field documentation.

The documentation effectively explains the Field asset's role in FDM, covering geometric properties (GeoJSON polygon in WGS 84), database schema structure, farm relationships, and activity tracking. The explanation of how fields connect to cultivations and other activities provides valuable context for understanding the data model.

fdm-docs/src/pages/index.tsx (1)

31-31: LGTM! Navigation update aligns with documentation restructure.

The link update from "prerequisites" to "what-is-fdm" appropriately reflects the new documentation entry point. Ensure the target page exists to resolve the build failure flagged earlier in this review.

fdm-docs/docs/contributing/03-releasing-fdm.md (1)

1-5: LGTM! Standard Docusaurus front matter added.

The YAML front matter correctly provides the title and sidebar label for the release process documentation, following Docusaurus conventions.

fdm-docs/docs/contributing/_category_.json (1)

1-8: LGTM! Contributing category properly configured.

The category configuration correctly establishes the Contributing section with appropriate position and description for developers who want to contribute to the FDM project.

fdm-docs/docs/insights/fertilizer-application-norms/_category_.json (1)

1-4: LGTM! Category configuration is correct.

The category JSON properly configures the Fertilizer Application Norms section within the insights documentation.

fdm-docs/docs/contributing/01-project-architecture.md (1)

1-26: Documentation content looks good.

The project architecture documentation is well-structured and provides a clear overview of the monorepo structure, including the packages, pnpm workspaces, and turbo build system.

fdm-docs/docs/core-concepts/_category_.json (1)

1-8: Category configuration updated correctly.

The position change and expanded description improve the documentation structure. The JSON is well-formed.

fdm-docs/docs/contributing/02-setting-up-local-environment.md (1)

1-65: Local environment setup documentation is comprehensive.

The guide provides clear step-by-step instructions for setting up a development environment, covering all necessary prerequisites and services.

fdm-docs/docs/insights/fertilizer-application-norms/01-index.md (1)

28-30: Ensure referenced detail pages exist.

This page links to three norm-specific detail pages. These must exist to prevent broken links (same issue noted in the NL 2025 index page).

fdm-docs/docs/core-concepts/08-catalogues.md (1)

1-26: Catalogues documentation is clear and accurate.

The page provides a good overview of the purpose and usage of catalogues in FDM, including the available catalogues and farm-specific selection mechanism.

fdm-docs/docs/fdm-app/_category_.json (1)

1-8: FDM App category configuration is correct.

The category file is well-formed and the referenced introduction page exists at fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md.

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md (1)

13-17: All referenced detail pages exist; links are valid.

Verification confirms that all three referenced markdown files exist at their expected locations:

  • stikstofgebruiksnorm.md
  • fosfaatgebruiksnorm.md
  • dierlijke-mest-gebruiksnorm.md

The relative links in the documentation will work correctly and will not cause Docusaurus build failures due to missing files.

fdm-docs/docs/core-concepts/07-soil-analyses.md (1)

1-35: Documentation content is well-structured and accurate.

The Soil Analyses documentation correctly describes the data model relationships and field purposes. The content aligns with the FDM schema structure and learnings about soil sampling workflows.

fdm-docs/docs/core-concepts/04-cultivations.md (1)

1-34: Documentation accurately reflects the cultivation lifecycle and catalogue relationships.

The three-step lifecycle (starting, harvesting, ending) and catalogue linking patterns are correctly described and align with the FDM data model constraints documented in learnings.

fdm-docs/docs/core-concepts/06-fertilizers.md (1)

1-31: Fertilizer documentation is clear and well-organized.

The distinction between pre-defined and custom fertilizers, along with the application workflow and catalogue benefits, is accurately described and aligns with the FDM data model.

fdm-docs/docs/core-concepts/02-farms.md (1)

1-37: Farm documentation properly describes properties and access control.

The documentation correctly outlines farm properties and the fdm-authz schema relationship for user access management. The reference to the Authorization page at line 23 is appropriate for deeper context.

fdm-docs/docs/core-concepts/01-database-schema.md (3)

212-220: New harvest analysis fields are well-documented.

The addition of fresh yield, dry matter content, crude protein, and related fields to the harvestableAnalyses table provides important agronomic data capture capabilities. The documentation clearly describes each field's purpose and units.

Verify that the new harvest analysis columns (b_lu_yield_fresh, b_lu_yield_bruto, b_lu_tarra, b_lu_dm, b_lu_moist, b_lu_uww, b_lu_cp, b_lu_n_harvestable) are already implemented in the database schema and accessible via fdm-core APIs, given the monorepo coordination pattern mentioned in learnings.


362-362: Table rename improves naming consistency.

Renaming fertilizer_applying to fertilizerApplication aligns with camelCase conventions used elsewhere in the documentation (e.g., soilAnalysis, cultivationStarting). This improves consistency and clarity.


744-744: Custom types documentation enhanced with practical guidance.

The additions of precision loss warnings for numericCasted and SRID/geography casting guidance for geometry types are valuable for developers. These notes help prevent subtle bugs related to JavaScript number limits and geospatial accuracy.

Also applies to: 752-753

Comment thread fdm-docs/docs/core-concepts/10-authorization.md Outdated
Comment thread fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md Outdated
Comment thread fdm-docs/docs/getting-started/01-what-is-fdm.md Outdated
Comment thread fdm-docs/docs/README.md Outdated
Comment thread fdm-docs/docusaurus.config.ts
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
fdm-docs/docs/getting-started/01-what-is-fdm.md (1)

5-5: Fix unfixed spelling error from previous review.

This spelling error was identified in a prior review but remains uncorrected: "barries" should be "barriers".

Apply this diff:

-The Farm Data Model (FDM) is an open-source project designed to standardize and simplify the management of agricultural data. Our mission is to provide a robust and flexible data model that empowers agronomists, developers, and researchers to build powerful and interoperable farm management solutions that lowers the barries to deliver latest agronomic insights to farmers.
+The Farm Data Model (FDM) is an open-source project designed to standardize and simplify the management of agricultural data. Our mission is to provide a robust and flexible data model that empowers agronomists, developers, and researchers to build powerful and interoperable farm management solutions that lower the barriers to deliver latest agronomic insights to farmers.

Note: This also fixes a subject-verb agreement issue ("lowers" → "lower").

fdm-docs/docs/README.md (1)

16-18: ⚠️ CRITICAL: Broken documentation link blocks the build.

Line 18 references ./agronomic-calculations/01-nitrogen-balance.md, which does not exist in the repository. The fdm-docs/docs/agronomic-calculations/ directory is not present, and this broken link will cause the Docusaurus build to fail.

You must either:

  1. Create the missing directory and file (fdm-docs/docs/agronomic-calculations/01-nitrogen-balance.md), or
  2. Remove this section and link, or
  3. Link to an existing page instead.

(Note: The link on line 22 to ./contributing/01-project-architecture.md is valid and verified to exist.)

🧹 Nitpick comments (8)
fdm-docs/docs/insights/01-nitrogen-balance.md (1)

254-260: Refactor output list to reduce successive repetition.

Three consecutive bullet points (lines 258–260) begin with "Detailed breakdown of". Consider restructuring for better readability.

  * Overall farm balance, supply, removal, and total emission (kg N / ha).
  * A list of balances for each field (`NitrogenBalanceFieldNumeric`), which includes:
    * Field ID.
    * Field-specific **N Surplus** (reported as `balance`, in kg N / ha). This is calculated as `N Supply - N Removal - Ammonia Emission`.
-   * Detailed breakdown of supply (total, fertilizers by type, fixation, deposition, mineralization).
-   * Detailed breakdown of removal (total, harvests, residues).
-   * Detailed breakdown of emission (total, plus sub-components for ammonia and nitrate).
+   * Supply breakdown (total, fertilizers by type, fixation, deposition, mineralization).
+   * Removal breakdown (total, harvests, residues).
+   * Emission breakdown (total, plus sub-components for ammonia and nitrate).
fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md (1)

11-11: Minor: Consider concise alternative to "takes into account".

Line 11 uses "takes into account," which is slightly wordy. Consider "considers" as a shorter alternative for improved readability.

fdm-docs/docs/core-concepts/11-organizations.md (1)

33-33: Minor: Simplify wordy phrase for clarity.

The phrase "in conjunction with" can be simplified for better readability.

- This, in conjunction with the organization's inherited roles on farms, collectively determines a user's overall access to data.
+ Combined with the organization's inherited roles on farms, this determines a user's overall access to data.
fdm-docs/docs/core-concepts/08-catalogues.md (1)

5-5: Consider rephrasing to improve conciseness.

The phrase "a variety of agricultural concepts" is somewhat wordy. Consider: "Catalogues are pre-defined, standardized data sets for agricultural concepts."

fdm-docs/docs/core-concepts/05-harvests.md (1)

19-24: Consider varying sentence structure to improve readability.

Lines 21–23 begin consecutive sentences with "For", which makes the prose repetitive. Consider restructuring one or more sentences to vary the opening, e.g.:

- For **silage maize**, a farmer might record the fresh weight yield (`b_lu_yield_fresh`) and the dry matter percentage (`b_lu_dm`).
- For **potatoes**, the gross yield (`b_lu_yield_bruto`), tare percentage (`b_lu_tarra`), and underwater weight (`b_lu_uww`) are common parameters.
- For **cereals**, fresh weight yield (`b_lu_yield_fresh`), moisture content (`b_lu_moist`), and crude protein (`b_lu_cp`) are often measured.
+ **Silage maize** typically requires recording fresh weight yield (`b_lu_yield_fresh`) and dry matter percentage (`b_lu_dm`).
+ **Potatoes** commonly involve measuring gross yield (`b_lu_yield_bruto`), tare percentage (`b_lu_tarra`), and underwater weight (`b_lu_uww`).
+ **Cereals** often need fresh weight yield (`b_lu_yield_fresh`), moisture content (`b_lu_moist`), and crude protein (`b_lu_cp`) measurements.
fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md (1)

35-37: Consider rephrasing to vary bullet description phrasing.

Bullet descriptions starting at line 35–37 use repetitive structure ("A library for...", "A collection of...", "A library for..."). While not a blocker, varying the phrasing would improve readability:

- **@svenvw/fdm-core:** The core Farm Data Model library, providing business logic and data interaction capabilities.
- **@svenvw/fdm-data:** Standardized agricultural catalogues for consistent data entry and reference.
- **@svenvw/fdm-calculator:** A library for performing agronomic calculations.
+ **@svenvw/fdm-core:** Provides core Farm Data Model business logic and database interaction.
+ **@svenvw/fdm-data:** Standardized agricultural catalogues for consistent data entry and reference.
+ **@svenvw/fdm-calculator:** Enables agronomic calculations such as nutrient balance and yield analysis.
fdm-docs/docs/contributing/01-project-architecture.md (1)

22-24: Optional: Strengthen the verb choice in the final sentence.

The phrase "speed up the build process" is common. Consider alternatives like "accelerate," "expedite," or "optimize" for better readability.

Example revision:

- `turbo` is a high-performance build system for JavaScript and TypeScript codebases. It is used to orchestrate the build process for the FDM monorepo, and it provides features such as caching and parallel execution to speed up the build process.
+ `turbo` is a high-performance build system for JavaScript and TypeScript codebases. It is used to orchestrate the build process for the FDM monorepo, and it provides features such as caching and parallel execution to accelerate the build process.
fdm-docs/docs/contributing/02-setting-up-local-environment.md (1)

10-41: Optional: Reduce repetitive phrasing for improved prose variety.

LanguageTool flagged 6 instances of repetitive phrasing ("you will need to," "you need to"). While the instructions are clear, adding variety will improve readability. Consider restructuring some sentences to avoid the repeated modal constructions.

Example revisions:

- * **Node.js:** FDM is a TypeScript and JavaScript project, so you will need to have Node.js installed.
- * **`pnpm`**: FDM uses `pnpm` for package management, so you will need to have it installed.
- * **Git:** FDM is hosted on GitHub, so you will need to have Git installed to clone the repository.
+ * **Node.js:** Install Node.js; FDM is built with TypeScript and JavaScript.
+ * **`pnpm`**: Install `pnpm`; FDM uses it for package management.
+ * **Git:** Install Git to clone the repository from GitHub.
- First, you need to clone the FDM repository from GitHub:
+ To begin, clone the FDM repository from GitHub:
- Next, you need to install the dependencies for all the packages in the monorepo. You can do this by running the following command from the root of the repository:
+ Install dependencies for all packages in the monorepo by running this command from the repository root:
- You will need to create a `.env` file in the `fdm-app` package. You can do this by copying the `.env.example` file:
+ Create a `.env` file in the `fdm-app` package by copying `.env.example`:
- You will then need to fill in the values for the environment variables in the `.env` file.
+ Fill in the environment variable values in your `.env` file.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1da9360 and 2022404.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (27)
  • .vscode/settings.json (1 hunks)
  • fdm-docs/docs/README.md (1 hunks)
  • fdm-docs/docs/contributing/01-project-architecture.md (1 hunks)
  • fdm-docs/docs/contributing/02-setting-up-local-environment.md (1 hunks)
  • fdm-docs/docs/contributing/03-releasing-fdm.md (1 hunks)
  • fdm-docs/docs/core-concepts/01-database-schema.md (41 hunks)
  • fdm-docs/docs/core-concepts/02-farms.md (1 hunks)
  • fdm-docs/docs/core-concepts/03-fields.md (1 hunks)
  • fdm-docs/docs/core-concepts/04-cultivations.md (1 hunks)
  • fdm-docs/docs/core-concepts/05-harvests.md (1 hunks)
  • fdm-docs/docs/core-concepts/06-fertilizers.md (1 hunks)
  • fdm-docs/docs/core-concepts/07-soil-analyses.md (1 hunks)
  • fdm-docs/docs/core-concepts/08-catalogues.md (1 hunks)
  • fdm-docs/docs/core-concepts/09-authentication.md (1 hunks)
  • fdm-docs/docs/core-concepts/10-authorization.md (1 hunks)
  • fdm-docs/docs/core-concepts/11-organizations.md (1 hunks)
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md (1 hunks)
  • fdm-docs/docs/getting-started/01-what-is-fdm.md (1 hunks)
  • fdm-docs/docs/getting-started/02-the-asset-action-model.md (1 hunks)
  • fdm-docs/docs/getting-started/03-quick-start-guide.md (1 hunks)
  • fdm-docs/docs/insights/01-nitrogen-balance.md (8 hunks)
  • fdm-docs/docs/insights/fertilizer-application-norms/01-index.md (1 hunks)
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md (1 hunks)
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/dierlijke-mest-gebruiksnorm.md (3 hunks)
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/fosfaatgebruiksnorm.md (1 hunks)
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/stikstofgebruiksnorm.md (2 hunks)
  • fdm-docs/package.json (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .vscode/settings.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • fdm-docs/package.json
  • fdm-docs/docs/getting-started/03-quick-start-guide.md
  • fdm-docs/docs/contributing/03-releasing-fdm.md
  • fdm-docs/docs/core-concepts/09-authentication.md
  • fdm-docs/docs/core-concepts/02-farms.md
  • fdm-docs/docs/core-concepts/07-soil-analyses.md
  • fdm-docs/docs/getting-started/02-the-asset-action-model.md
  • fdm-docs/docs/core-concepts/04-cultivations.md
  • fdm-docs/docs/core-concepts/10-authorization.md
🧰 Additional context used
🧠 Learnings (38)
📓 Common learnings
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 279
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.norms.tsx:277-283
Timestamp: 2025-09-26T08:34:50.413Z
Learning: In the fdm project, fdm-core and fdm-app are updated together as part of a monorepo structure, which eliminates legacy data concerns when new fields like b_isproductive are introduced. Both packages are synchronized, so there's no need for defensive coding against undefined values for newly introduced database fields.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 0
File: :0-0
Timestamp: 2025-08-13T10:33:05.313Z
Learning: In the fdm project, fdm-calculator integration for new features like b_lu_variety is handled in separate updates from the core data model changes. When fdm-core functions are updated to support new fields, fdm-calculator can consume these enhanced APIs without requiring changes in the same PR that introduces the core functionality.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 88
File: fdm-core/src/cultivation.ts:246-246
Timestamp: 2025-03-04T11:09:08.169Z
Learning: In the FDM codebase, the `fdm` parameter should be documented as "The FDM instance providing the connection to the database. The instance can be created with {link createFdmServer}." in JSDoc comments.
📚 Learning: 2025-09-26T08:34:50.413Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 279
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.norms.tsx:277-283
Timestamp: 2025-09-26T08:34:50.413Z
Learning: In the fdm project, fdm-core and fdm-app are updated together as part of a monorepo structure, which eliminates legacy data concerns when new fields like b_isproductive are introduced. Both packages are synchronized, so there's no need for defensive coding against undefined values for newly introduced database fields.

Applied to files:

  • fdm-docs/docs/contributing/01-project-architecture.md
  • fdm-docs/docs/core-concepts/03-fields.md
  • fdm-docs/docs/README.md
  • fdm-docs/docs/contributing/02-setting-up-local-environment.md
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
📚 Learning: 2025-04-18T14:20:40.975Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:70-76
Timestamp: 2025-04-18T14:20:40.975Z
Learning: The schema defined in fdm-core/src/db/schema-authn.ts follows better-auth's structure and requirements. While the schema is defined in the application code, modifications to it should maintain compatibility with better-auth's expectations.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-04-18T14:20:40.975Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:70-76
Timestamp: 2025-04-18T14:20:40.975Z
Learning: The organization schema in fdm-core/src/db/schema-authn.ts is managed by better-auth, and modifications to field constraints (like making the slug field non-nullable) should maintain compatibility with better-auth's expectations, even if application code assumes non-null values.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2025-04-18T14:18:44.350Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:69-76
Timestamp: 2025-04-18T14:18:44.350Z
Learning: The authentication schema (fdm-authn) is based on better-auth's schema structure, which does not include `updatedAt` fields for tables like `organization`.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2025-01-09T16:06:08.547Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: .changeset/yellow-sheep-wash.md:1-5
Timestamp: 2025-01-09T16:06:08.547Z
Learning: The `b_sector` column has been removed from the farms table and replaced with `b_businessid_farm`, `b_address_farm`, and `b_postalcode_farm` columns for better business information management.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: A comprehensive farm layout system has been created in `components/custom/farm-layouts/` with `BaseFarmLayout` and `FarmSidebarLayout` components. The system supports both simple and sidebar-based layouts while maintaining consistent header and farm selection functionality across all farm routes.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
📚 Learning: 2025-02-13T08:28:00.183Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 71
File: fdm-core/src/cultivation.ts:572-597
Timestamp: 2025-02-13T08:28:00.183Z
Learning: In the FDM database schema, `b_id_harvesting` is a primary key in the `cultivationHarvesting` table, ensuring no duplicate harvest entries can exist. Therefore, duplicate checking is not needed when processing harvest records from database queries.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
  • fdm-docs/docs/core-concepts/05-harvests.md
📚 Learning: 2025-01-31T15:05:14.310Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 67
File: fdm-app/app/routes/farm.create.$b_id_farm.fields.$b_id.tsx:601-610
Timestamp: 2025-01-31T15:05:14.310Z
Learning: When using `updateField` from fdm-core, all 8 parameters must be provided in order: fdm, b_id, b_name, b_geometry, b_area, b_id_source, b_id_farm, and b_id_farm_source.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
  • fdm-docs/docs/core-concepts/03-fields.md
📚 Learning: 2025-01-23T15:18:57.212Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 49
File: fdm-core/src/db/schema.ts:407-426
Timestamp: 2025-01-23T15:18:57.212Z
Learning: In the farm data model, each cultivation (b_lu) can have only one termination date but can have multiple harvest dates. This is enforced through the database schema where cultivationTerminating uses b_lu as primary key while cultivationHarvesting uses a composite primary key of b_id_harvestable and b_lu.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
  • fdm-docs/docs/core-concepts/05-harvests.md
📚 Learning: 2025-01-31T15:05:14.310Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 67
File: fdm-app/app/routes/farm.create.$b_id_farm.fields.$b_id.tsx:601-610
Timestamp: 2025-01-31T15:05:14.310Z
Learning: The `updateField` function in fdm-core requires 8 parameters: fdm, b_id (required), and 6 optional parameters (b_name, b_id_source, b_geometry, b_acquiring_date, b_acquiring_method, b_discarding_date).

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
  • fdm-docs/docs/core-concepts/03-fields.md
📚 Learning: 2025-01-24T11:39:57.805Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 49
File: fdm-core/src/cultivation.ts:625-671
Timestamp: 2025-01-24T11:39:57.805Z
Learning: Every cultivation has an associated `cultivationTerminating` record created by `addCultivation`, with `b_terminate_date` initially set to null. Therefore, `updateCultivation` can safely assume the record exists and only needs to handle updates.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-08-11T12:14:28.354Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 233
File: fdm-core/src/db/schema.ts:370-0
Timestamp: 2025-08-11T12:14:28.354Z
Learning: In the FDM database schema, the field `b_lu_rest_oravib` in the `cultivations_catalogue` table is intentionally nullable (can be undefined). When undefined, it should be treated as `false` in the UI layer. This allows distinguishing between "explicitly set to false" and "not set" at the database level while providing simplified boolean logic in the UI.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
📚 Learning: 2025-07-31T11:38:50.661Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 194
File: fdm-core/src/harvest.ts:488-644
Timestamp: 2025-07-31T11:38:50.661Z
Learning: The validation logic in updateHarvest is intentionally different from checkHarvestDateCompability because updateHarvest is for updating existing harvests while checkHarvestDateCompability is for inserting new harvests. The insertion function includes checks that don't apply to updates, such as verifying no harvest already exists for "once" harvestable cultivations.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
  • fdm-docs/docs/core-concepts/05-harvests.md
📚 Learning: 2025-09-23T12:29:34.184Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:160-163
Timestamp: 2025-09-23T12:29:34.184Z
Learning: In the FDM application, the fertilizer application route intentionally uses `${calendar}/field/fertilizer` instead of the originally planned `/farm/{farmId}/add/fertilizer` structure. This design decision prioritizes starting from the field list view to provide better field selection workflow before applying fertilizer, rather than direct dashboard-to-action navigation.

Applied to files:

  • fdm-docs/docs/core-concepts/01-database-schema.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
📚 Learning: 2025-09-23T12:27:07.391Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:151-204
Timestamp: 2025-09-23T12:27:07.391Z
Learning: In the FDM application, field overview functionality is implemented as a dedicated page accessible via `farm/{farmId}/{calendar}/field` rather than as a direct listing on the dashboard. The dashboard includes a "Perceelsoverzicht" quick action card that provides navigation to this comprehensive field management interface.

Applied to files:

  • fdm-docs/docs/core-concepts/03-fields.md
  • fdm-docs/docs/README.md
  • fdm-docs/docs/insights/fertilizer-application-norms/01-index.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/dierlijke-mest-gebruiksnorm.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
📚 Learning: 2025-01-23T15:17:23.027Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 49
File: fdm-app/app/routes/farm.create.$b_id_farm.atlas.tsx:208-208
Timestamp: 2025-01-23T15:17:23.027Z
Learning: The `addField` function in fdm-core should verify field creation within the same transaction by checking the existence of the field and all its required relations (field data, acquiring info, geometry) before resolving its promise.

Applied to files:

  • fdm-docs/docs/core-concepts/03-fields.md
📚 Learning: 2025-09-23T12:37:58.711Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.field._index.tsx:113-148
Timestamp: 2025-09-23T12:37:58.711Z
Learning: In the FDM application, the current field data fetching implementation using Promise.all with individual API calls (getCultivations, getFertilizerApplications, getCurrentSoilData) performs acceptably even with farms containing 90+ fields. No performance issues have been observed in practice with this approach.

Applied to files:

  • fdm-docs/docs/core-concepts/03-fields.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
📚 Learning: 2025-08-13T10:33:05.313Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 0
File: :0-0
Timestamp: 2025-08-13T10:33:05.313Z
Learning: In the fdm project, fdm-calculator integration for new features like b_lu_variety is handled in separate updates from the core data model changes. When fdm-core functions are updated to support new fields, fdm-calculator can consume these enhanced APIs without requiring changes in the same PR that introduces the core functionality.

Applied to files:

  • fdm-docs/docs/README.md
  • fdm-docs/docs/insights/fertilizer-application-norms/01-index.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
📚 Learning: 2025-07-21T12:06:07.070Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 156
File: fdm-calculator/src/norms/nl/2025/stikstofgebruiksnorm.ts:295-303
Timestamp: 2025-07-21T12:06:07.070Z
Learning: Functions in the fdm-calculator with "NL2025" in their names are specifically designed for Netherlands 2025 agricultural norms calculation and hardcoded 2025 dates are appropriate in this context, as different years would have separate calculation modules.

Applied to files:

  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/fosfaatgebruiksnorm.md
  • fdm-docs/docs/insights/fertilizer-application-norms/01-index.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/dierlijke-mest-gebruiksnorm.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/stikstofgebruiksnorm.md
📚 Learning: 2025-10-22T08:09:17.727Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 285
File: fdm-calculator/src/norms/nl/2025/filling/fosfaatgebruiksnorm.ts:6-9
Timestamp: 2025-10-22T08:09:17.727Z
Learning: In fdm-calculator for NL 2025 phosphate stimulus ("Stimuleren organische stofrijke meststoffen"), the correct RVO mestcode groupings are: 25% discount group includes ["111", "112"] (Compost and Zeer schone compost), and the 75% discount group for organic farms includes ["40"] (Varkens - Vaste mest). The 75% base group includes ["110", "10", "61", "25", "56"].

Applied to files:

  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/fosfaatgebruiksnorm.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/dierlijke-mest-gebruiksnorm.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/stikstofgebruiksnorm.md
📚 Learning: 2025-09-17T08:56:42.489Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 267
File: fdm-calculator/src/balance/nitrogen/emission/ammonia/residues.ts:100-106
Timestamp: 2025-09-17T08:56:42.489Z
Learning: In the fdm-calculator, b_lu_hi (harvest index) represents the ratio of harvested yield to total biomass in agricultural calculations. This value should naturally be non-negative and typically between 0 and 1. Negative values are not expected or physically meaningful in this agricultural domain context.

Applied to files:

  • fdm-docs/docs/core-concepts/05-harvests.md
📚 Learning: 2025-04-04T14:27:39.518Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 116
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx:111-154
Timestamp: 2025-04-04T14:27:39.518Z
Learning: In the FDM application, cultivation retrieval logic should be centralized in utility functions rather than duplicated across loader and action functions to improve maintainability and ensure consistent behavior.

Applied to files:

  • fdm-docs/docs/core-concepts/05-harvests.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
📚 Learning: 2025-02-13T08:35:59.306Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 71
File: fdm-app/app/routes/farm.$b_id_farm.field.$b_id.cultivation.$b_lu.harvest.$b_id_harvesting.tsx:114-124
Timestamp: 2025-02-13T08:35:59.306Z
Learning: The HarvestForm component in fdm-app expects undefined (not 0) for b_lu_yield when no yield information is available, as 0 would incorrectly imply that yield data exists.

Applied to files:

  • fdm-docs/docs/core-concepts/05-harvests.md
📚 Learning: 2025-03-04T10:56:35.540Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 88
File: fdm-calculator/src/doses/calculate-dose.ts:18-18
Timestamp: 2025-03-04T10:56:35.540Z
Learning: In the FDM calculator, fertilizer nutrient rates (p_n_rt, p_p_rt, p_k_rt) are measured in g/kg, and are converted to fractions by dividing by 10 during dose calculations.

Applied to files:

  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/dierlijke-mest-gebruiksnorm.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
  • fdm-docs/docs/insights/01-nitrogen-balance.md
  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/stikstofgebruiksnorm.md
📚 Learning: 2025-08-14T14:31:55.384Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 236
File: fdm-calculator/src/balance/nitrogen/index.ts:173-0
Timestamp: 2025-08-14T14:31:55.384Z
Learning: In nitrogen balance calculations for agricultural systems, the balance should only include ammonia emissions (emission.ammonia.total) and should not include nitrate leaching from the emission calculation. The nitrate component (emission.nitrate) should be excluded from the balance formula.

Applied to files:

  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/dierlijke-mest-gebruiksnorm.md
  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-02-14T09:56:37.606Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 75
File: fdm-app/app/routes/farm.$b_id_farm.field.$b_id.fertilizer.tsx:68-71
Timestamp: 2025-02-14T09:56:37.606Z
Learning: The `calculateDose` function in `svenvw/fdm-calculator` is a synchronous function that includes built-in validation for negative application amounts and nutrient rates.

Applied to files:

  • fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/dierlijke-mest-gebruiksnorm.md
📚 Learning: 2025-09-24T14:02:48.574Z
Learnt from: BoraIneviNMI
Repo: SvenVw/fdm PR: 272
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.fertilizer.manage.new.$p_id.tsx:85-101
Timestamp: 2025-09-24T14:02:48.574Z
Learning: The getFertilizer function in svenvw/fdm-core does not perform authorization checks, unlike getFertilizers which includes a checkPermission call to verify farm access. This means getFertilizer(fdm, p_id) can potentially return fertilizer details for any fertilizer ID without validating user permissions.

Applied to files:

  • fdm-docs/docs/core-concepts/06-fertilizers.md
📚 Learning: 2025-09-24T14:02:48.574Z
Learnt from: BoraIneviNMI
Repo: SvenVw/fdm PR: 272
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.fertilizer.manage.new.$p_id.tsx:85-101
Timestamp: 2025-09-24T14:02:48.574Z
Learning: Both getFertilizer and getFertilizers functions in svenvw/fdm-core perform authorization checks using the user's principal_id to verify farm access before returning fertilizer data.

Applied to files:

  • fdm-docs/docs/core-concepts/06-fertilizers.md
📚 Learning: 2025-04-18T14:51:48.033Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/organization.ts:300-339
Timestamp: 2025-04-18T14:51:48.033Z
Learning: The `getUsersInOrganization` function in fdm-core/src/organization.ts will be updated in commit b17fac16c9e5a0de56d0346e712b2ce966d305d5 to include id and email fields, which are necessary for subsequent role updates and user removal operations.

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2025-04-18T14:51:48.033Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/organization.ts:300-339
Timestamp: 2025-04-18T14:51:48.033Z
Learning: The `getUsersInOrganization` function in fdm-core/src/organization.ts needs to include user ID and email fields to support role updates and user removal operations, which will be fixed in a future commit (b17fac16c9e5a0de56d0346e712b2ce966d305d5).

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2025-04-18T14:51:48.033Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/organization.ts:300-339
Timestamp: 2025-04-18T14:51:48.033Z
Learning: The `getUsersInOrganization` function in fdm-core/src/organization.ts needed to include id and email fields for users, which was fixed in commit b17fac16c9e5a0de56d0346e712b2ce966d305d5.

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2025-04-18T14:51:48.033Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/organization.ts:300-339
Timestamp: 2025-04-18T14:51:48.033Z
Learning: The `getUsersInOrganization` function in fdm-core/src/organization.ts currently returns only firstname, surname, image, and role, but needs to include id and email fields to support downstream operations like role updates and user removal. This will be fixed in commit b17fac16c9e5a0de56d0346e712b2ce966d305d5.

Applied to files:

  • fdm-docs/docs/core-concepts/11-organizations.md
📚 Learning: 2024-11-25T12:42:32.783Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 6
File: fdm-app/vite.config.ts:5-9
Timestamp: 2024-11-25T12:42:32.783Z
Learning: In the `fdm-app` project, SvenVw is preparing for migration to Remix v3 and may include type declarations or configurations for v3 features in advance, such as in `vite.config.ts`.

Applied to files:

  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
📚 Learning: 2025-03-04T11:09:08.169Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 88
File: fdm-core/src/cultivation.ts:246-246
Timestamp: 2025-03-04T11:09:08.169Z
Learning: In the FDM codebase, the `fdm` parameter should be documented as "The FDM instance providing the connection to the database. The instance can be created with {link createFdmServer}." in JSDoc comments.

Applied to files:

  • fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
📚 Learning: 2025-05-26T10:32:15.538Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 134
File: fdm-calculator/src/balance/nitrogen/index.ts:236-238
Timestamp: 2025-05-26T10:32:15.538Z
Learning: In nitrogen balance calculations for agricultural systems, removal and volatilization are calculated as negative values by definition since they represent nitrogen losses from the system. The balance calculation uses addition (.add()) for all components because removal and volatilization are already negative, so adding them effectively subtracts the losses from the supply.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-05-26T10:32:00.674Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 134
File: fdm-calculator/src/balance/nitrogen/index.ts:162-168
Timestamp: 2025-05-26T10:32:00.674Z
Learning: In the nitrogen balance calculation system (fdm-calculator), removal and volatilization values are negative by definition. This means the balance calculation using supply.total.add(removal.total).add(volatilization.total) is correct, as it effectively computes supply - |removal| - |volatilization|.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-05-27T19:56:48.556Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 143
File: fdm-app/app/components/custom/balance/nitrogen-chart.tsx:73-85
Timestamp: 2025-05-27T19:56:48.556Z
Learning: In nitrogen balance charts, supply should be in a separate stack from removal and emission. Supply represents nitrogen inputs while removal and emission represent different types of nitrogen outputs, so they should be visually grouped differently using different stackId values.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
🪛 GitHub Actions: Test deployment of fdm-docs
fdm-docs/docs/contributing/01-project-architecture.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/core-concepts/01-database-schema.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/core-concepts/03-fields.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/README.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[warning] 18-18: Markdown link with URL ./agronomic-calculations/01-nitrogen-balance.md couldn't be resolved.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/fosfaatgebruiksnorm.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/core-concepts/05-harvests.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/insights/fertilizer-application-norms/01-index.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/dierlijke-mest-gebruiksnorm.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/core-concepts/06-fertilizers.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/contributing/02-setting-up-local-environment.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/core-concepts/08-catalogues.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/core-concepts/11-organizations.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/getting-started/01-what-is-fdm.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/insights/01-nitrogen-balance.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/stikstofgebruiksnorm.md

[error] 1-1: Docusaurus build failed due to unknown option 'docsPath' in config (also mentions 'numberPrefixParser' and 'sidebar').


[error] 1-1: Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar. Unable to build the website.


[error] 1-1: Build failed: Unable to build website for locale en. Docusaurus reported broken links and configuration errors.

🪛 LanguageTool
fdm-docs/docs/contributing/01-project-architecture.md

[style] ~24-~24: Consider using a different verb to strengthen your wording.
Context: ...ch as caching and parallel execution to speed up the build process.

(SPEED_UP_ACCELERATE)

fdm-docs/docs/core-concepts/05-harvests.md

[style] ~22-~22: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he dry matter percentage (b_lu_dm). - For potatoes, the gross yield (`b_lu_yi...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~23-~23: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...t (b_lu_uww) are common parameters. - For cereals, fresh weight yield (`b_lu_...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

fdm-docs/docs/contributing/02-setting-up-local-environment.md

[style] ~13-~13: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...pm` for package management, so you will need to have it installed. * Git: FDM is ho...

(REP_NEED_TO_VB)


[style] ~14-~14: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...** FDM is hosted on GitHub, so you will need to have Git installed to clone the reposit...

(REP_NEED_TO_VB)


[style] ~19-~19: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... ## Cloning the Repository First, you need to clone the FDM repository from GitHub: ...

(REP_NEED_TO_VB)


[style] ~27-~27: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... ## Installing Dependencies Next, you need to install the dependencies for all the pa...

(REP_NEED_TO_VB)


[style] ~35-~35: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... manage environment variables. You will need to create a .env file in the fdm-app p...

(REP_NEED_TO_VB)


[style] ~41-~41: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...example fdm-app/.env ``` You will then need to fill in the values for the environment ...

(REP_NEED_TO_VB)

fdm-docs/docs/core-concepts/08-catalogues.md

[style] ~5-~5: Consider using a more concise synonym.
Context: ...pre-defined, standardized data sets for a variety of agricultural concepts. These data sets ...

(A_VARIETY_OF)

fdm-docs/docs/core-concepts/11-organizations.md

[style] ~33-~33: ‘in conjunction with’ might be wordy. Consider a shorter alternative.
Context: ... within that organization itself. This, in conjunction with the organization's inherited roles on f...

(EN_WORDINESS_PREMIUM_IN_CONJUNCTION_WITH)

fdm-docs/docs/fdm-app/01-introduction-to-fdm-app.md

[style] ~37-~37: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...sistent data entry and reference. * @svenvw/fdm-calculator: A library for perform...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

fdm-docs/docs/getting-started/01-what-is-fdm.md

[grammar] ~5-~5: Ensure spelling is correct
Context: ...rm management solutions that lowers the barries to deliver latest agronomic insights to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

fdm-docs/docs/insights/01-nitrogen-balance.md

[style] ~260-~260: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...emoval (total, harvests, residues). * Detailed breakdown of emission (total, plus sub-...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md

[style] ~11-~11: ‘takes into account’ might be wordy. Consider a shorter alternative.
Context: ... be applied to a field. The calculation takes into account the main crop, the geographical locatio...

(EN_WORDINESS_PREMIUM_TAKES_INTO_ACCOUNT)

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/stikstofgebruiksnorm.md

[grammar] ~22-~22: Ensure spelling is correct
Context: ...oked up in the official RVO Table 2 (or Tabel 2g for NV-gebieden). 4. **Apply Specifi...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~35-~35: Ensure spelling is correct
Context: ...-data.ts**: Contains the data from RVO Tabel 2 and Tabel 2g. * **input.ts`**: Defin...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~35-~35: Ensure spelling is correct
Context: ... Contains the data from RVO Tabel 2 and Tabel 2g. * input.ts: Defines the requi...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (17)
fdm-docs/docs/insights/01-nitrogen-balance.md (1)

1-261: I need to check the sidebar configuration to verify that the new Insights section and nitrogen-balance file are correctly referenced.

The configuration and structural verification show that the original concerns in the review comment are not substantiated by the actual codebase state. The numberPrefixParser is a known, documented Docusaurus config option, and Docusaurus v2 uses path (not docsPath) to configure the docs folder location. The actual configuration in the PR uses standard v2/v3 options correctly.

No Docusaurus build configuration issues detected.

The Insights category is properly structured with valid _category_.json, the nitrogen-balance markdown file is accessible, and the docusaurus.config.ts uses recognized configuration keys (path, sidebarPath, routeBasePath). The sidebar configuration shown is correctly scoped to the typedoc plugin for API documentation. No evidence of the mentioned "unknown config options" causing build failures appears in the configuration.

fdm-docs/docs/core-concepts/03-fields.md (3)

1-3: ✓ Frontmatter and content structure are appropriate.

The YAML frontmatter is clean and the markdown structure with clear headings and sections is well-organized. The content aligns with how other core-concepts pages should be structured.


5-34: Documentation content is clear and technically accurate.

The explanation of Fields in FDM is well-written:

  • Geometric properties clearly explained with WGS 84 reference
  • Properties table is comprehensive and accurate
  • Field-Farm relationship via fieldAcquiring is correctly documented
  • Role in activity tracking accurately describes direct and indirect links

The interconnected data model description properly emphasizes traceability and compliance use cases. This content aligns with the learnings about field operations in the FDM codebase.


1-35: Docusaurus configuration issue requires manual verification—unable to confirm claims in this environment.

The original review asserts that the Docusaurus build is failing due to "Unknown option(s) in Docusaurus config: docsPath, numberPrefixParser, sidebar," but I cannot access the fdm-docs/docosaurus.config.ts file to verify these claims directly.

The documentation content itself (lines 1-35 of 03-fields.md) is well-structured and appropriate. However, before this PR can be approved or merged, please manually verify:

  1. Confirm the actual build error: Run pnpm run build or pnpm run build:api && docosaurus build in the fdm-docs directory and provide the full error output
  2. Review the configuration options: Check fdm-docs/docosaurus.config.ts to confirm whether docsPath, numberPrefixParser, and sidebar are present and valid for Docusaurus 3.9.2 (the version specified in fdm-docs/package.json)
  3. Verify Docosaurus compatibility: Consult the Docosaurus 3.9.2 documentation to determine if these options are deprecated or unsupported
fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/dierlijke-mest-gebruiksnorm.md (2)

16-31: Content formatting improvements are sound.

The formatting changes (removing trailing colons, converting to bold headings) improve visual hierarchy and readability. All fertilizer norm values (170, 190, 200 kg N/ha) and regulatory requirements remain accurate and unchanged.


1-70: Review comment is incorrect and should be disregarded.

The Docusaurus configuration at fdm-docs/docusaurus.config.ts is valid for Docusaurus 3.9.2. The three reported invalid options do not exist:

  • docsPath — not found (config correctly uses sidebarPath)
  • numberPrefixParser — not found anywhere in the codebase
  • sidebar — only appears in the typedoc plugin configuration, where it is a valid option

The config file uses correct Docusaurus 3.x syntax with proper presets, plugins, and theme configuration. The file under review (dierlijke-mest-gebruiksnorm.md) contains only markdown formatting improvements and is unaffected by any configuration issues.

Likely an incorrect or invalid review comment.

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/stikstofgebruiksnorm.md (1)

16-36: Content accuracy and formatting are solid.

The calculation steps and data source references are well-organized and technically accurate. All regulatory requirements (catch crop dates, nitrogen reduction schedules, efficiency coefficients) are correctly preserved.

Note: The LanguageTool grammar checks flagging "Tabel" are false positives—this is the correct Dutch official term from RVO (Rijksdienst voor Ondernemend Nederland), not an English spelling error.

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/fosfaatgebruiksnorm.md (1)

1-120: New phosphate norms documentation is comprehensive and technically accurate.

The new documentation clearly explains the 2025 Dutch phosphate usage norms with proper structure:

  • The phosphate class table (lines 22–28) correctly reflects official RVO thresholds
  • Differentiated percentages (25%, 75%, 100%) align with the 7th Action Programme Nitraatrichtlijn
  • Minimum 20 kg P₂O₅/ha condition is properly documented
  • Calculation examples (lines 79–106) are mathematically correct

The content structure supports user understanding of both norm calculation and filling logic. References to fdm-calculator implementation files are accurate.

fdm-docs/docs/insights/fertilizer-application-norms/nl/2025/01-index.md (1)

1-39: Index structure and content are well-organized and comprehensive.

The index appropriately consolidates the three NL 2025 norms with clear navigation. The required data section is well-structured and covers all inputs needed for norm calculations. The disclaimer admonition provides appropriate legal guidance to users.

fdm-docs/docs/insights/fertilizer-application-norms/01-index.md (1)

1-34: Category-level overview is well-structured and extensible.

The top-level index appropriately documents the norm calculation system's design philosophy and extensibility. The Region/Year structure (lines 16–20) clearly supports future additions of regional rule sets. Links to NL 2025 implementation are correct, and the content provides good context for users navigating the norms category.

fdm-docs/docs/core-concepts/11-organizations.md (2)

7-13: Verify schema documentation aligns with actual implementation.

The schema section references the organization, member, and invitation tables from the fdm-authn schema. Per the retrieved learnings, this schema is based on the better-auth library. Ensure that the documented fields and structure (id, name, slug, logo for organization; userId, organizationId, role for member) accurately reflect the actual schema implementation, particularly regarding nullable fields like slug.

You may want to verify this against fdm-core/src/db/schema-authn.ts to ensure the documentation is current and accurate.


1-35: ****

The review comment makes incorrect claims about the codebase. The actual fdm-docs/docusaurus.config.ts uses valid Docusaurus 3.9.2 configuration syntax. The mentioned options (docsPath, numberPrefixParser, sidebar as root-level config) do not appear in the configuration file, and the property names used (sidebarPath) are correct for this Docusaurus version. Additionally, the documentation file being reviewed (11-organizations.md) is unrelated to configuration and cannot cause build failures. The review appears to reference non-existent configuration errors.

Likely an incorrect or invalid review comment.

fdm-docs/docs/core-concepts/01-database-schema.md (2)

7-13: Excellent addition of ORM context.

The new explanation of ORM (lines 9–13) clearly defines the concept and references Drizzle ORM, making the schema documentation more accessible to developers unfamiliar with ORM patterns.


232-240: Well-documented harvest field additions.

The new harvest-related fields in harvestableAnalyses (lines 232–240) align perfectly with the detailed harvest documentation in 05-harvests.md and provide clear descriptions of each measurement parameter.

fdm-docs/docs/contributing/02-setting-up-local-environment.md (2)

1-63: I'll verify the technical claims in the documentation to assess whether the content is accurate despite the referenced pipeline failure.

Content is factually accurate; Docusaurus pipeline failure prevents full validation.

The technical claims in the setup guide have been verified:

  • Port 5173 is the default port for Vite development server
  • The NMI API documentation is available at api.nmi-agro.nl
  • All setup instructions (Node.js, pnpm, Git, Docker, .env files) are correctly documented

However, the referenced Docusaurus build failure prevents a complete documentation pipeline validation. The repetitive phrasing noted in the scratchpad ("you will need to", "you need to") is a minor stylistic concern that could be improved but is not a blocker for accuracy.


52-53: I need to conduct more targeted searches to verify this API. Let me try a more specific approach.

Excellent! The searches have revealed substantive information. Let me verify the current status and maintenance of this API with one more targeted search.

API link verified and current.

The NMI API documentation at https://api.nmi-agro.nl/docs is confirmed as active, and the Nutriënten Management Instituut (NMI) is an active knowledge and advisory bureau that translates soil expertise into practical guidance. The organization remains actively engaged in recent initiatives as of 2025, indicating the API remains maintained. No changes to the documentation link or resource status are needed.

fdm-docs/docs/contributing/01-project-architecture.md (1)

1-24: The review comment is incorrect and based on non-existent configuration errors.

Verification reveals:

  • docsPath and numberPrefixParser do not appear in docusaurus.config.ts
  • sidebar is correctly nested only within the typedoc plugin options, which is the proper location
  • The configuration structure is valid and follows Docusaurus standards
  • _category_.json is properly set up in fdm-docs/docs/contributing/ with correct metadata
  • The documentation file 01-project-architecture.md has accurate content and proper structure

No critical blocker exists. The file and configuration are in good standing.

Likely an incorrect or invalid review comment.

Comment thread fdm-docs/docs/core-concepts/06-fertilizers.md Outdated
Comment thread fdm-docs/docs/insights/01-nitrogen-balance.md Outdated
SvenVw and others added 3 commits November 19, 2025 18:17
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Sven Verweij <37927107+SvenVw@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Sven Verweij <37927107+SvenVw@users.noreply.github.com>
@SvenVw SvenVw requested a review from gerardhros November 19, 2025 17:20
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
fdm-docs/docs/insights/01-nitrogen-balance.md (1)

253-260: Address repetitive sentence structure in output section.

The output section begins three successive bullet points with "Detailed breakdown of..." Consider varying the phrasing for better readability.

- * Overall farm balance, supply, removal, and total emission (kg N / ha).
- * A list of balances for each field (`NitrogenBalanceFieldNumeric`), which includes:
-   * Field ID.
-   * Field-specific **N Surplus** (reported as `balance`, in kg N / ha). This is calculated as `N Supply - N Removal - Ammonia Emission`.
-   * Detailed breakdown of supply (total, fertilizers by type, fixation, deposition, mineralization).
-   * Detailed breakdown of removal (total, harvests, residues).
-   * Detailed breakdown of emission (total, plus sub-components for ammonia and nitrate).

+ * Overall farm balance, supply, removal, and total emission (kg N / ha).
+ * A list of balances for each field (`NitrogenBalanceFieldNumeric`), which includes:
+   * Field ID.
+   * Field-specific **N Surplus** (reported as `balance`, in kg N / ha). This is calculated as `N Supply - N Removal - Ammonia Emission`.
+   * Supply breakdown (total, fertilizers by type, fixation, deposition, mineralization).
+   * Removal breakdown (total, harvests, residues).
+   * Emission breakdown (total, plus sub-components for ammonia and nitrate).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2022404 and 6a70663.

📒 Files selected for processing (4)
  • fdm-docs/docs/README.md (1 hunks)
  • fdm-docs/docs/core-concepts/06-fertilizers.md (1 hunks)
  • fdm-docs/docs/getting-started/01-what-is-fdm.md (1 hunks)
  • fdm-docs/docs/insights/01-nitrogen-balance.md (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • fdm-docs/docs/getting-started/01-what-is-fdm.md
  • fdm-docs/docs/core-concepts/06-fertilizers.md
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 279
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.norms.tsx:277-283
Timestamp: 2025-09-26T08:34:50.413Z
Learning: In the fdm project, fdm-core and fdm-app are updated together as part of a monorepo structure, which eliminates legacy data concerns when new fields like b_isproductive are introduced. Both packages are synchronized, so there's no need for defensive coding against undefined values for newly introduced database fields.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 0
File: :0-0
Timestamp: 2025-08-13T10:33:05.313Z
Learning: In the fdm project, fdm-calculator integration for new features like b_lu_variety is handled in separate updates from the core data model changes. When fdm-core functions are updated to support new fields, fdm-calculator can consume these enhanced APIs without requiring changes in the same PR that introduces the core functionality.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 88
File: fdm-core/src/cultivation.ts:246-246
Timestamp: 2025-03-04T11:09:08.169Z
Learning: In the FDM codebase, the `fdm` parameter should be documented as "The FDM instance providing the connection to the database. The instance can be created with {link createFdmServer}." in JSDoc comments.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:70-76
Timestamp: 2025-04-18T14:20:40.975Z
Learning: The organization schema in fdm-core/src/db/schema-authn.ts is managed by better-auth, and modifications to field constraints (like making the slug field non-nullable) should maintain compatibility with better-auth's expectations, even if application code assumes non-null values.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 6
File: fdm-app/vite.config.ts:5-9
Timestamp: 2024-11-25T12:42:32.783Z
Learning: In the `fdm-app` project, SvenVw is preparing for migration to Remix v3 and may include type declarations or configurations for v3 features in advance, such as in `vite.config.ts`.
📚 Learning: 2025-09-26T08:34:50.413Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 279
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.norms.tsx:277-283
Timestamp: 2025-09-26T08:34:50.413Z
Learning: In the fdm project, fdm-core and fdm-app are updated together as part of a monorepo structure, which eliminates legacy data concerns when new fields like b_isproductive are introduced. Both packages are synchronized, so there's no need for defensive coding against undefined values for newly introduced database fields.

Applied to files:

  • fdm-docs/docs/README.md
📚 Learning: 2025-08-13T10:33:05.313Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 0
File: :0-0
Timestamp: 2025-08-13T10:33:05.313Z
Learning: In the fdm project, fdm-calculator integration for new features like b_lu_variety is handled in separate updates from the core data model changes. When fdm-core functions are updated to support new fields, fdm-calculator can consume these enhanced APIs without requiring changes in the same PR that introduces the core functionality.

Applied to files:

  • fdm-docs/docs/README.md
📚 Learning: 2025-09-23T12:27:07.391Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:151-204
Timestamp: 2025-09-23T12:27:07.391Z
Learning: In the FDM application, field overview functionality is implemented as a dedicated page accessible via `farm/{farmId}/{calendar}/field` rather than as a direct listing on the dashboard. The dashboard includes a "Perceelsoverzicht" quick action card that provides navigation to this comprehensive field management interface.

Applied to files:

  • fdm-docs/docs/README.md
📚 Learning: 2025-08-14T14:31:55.384Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 236
File: fdm-calculator/src/balance/nitrogen/index.ts:173-0
Timestamp: 2025-08-14T14:31:55.384Z
Learning: In nitrogen balance calculations for agricultural systems, the balance should only include ammonia emissions (emission.ammonia.total) and should not include nitrate leaching from the emission calculation. The nitrate component (emission.nitrate) should be excluded from the balance formula.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-05-26T10:32:00.674Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 134
File: fdm-calculator/src/balance/nitrogen/index.ts:162-168
Timestamp: 2025-05-26T10:32:00.674Z
Learning: In the nitrogen balance calculation system (fdm-calculator), removal and volatilization values are negative by definition. This means the balance calculation using supply.total.add(removal.total).add(volatilization.total) is correct, as it effectively computes supply - |removal| - |volatilization|.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-05-26T10:32:15.538Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 134
File: fdm-calculator/src/balance/nitrogen/index.ts:236-238
Timestamp: 2025-05-26T10:32:15.538Z
Learning: In nitrogen balance calculations for agricultural systems, removal and volatilization are calculated as negative values by definition since they represent nitrogen losses from the system. The balance calculation uses addition (.add()) for all components because removal and volatilization are already negative, so adding them effectively subtracts the losses from the supply.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-03-04T10:56:35.540Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 88
File: fdm-calculator/src/doses/calculate-dose.ts:18-18
Timestamp: 2025-03-04T10:56:35.540Z
Learning: In the FDM calculator, fertilizer nutrient rates (p_n_rt, p_p_rt, p_k_rt) are measured in g/kg, and are converted to fractions by dividing by 10 during dose calculations.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-06-13T10:26:24.825Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 164
File: fdm-calculator/src/doses/calculate-dose.ts:48-63
Timestamp: 2025-06-13T10:26:24.825Z
Learning: The nutrient rate property for Effective Organic Carbon is intentionally named `p_eoc` (without the `_rt` suffix) in the codebase, and this naming should be preserved.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
📚 Learning: 2025-05-27T19:56:48.556Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 143
File: fdm-app/app/components/custom/balance/nitrogen-chart.tsx:73-85
Timestamp: 2025-05-27T19:56:48.556Z
Learning: In nitrogen balance charts, supply should be in a separate stack from removal and emission. Supply represents nitrogen inputs while removal and emission represent different types of nitrogen outputs, so they should be visually grouped differently using different stackId values.

Applied to files:

  • fdm-docs/docs/insights/01-nitrogen-balance.md
🪛 LanguageTool
fdm-docs/docs/insights/01-nitrogen-balance.md

[style] ~260-~260: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...emoval (total, harvests, residues). * Detailed breakdown of emission (total, plus sub-...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (3)
fdm-docs/docs/insights/01-nitrogen-balance.md (1)

1-262: Documentation quality and consistency improvements well-executed.

The restructuring of this nitrogen balance documentation is comprehensive and well-organized. The section on required input data now clearly delineates field information, cultivation data, harvest data, soil analysis, fertilizers, and catalogue data. Formulas are precise with proper unit notation (g N/kg, kg N/ha), consistent throughout. The distinction between implemented components (ammonia emissions) and future work (nitrate leaching, grazing) is appropriately flagged.

The previous unit inconsistency for p_n_rt has been corrected—it now correctly specifies "(g N / kg)" on line 205, aligning with the formula on line 202 and the FertilizerCatalogue definition on line 59.

fdm-docs/docs/README.md (2)

2-3: Metadata changes align with restructuring—confirm sidebar position intent.

The sidebar_position changed from 1 to 0, making this the first page in the sidebar. The title was simplified from "Introduction to FDM" to "Introduction." Confirm this is intentional and aligns with the new navigation structure described in the PR.


8-26: All documentation links verified and resolve successfully.

The verification confirms that all five section links in the restructured README.md now point to existing files. The critical path change from the broken ./agronomic-calculations/01-nitrogen-balance.md to ./insights/01-nitrogen-balance.md is valid. No broken links remain.

Comment thread fdm-docs/docs/README.md Outdated
Comment thread fdm-docs/docs/contributing/02-setting-up-local-environment.md
Comment thread fdm-docs/docs/contributing/02-setting-up-local-environment.md
Comment thread fdm-docs/docs/core-concepts/02-farms.md
Copy link
Copy Markdown
Collaborator

@gerardhros gerardhros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done. a few small questions that can easily be tackled.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
fdm-docs/README.md (1)

27-29: Consider referencing the new contributing pages in the README.

Per the PR changes, dedicated contributing pages have been added to fdm-docs/docs/contributing/. The current text references "contributing guidelines in the main FDM repository," but you may want to update this to reference or link to the new contributing pages within this documentation site.

If appropriate, consider updating line 29 to direct readers to the new local contributing pages:

- We welcome contributions to improve the FDM documentation! See the contributing guidelines in the main FDM repository for details on how to contribute code, documentation, report bugs, and suggest improvements.
+ We welcome contributions to improve the FDM documentation! See the [contributing guidelines](/docs/contributing) for details on how to contribute code, documentation, report bugs, and suggest improvements.
fdm-docs/docs/contributing/02-setting-up-local-environment.md (1)

8-15: Reduce repetitive phrasing for better readability.

The Prerequisites section uses similar phrasing repeatedly ("you will need to have" appears in lines 12–15). Consider varying the sentence structure to improve readability and flow.

Example revision:

- * **[Node.js](https://nodejs.org/en/download)**: FDM is a TypeScript and JavaScript project, so you will need to have Node.js installed.
- * **[`pnpm`](https://pnpm.io/installation)**: FDM uses `pnpm` for package management, so you will need to have it installed.
- * **[Git](https://git-scm.com/downloads)**: FDM is hosted on GitHub, so you will need to have Git installed to clone the repository.
- * **[Docker](https://docs.docker.com/get-docker/)**: FDM uses Docker to run the necessary services, such as the PostgreSQL database.
+ * **[Node.js](https://nodejs.org/en/download)**: Required for this TypeScript and JavaScript project.
+ * **[`pnpm`](https://pnpm.io/installation)**: FDM's package manager.
+ * **[Git](https://git-scm.com/downloads)**: For cloning the repository from GitHub.
+ * **[Docker](https://docs.docker.com/get-docker/)**: Provides the PostgreSQL database and other services.
fdm-docs/docs/core-concepts/02-farms.md (1)

27-30: Add temporal context for year-based data fields.

The grazing intentions and derogations sections reference year-based data but don't explicitly mention the "farm-year" relationship. Consider clarifying that these are tracked per calendar year, similar to how cultivation and harvest data are typically organized in FDM.

Suggested addition (expand line 29):

-* **Grazing Intentions:** The `intendingGrazing` table allows you to record a farm's intention to graze animals for a specific year. This is a boolean flag associated with the farm and the year.
+* **Grazing Intentions:** The `intendingGrazing` table allows you to record a farm's intention to graze animals for a specific calendar year. This is a boolean flag associated with the farm and year combination.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a70663 and 6a2c827.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • fdm-docs/README.md (1 hunks)
  • fdm-docs/docs/README.md (1 hunks)
  • fdm-docs/docs/contributing/02-setting-up-local-environment.md (1 hunks)
  • fdm-docs/docs/core-concepts/02-farms.md (1 hunks)
  • fdm-docs/docs/insights/01-nitrogen-balance.md (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • fdm-docs/docs/insights/01-nitrogen-balance.md
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 279
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.norms.tsx:277-283
Timestamp: 2025-09-26T08:34:50.413Z
Learning: In the fdm project, fdm-core and fdm-app are updated together as part of a monorepo structure, which eliminates legacy data concerns when new fields like b_isproductive are introduced. Both packages are synchronized, so there's no need for defensive coding against undefined values for newly introduced database fields.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 0
File: :0-0
Timestamp: 2025-08-13T10:33:05.313Z
Learning: In the fdm project, fdm-calculator integration for new features like b_lu_variety is handled in separate updates from the core data model changes. When fdm-core functions are updated to support new fields, fdm-calculator can consume these enhanced APIs without requiring changes in the same PR that introduces the core functionality.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 88
File: fdm-core/src/cultivation.ts:246-246
Timestamp: 2025-03-04T11:09:08.169Z
Learning: In the FDM codebase, the `fdm` parameter should be documented as "The FDM instance providing the connection to the database. The instance can be created with {link createFdmServer}." in JSDoc comments.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 6
File: fdm-app/vite.config.ts:5-9
Timestamp: 2024-11-25T12:42:32.783Z
Learning: In the `fdm-app` project, SvenVw is preparing for migration to Remix v3 and may include type declarations or configurations for v3 features in advance, such as in `vite.config.ts`.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-core/src/db/schema-authn.ts:70-76
Timestamp: 2025-04-18T14:20:40.975Z
Learning: The organization schema in fdm-core/src/db/schema-authn.ts is managed by better-auth, and modifications to field constraints (like making the slug field non-nullable) should maintain compatibility with better-auth's expectations, even if application code assumes non-null values.
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: The farm layout system has been reorganized into separate components (`FarmHeader`, `ContentLayout`, `PaginationLayout`) to support different navigation patterns (sidebar, pagination) while maintaining consistent styling. Each layout component is designed to be used independently or combined as needed.

Applied to files:

  • fdm-docs/docs/README.md
  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-09-26T08:34:50.413Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 279
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.norms.tsx:277-283
Timestamp: 2025-09-26T08:34:50.413Z
Learning: In the fdm project, fdm-core and fdm-app are updated together as part of a monorepo structure, which eliminates legacy data concerns when new fields like b_isproductive are introduced. Both packages are synchronized, so there's no need for defensive coding against undefined values for newly introduced database fields.

Applied to files:

  • fdm-docs/docs/README.md
  • fdm-docs/docs/contributing/02-setting-up-local-environment.md
📚 Learning: 2025-09-23T12:27:07.391Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:151-204
Timestamp: 2025-09-23T12:27:07.391Z
Learning: In the FDM application, field overview functionality is implemented as a dedicated page accessible via `farm/{farmId}/{calendar}/field` rather than as a direct listing on the dashboard. The dashboard includes a "Perceelsoverzicht" quick action card that provides navigation to this comprehensive field management interface.

Applied to files:

  • fdm-docs/docs/README.md
  • fdm-docs/README.md
  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: A comprehensive farm layout system has been created in `components/custom/farm-layouts/` with `BaseFarmLayout` and `FarmSidebarLayout` components. The system supports both simple and sidebar-based layouts while maintaining consistent header and farm selection functionality across all farm routes.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-01-09T16:06:08.547Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: .changeset/yellow-sheep-wash.md:1-5
Timestamp: 2025-01-09T16:06:08.547Z
Learning: The `b_sector` column has been removed from the farms table and replaced with `b_businessid_farm`, `b_address_farm`, and `b_postalcode_farm` columns for better business information management.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: A shared layout component `FarmLayoutBase` has been created in `components/custom/farm-layout-base.tsx` to maintain consistency across farm-related pages. The component handles farm selection dropdown, breadcrumb navigation, and provides a common layout structure.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-09-23T12:29:34.184Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:160-163
Timestamp: 2025-09-23T12:29:34.184Z
Learning: In the FDM application, the fertilizer application route intentionally uses `${calendar}/field/fertilizer` instead of the originally planned `/farm/{farmId}/add/fertilizer` structure. This design decision prioritizes starting from the field list view to provide better field selection workflow before applying fertilizer, rather than direct dashboard-to-action navigation.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: The `FarmLayout` component in `components/custom/farm-layout.tsx` provides a reusable layout structure for farm-related pages, with support for farm selection dropdown, customizable breadcrumb titles, and flexible content rendering through either children or Outlet components.

Applied to files:

  • fdm-docs/docs/core-concepts/02-farms.md
🪛 LanguageTool
fdm-docs/docs/contributing/02-setting-up-local-environment.md

[style] ~13-~13: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...pm` for package management, so you will need to have it installed. * **[Git](https://gi...

(REP_NEED_TO_VB)


[style] ~14-~14: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...*: FDM is hosted on GitHub, so you will need to have Git installed to clone the reposit...

(REP_NEED_TO_VB)


[style] ~19-~19: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... ## Cloning the Repository First, you need to clone the FDM repository from GitHub: ...

(REP_NEED_TO_VB)


[style] ~27-~27: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... ## Installing Dependencies Next, you need to install the dependencies for all the pa...

(REP_NEED_TO_VB)


[style] ~35-~35: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... manage environment variables. You will need to create a .env file in the fdm-app p...

(REP_NEED_TO_VB)


[style] ~41-~41: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...example fdm-app/.env ``` You will then need to fill in the values for the environment ...

(REP_NEED_TO_VB)

🔇 Additional comments (9)
fdm-docs/README.md (1)

38-38: LGTM!

The reviewer attribution is consistent with the maintainer line format and adds transparency to the project governance.

fdm-docs/docs/README.md (2)

6-26: Content quality looks good.

The introductory paragraph is clear and professional. Each section (Getting Started, Core Concepts, Agronomic Calculations, Contributing, FDM App) has appropriate descriptive text explaining its purpose and audience. The documentation structure follows a logical progression for both new users and contributors.


1-26: Documentation restructuring is complete and all links are valid.

Verification confirms that all five documentation files referenced in the README are present in the repository. The previously broken link to the nitrogen balance documentation has been successfully corrected to point to the new insights folder structure, resolving the past pipeline failure. No additional issues found.

fdm-docs/docs/contributing/02-setting-up-local-environment.md (3)

1-6: Frontmatter and introduction are clear and well-structured.

The documentation page has proper formatting and sets clear expectations for readers.


33-49: Verify if database initialization/migrations need to be documented.

The guide covers starting Docker services but doesn't mention whether database migrations or schema initialization steps are required after docker-compose up -d. Please confirm:

  • Does the application automatically run migrations on startup?
  • Are there manual migration steps users should run?
  • Should this be included in the setup instructions?

51-53: External service requirement is clearly documented.

The section properly identifies the NMI API dependency and directs users to obtain required credentials.

fdm-docs/docs/core-concepts/02-farms.md (3)

1-5: Clear and accurate introduction addressing prior clarity concerns.

The definition of "Farm" as a top-level container representing a single farming business or enterprise is well-articulated and directly addresses the previous review feedback about distinguishing assets from operations.


9-15: Properties correctly reflect the current schema.

The listed properties align with the farm table structure and reflect the documented schema changes (removal of b_sector and addition of business/address fields).


19-21: Cross-reference verified—no issues found.

The reference to [Authorization](./10-authorization.md) is correct. Both documentation files exist with proper numbering: 09-authentication.md and 10-authorization.md are in place, following the sequential naming convention throughout the core-concepts directory. The separation of authentication and authorization into distinct pages aligns with documentation best practices.

@SvenVw SvenVw merged commit 24f1cbb into development Nov 24, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch:development Issue only affecting development, not the main branch (yet) dependencies Pull requests that update a dependency file fdm-docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants