{
  "version": "1.0.0",
  "project": {
    "name": "treetracker-api",
    "languages": [
      "javascript",
      "sql",
      "json",
      "yaml",
      "dockerfile",
      "shell",
      "markdown"
    ],
    "frameworks": [
      "Express",
      "Knex",
      "Joi",
      "Mocha",
      "Docker",
      "GitHub Actions"
    ],
    "description": "Greenstand TreeTracker API: a Node.js/Express microservice exposing a REST API over PostgreSQL (Knex), with Joi/express-validator validation, Swagger docs, and Rascal/amqplib messaging.",
    "analyzedAt": "2026-09-02T21:39:32.507Z",
    "gitCommitHash": "85258c8ee5f1cae66a3de3e7d8b3b37faf1ae35c"
  },
  "nodes": [
    {
      "id": "file:server/handlers/captureHandler/docs.js",
      "type": "file",
      "name": "docs.js",
      "filePath": "server/handlers/captureHandler/docs.js",
      "summary": "Generates OpenAPI/Swagger path and schema definitions for the capture endpoints from Joi schemas.",
      "tags": [
        "api-schema",
        "documentation",
        "swagger",
        "serialization"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/handlers/captureHandler/index.js",
      "type": "file",
      "name": "index.js",
      "filePath": "server/handlers/captureHandler/index.js",
      "summary": "Express request handlers for capture CRUD and capture-tag association endpoints.",
      "tags": [
        "api-handler",
        "captures",
        "express",
        "validation"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/handlers/captureHandler/schemas.js",
      "type": "file",
      "name": "schemas.js",
      "filePath": "server/handlers/captureHandler/schemas.js",
      "summary": "Joi validation schemas for capture query, create, patch, and capture-tag payloads.",
      "tags": [
        "validation",
        "schema-definition",
        "captures"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/handlers/growerAccountHandler/index.js",
      "type": "file",
      "name": "index.js",
      "filePath": "server/handlers/growerAccountHandler/index.js",
      "summary": "Express request handlers for grower account list, create, update, and upsert endpoints.",
      "tags": [
        "api-handler",
        "grower-account",
        "express",
        "validation"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/handlers/tagHandler/index.js",
      "type": "file",
      "name": "index.js",
      "filePath": "server/handlers/tagHandler/index.js",
      "summary": "Express request handlers for tag list, create, update, and single-get endpoints.",
      "tags": [
        "api-handler",
        "tags",
        "express",
        "validation"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/handlers/treeHandler/index.js",
      "type": "file",
      "name": "index.js",
      "filePath": "server/handlers/treeHandler/index.js",
      "summary": "Express request handlers for tree CRUD, potential-match lookup, and tree-tag endpoints.",
      "tags": [
        "api-handler",
        "trees",
        "express",
        "validation"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routes/captureRoutes.js",
      "type": "file",
      "name": "captureRoutes.js",
      "filePath": "server/routes/captureRoutes.js",
      "summary": "Express router wiring capture and capture-tag URLs to their handlers via the async wrapper.",
      "tags": [
        "routing",
        "express",
        "captures",
        "api-handler"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routes/growerAccountRoutes.js",
      "type": "file",
      "name": "growerAccountRoutes.js",
      "filePath": "server/routes/growerAccountRoutes.js",
      "summary": "Express router wiring grower account URLs to their handlers.",
      "tags": [
        "routing",
        "express",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routes/index.js",
      "type": "file",
      "name": "index.js",
      "filePath": "server/routes/index.js",
      "summary": "Barrel that aggregates all feature routers into a single array for app mounting.",
      "tags": [
        "barrel",
        "routing",
        "entry-point"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routes/tagRoutes.js",
      "type": "file",
      "name": "tagRoutes.js",
      "filePath": "server/routes/tagRoutes.js",
      "summary": "Express router wiring tag URLs to their handlers.",
      "tags": [
        "routing",
        "express",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routes/treeRoutes.js",
      "type": "file",
      "name": "treeRoutes.js",
      "filePath": "server/routes/treeRoutes.js",
      "summary": "Express router wiring tree and tree-tag URLs to their handlers.",
      "tags": [
        "routing",
        "express",
        "trees"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/GrowerAccountService.js",
      "type": "file",
      "name": "GrowerAccountService.js",
      "filePath": "server/services/GrowerAccountService.js",
      "summary": "Service layer providing CRUD and upsert operations for grower accounts over a DB session and repository.",
      "tags": [
        "service",
        "data-model",
        "database",
        "crud"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/services/TreeService.js",
      "type": "file",
      "name": "TreeService.js",
      "filePath": "server/services/TreeService.js",
      "summary": "Service layer for tree CRUD, potential-match queries, and queue integration over a DB session.",
      "tags": [
        "service",
        "data-model",
        "database",
        "crud"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/utils/HttpError.js",
      "type": "file",
      "name": "HttpError.js",
      "filePath": "server/utils/HttpError.js",
      "summary": "Custom HTTP error class carrying a status code and rollback flag for the error middleware.",
      "tags": [
        "utility",
        "error-handling",
        "type-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/utils/helper.js",
      "type": "file",
      "name": "helper.js",
      "filePath": "server/utils/helper.js",
      "summary": "Pagination helpers that build next/prev links and extract filter and limit options from queries.",
      "tags": [
        "utility",
        "pagination",
        "helper"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/utils/utils.js",
      "type": "file",
      "name": "utils.js",
      "filePath": "server/utils/utils.js",
      "summary": "Express utilities: an async handler wrapper and a global error middleware mapping errors to HTTP responses.",
      "tags": [
        "utility",
        "middleware",
        "error-handling",
        "express"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:server/handlers/captureHandler/index.js:captureHandlerGet",
      "type": "function",
      "name": "captureHandlerGet",
      "filePath": "server/handlers/captureHandler/index.js",
      "lineRange": [
        18,
        44
      ],
      "summary": "Lists captures with filtering, pagination, and next/prev links.",
      "tags": [
        "api-handler",
        "pagination",
        "captures"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/captureHandler/index.js:captureHandlerPost",
      "type": "function",
      "name": "captureHandlerPost",
      "filePath": "server/handlers/captureHandler/index.js",
      "lineRange": [
        46,
        68
      ],
      "summary": "Validates and creates a new capture record.",
      "tags": [
        "api-handler",
        "captures",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/captureHandler/index.js:captureHandlerPatch",
      "type": "function",
      "name": "captureHandlerPatch",
      "filePath": "server/handlers/captureHandler/index.js",
      "lineRange": [
        70,
        86
      ],
      "summary": "Validates and updates an existing capture.",
      "tags": [
        "api-handler",
        "captures",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/captureHandler/index.js:captureHandlerSingleGet",
      "type": "function",
      "name": "captureHandlerSingleGet",
      "filePath": "server/handlers/captureHandler/index.js",
      "lineRange": [
        88,
        104
      ],
      "summary": "Fetches a single capture by id.",
      "tags": [
        "api-handler",
        "captures"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/captureHandler/index.js:captureHandlerTagGet",
      "type": "function",
      "name": "captureHandlerTagGet",
      "filePath": "server/handlers/captureHandler/index.js",
      "lineRange": [
        106,
        118
      ],
      "summary": "Lists tags associated with a capture.",
      "tags": [
        "api-handler",
        "captures",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/captureHandler/index.js:captureHandlerTagPost",
      "type": "function",
      "name": "captureHandlerTagPost",
      "filePath": "server/handlers/captureHandler/index.js",
      "lineRange": [
        120,
        137
      ],
      "summary": "Attaches tags to a capture.",
      "tags": [
        "api-handler",
        "captures",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/captureHandler/index.js:captureHandlerSingleTagGet",
      "type": "function",
      "name": "captureHandlerSingleTagGet",
      "filePath": "server/handlers/captureHandler/index.js",
      "lineRange": [
        139,
        156
      ],
      "summary": "Fetches a single capture-tag association.",
      "tags": [
        "api-handler",
        "captures",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/captureHandler/index.js:captureHandlerSingleTagPatch",
      "type": "function",
      "name": "captureHandlerSingleTagPatch",
      "filePath": "server/handlers/captureHandler/index.js",
      "lineRange": [
        158,
        175
      ],
      "summary": "Updates a single capture-tag association.",
      "tags": [
        "api-handler",
        "captures",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerGet",
      "type": "function",
      "name": "growerAccountHandlerGet",
      "filePath": "server/handlers/growerAccountHandler/index.js",
      "lineRange": [
        14,
        43
      ],
      "summary": "Lists grower accounts with filtering and pagination.",
      "tags": [
        "api-handler",
        "grower-account",
        "pagination"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerPost",
      "type": "function",
      "name": "growerAccountHandlerPost",
      "filePath": "server/handlers/growerAccountHandler/index.js",
      "lineRange": [
        45,
        61
      ],
      "summary": "Validates and creates a grower account.",
      "tags": [
        "api-handler",
        "grower-account",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerPatch",
      "type": "function",
      "name": "growerAccountHandlerPatch",
      "filePath": "server/handlers/growerAccountHandler/index.js",
      "lineRange": [
        63,
        81
      ],
      "summary": "Validates and updates a grower account.",
      "tags": [
        "api-handler",
        "grower-account",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerSingleGet",
      "type": "function",
      "name": "growerAccountHandlerSingleGet",
      "filePath": "server/handlers/growerAccountHandler/index.js",
      "lineRange": [
        83,
        101
      ],
      "summary": "Fetches a single grower account by id.",
      "tags": [
        "api-handler",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerPut",
      "type": "function",
      "name": "growerAccountHandlerPut",
      "filePath": "server/handlers/growerAccountHandler/index.js",
      "lineRange": [
        103,
        119
      ],
      "summary": "Upserts a grower account.",
      "tags": [
        "api-handler",
        "grower-account",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/tagHandler/index.js:tagHandlerGet",
      "type": "function",
      "name": "tagHandlerGet",
      "filePath": "server/handlers/tagHandler/index.js",
      "lineRange": [
        14,
        40
      ],
      "summary": "Lists tags with filtering and pagination.",
      "tags": [
        "api-handler",
        "tags",
        "pagination"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/tagHandler/index.js:tagHandlerPost",
      "type": "function",
      "name": "tagHandlerPost",
      "filePath": "server/handlers/tagHandler/index.js",
      "lineRange": [
        42,
        52
      ],
      "summary": "Validates and creates a tag.",
      "tags": [
        "api-handler",
        "tags",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/tagHandler/index.js:tagHandlerPatch",
      "type": "function",
      "name": "tagHandlerPatch",
      "filePath": "server/handlers/tagHandler/index.js",
      "lineRange": [
        54,
        71
      ],
      "summary": "Validates and updates a tag.",
      "tags": [
        "api-handler",
        "tags",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/tagHandler/index.js:tagHandlerSingleGet",
      "type": "function",
      "name": "tagHandlerSingleGet",
      "filePath": "server/handlers/tagHandler/index.js",
      "lineRange": [
        73,
        87
      ],
      "summary": "Fetches a single tag by id.",
      "tags": [
        "api-handler",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/treeHandler/index.js:treeHandlerGet",
      "type": "function",
      "name": "treeHandlerGet",
      "filePath": "server/handlers/treeHandler/index.js",
      "lineRange": [
        19,
        45
      ],
      "summary": "Lists trees with filtering and pagination.",
      "tags": [
        "api-handler",
        "trees",
        "pagination"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/treeHandler/index.js:treeHandlerPost",
      "type": "function",
      "name": "treeHandlerPost",
      "filePath": "server/handlers/treeHandler/index.js",
      "lineRange": [
        47,
        57
      ],
      "summary": "Validates and creates a tree.",
      "tags": [
        "api-handler",
        "trees",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/treeHandler/index.js:treeHandlerGetPotentialMatches",
      "type": "function",
      "name": "treeHandlerGetPotentialMatches",
      "filePath": "server/handlers/treeHandler/index.js",
      "lineRange": [
        59,
        68
      ],
      "summary": "Returns potential matching trees for a capture.",
      "tags": [
        "api-handler",
        "trees",
        "matching"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/treeHandler/index.js:treeHandlerSingleGet",
      "type": "function",
      "name": "treeHandlerSingleGet",
      "filePath": "server/handlers/treeHandler/index.js",
      "lineRange": [
        70,
        83
      ],
      "summary": "Fetches a single tree by id.",
      "tags": [
        "api-handler",
        "trees"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/treeHandler/index.js:treeHandlerPatch",
      "type": "function",
      "name": "treeHandlerPatch",
      "filePath": "server/handlers/treeHandler/index.js",
      "lineRange": [
        85,
        102
      ],
      "summary": "Validates and updates a tree.",
      "tags": [
        "api-handler",
        "trees",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/treeHandler/index.js:treeHandlerTagGet",
      "type": "function",
      "name": "treeHandlerTagGet",
      "filePath": "server/handlers/treeHandler/index.js",
      "lineRange": [
        104,
        116
      ],
      "summary": "Lists tags associated with a tree.",
      "tags": [
        "api-handler",
        "trees",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/treeHandler/index.js:treeHandlerTagPost",
      "type": "function",
      "name": "treeHandlerTagPost",
      "filePath": "server/handlers/treeHandler/index.js",
      "lineRange": [
        118,
        135
      ],
      "summary": "Attaches tags to a tree.",
      "tags": [
        "api-handler",
        "trees",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/treeHandler/index.js:treeHandlerSingleTagGet",
      "type": "function",
      "name": "treeHandlerSingleTagGet",
      "filePath": "server/handlers/treeHandler/index.js",
      "lineRange": [
        137,
        154
      ],
      "summary": "Fetches a single tree-tag association.",
      "tags": [
        "api-handler",
        "trees",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/treeHandler/index.js:treeHandlerSingleTagPatch",
      "type": "function",
      "name": "treeHandlerSingleTagPatch",
      "filePath": "server/handlers/treeHandler/index.js",
      "lineRange": [
        156,
        174
      ],
      "summary": "Updates a single tree-tag association.",
      "tags": [
        "api-handler",
        "trees",
        "tags"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/utils/helper.js:generatePrevAndNext",
      "type": "function",
      "name": "generatePrevAndNext",
      "filePath": "server/utils/helper.js",
      "lineRange": [
        1,
        30
      ],
      "summary": "Builds next/prev pagination URLs from query, limit, offset, and total count.",
      "tags": [
        "utility",
        "pagination"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/utils/helper.js:getFilterAndLimitOptions",
      "type": "function",
      "name": "getFilterAndLimitOptions",
      "filePath": "server/utils/helper.js",
      "lineRange": [
        32,
        44
      ],
      "summary": "Extracts a filter object plus limit and offset paging options from a query.",
      "tags": [
        "utility",
        "pagination"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/utils/utils.js:handlerWrapper",
      "type": "function",
      "name": "handlerWrapper",
      "filePath": "server/utils/utils.js",
      "lineRange": [
        24,
        31
      ],
      "summary": "Wraps async Express handlers to catch rejected promises and forward errors to next().",
      "tags": [
        "utility",
        "middleware",
        "express"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/utils/utils.js:errorHandler",
      "type": "function",
      "name": "errorHandler",
      "filePath": "server/utils/utils.js",
      "lineRange": [
        33,
        69
      ],
      "summary": "Global Express error middleware mapping HttpError, Joi ValidationError, and Axios errors to HTTP responses.",
      "tags": [
        "middleware",
        "error-handling",
        "express"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/services/GrowerAccountService.js:GrowerAccountService",
      "type": "class",
      "name": "GrowerAccountService",
      "filePath": "server/services/GrowerAccountService.js",
      "lineRange": [
        4,
        70
      ],
      "summary": "Service class with CRUD and upsert methods for grower accounts, backed by a DB session and repository.",
      "tags": [
        "service",
        "crud",
        "database",
        "data-model"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/services/TreeService.js:TreeService",
      "type": "class",
      "name": "TreeService",
      "filePath": "server/services/TreeService.js",
      "lineRange": [
        5,
        65
      ],
      "summary": "Service class for tree CRUD, potential-match queries, and queue notifications over a DB session.",
      "tags": [
        "service",
        "crud",
        "database",
        "data-model"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/utils/HttpError.js:HttpError",
      "type": "class",
      "name": "HttpError",
      "filePath": "server/utils/HttpError.js",
      "lineRange": [
        10,
        22
      ],
      "summary": "Error subclass carrying an HTTP status code and a shouldRollback helper for transaction handling.",
      "tags": [
        "error-handling",
        "utility",
        "type-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/database/Session.js",
      "type": "file",
      "name": "Session.js",
      "filePath": "server/infra/database/Session.js",
      "summary": "Database session wrapper around Knex that manages transaction lifecycle (begin, commit, rollback) for repositories.",
      "tags": [
        "database",
        "transaction",
        "session",
        "infrastructure"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/infra/database/Session.js:Session",
      "type": "class",
      "name": "Session",
      "filePath": "server/infra/database/Session.js",
      "lineRange": [
        3,
        41
      ],
      "summary": "Encapsulates a Knex connection and exposes transaction control methods used by repositories to share a unit of work.",
      "tags": [
        "database",
        "transaction",
        "session"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/CaptureTag.js",
      "type": "file",
      "name": "CaptureTag.js",
      "filePath": "server/models/CaptureTag.js",
      "summary": "Domain model for capture-tag associations, providing read and mutation logic that delegates to CaptureTagRepository.",
      "tags": [
        "data-model",
        "domain",
        "tag"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/models/CaptureTag.js:CaptureTag",
      "type": "class",
      "name": "CaptureTag",
      "filePath": "server/models/CaptureTag.js",
      "lineRange": [
        4,
        68
      ],
      "summary": "Model encapsulating capture-tag retrieval, tag attachment, and update operations backed by the repository layer.",
      "tags": [
        "data-model",
        "tag",
        "domain"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/models/GrowerAccount.js",
      "type": "file",
      "name": "GrowerAccount.js",
      "filePath": "server/models/GrowerAccount.js",
      "summary": "Domain model for grower accounts, handling listing, counting, lookup, creation, update, and upsert with legacy planter reconciliation.",
      "tags": [
        "data-model",
        "domain",
        "grower",
        "upsert"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/models/GrowerAccount.js:GrowerAccount",
      "type": "class",
      "name": "GrowerAccount",
      "filePath": "server/models/GrowerAccount.js",
      "lineRange": [
        5,
        193
      ],
      "summary": "Model exposing grower account CRUD plus upsert logic that bridges the current schema with the legacy planter table.",
      "tags": [
        "data-model",
        "grower",
        "crud",
        "upsert"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/models/Tag.js",
      "type": "file",
      "name": "Tag.js",
      "filePath": "server/models/Tag.js",
      "summary": "Domain model for tags, providing listing, counting, lookup, creation, and update operations over TagRepository.",
      "tags": [
        "data-model",
        "domain",
        "tag"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/models/Tag.js:Tag",
      "type": "class",
      "name": "Tag",
      "filePath": "server/models/Tag.js",
      "lineRange": [
        4,
        67
      ],
      "summary": "Model encapsulating tag CRUD operations and response shaping backed by the repository layer.",
      "tags": [
        "data-model",
        "tag",
        "crud"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/models/TreeTag.js",
      "type": "file",
      "name": "TreeTag.js",
      "filePath": "server/models/TreeTag.js",
      "summary": "Domain model for tree-tag associations, providing read and mutation logic that delegates to TreeTagRepository.",
      "tags": [
        "data-model",
        "domain",
        "tag"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/models/TreeTag.js:TreeTag",
      "type": "class",
      "name": "TreeTag",
      "filePath": "server/models/TreeTag.js",
      "lineRange": [
        4,
        68
      ],
      "summary": "Model encapsulating tree-tag retrieval, tag attachment, and update operations backed by the repository layer.",
      "tags": [
        "data-model",
        "tag",
        "domain"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/repositories/BaseRepository.js",
      "type": "file",
      "name": "BaseRepository.js",
      "filePath": "server/repositories/BaseRepository.js",
      "summary": "Generic Knex-backed repository base class providing getById, filtered queries, counting, create, and update primitives inherited by all concrete repositories.",
      "tags": [
        "repository",
        "data-access",
        "base-class",
        "database",
        "tested"
      ],
      "complexity": "moderate",
      "languageNotes": "Serves as the shared data-access superclass; concrete repositories extend it and pass a table name."
    },
    {
      "id": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "class",
      "name": "BaseRepository",
      "filePath": "server/repositories/BaseRepository.js",
      "lineRange": [
        3,
        120
      ],
      "summary": "Base data-access class implementing common CRUD and filter operations against a Knex session for a given table.",
      "tags": [
        "repository",
        "base-class",
        "data-access",
        "crud"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/repositories/BaseRepository.spec.js",
      "type": "file",
      "name": "BaseRepository.spec.js",
      "filePath": "server/repositories/BaseRepository.spec.js",
      "summary": "Unit test suite exercising BaseRepository CRUD and filter behavior against a mocked Knex session.",
      "tags": [
        "test",
        "repository",
        "unit-test"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/repositories/CaptureTagRepository.js",
      "type": "file",
      "name": "CaptureTagRepository.js",
      "filePath": "server/repositories/CaptureTagRepository.js",
      "summary": "Repository for capture-tag records, extending BaseRepository with capture-specific read and update queries.",
      "tags": [
        "repository",
        "data-access",
        "tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/repositories/CaptureTagRepository.js:CaptureTagRepository",
      "type": "class",
      "name": "CaptureTagRepository",
      "filePath": "server/repositories/CaptureTagRepository.js",
      "lineRange": [
        3,
        41
      ],
      "summary": "Concrete repository adding capture-tag retrieval and update queries on top of BaseRepository.",
      "tags": [
        "repository",
        "data-access",
        "tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/repositories/EventRepository.js",
      "type": "file",
      "name": "EventRepository.js",
      "filePath": "server/repositories/EventRepository.js",
      "summary": "Repository for domain events, extending BaseRepository with add and lookup operations for the event store.",
      "tags": [
        "repository",
        "data-access",
        "event"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/repositories/EventRepository.js:EventRepository",
      "type": "class",
      "name": "EventRepository",
      "filePath": "server/repositories/EventRepository.js",
      "lineRange": [
        3,
        24
      ],
      "summary": "Concrete repository persisting and retrieving domain events on top of BaseRepository.",
      "tags": [
        "repository",
        "event",
        "data-access"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/repositories/GrowerAccountRepository.js",
      "type": "file",
      "name": "GrowerAccountRepository.js",
      "filePath": "server/repositories/GrowerAccountRepository.js",
      "summary": "Repository for grower accounts, extending BaseRepository with filtered queries and info-update logic.",
      "tags": [
        "repository",
        "data-access",
        "grower"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/repositories/GrowerAccountRepository.js:GrowerAccountRepository",
      "type": "class",
      "name": "GrowerAccountRepository",
      "filePath": "server/repositories/GrowerAccountRepository.js",
      "lineRange": [
        3,
        104
      ],
      "summary": "Concrete repository adding grower-account filtering and update operations on top of BaseRepository.",
      "tags": [
        "repository",
        "grower",
        "data-access"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/repositories/Legacy/PlanterRepository.js",
      "type": "file",
      "name": "PlanterRepository.js",
      "filePath": "server/repositories/Legacy/PlanterRepository.js",
      "summary": "Legacy repository for the planter table, extending BaseRepository with a user lookup used during grower-account reconciliation.",
      "tags": [
        "repository",
        "legacy",
        "data-access"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/repositories/Legacy/PlanterRepository.js:LegacyPlanterRepository",
      "type": "class",
      "name": "LegacyPlanterRepository",
      "filePath": "server/repositories/Legacy/PlanterRepository.js",
      "lineRange": [
        3,
        19
      ],
      "summary": "Legacy planter repository exposing a findUser query on top of BaseRepository.",
      "tags": [
        "repository",
        "legacy",
        "data-access"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/repositories/TagRepository.js",
      "type": "file",
      "name": "TagRepository.js",
      "filePath": "server/repositories/TagRepository.js",
      "summary": "Thin repository for tag records, extending BaseRepository with the tag table binding.",
      "tags": [
        "repository",
        "data-access",
        "tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/repositories/TagRepository.js:TagRepository",
      "type": "class",
      "name": "TagRepository",
      "filePath": "server/repositories/TagRepository.js",
      "lineRange": [
        3,
        9
      ],
      "summary": "Minimal concrete repository binding BaseRepository to the tag table.",
      "tags": [
        "repository",
        "tag",
        "data-access"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/repositories/TreeTagRepository.js",
      "type": "file",
      "name": "TreeTagRepository.js",
      "filePath": "server/repositories/TreeTagRepository.js",
      "summary": "Repository for tree-tag records, extending BaseRepository with tree-specific read and update queries.",
      "tags": [
        "repository",
        "data-access",
        "tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/repositories/TreeTagRepository.js:TreeTagRepository",
      "type": "class",
      "name": "TreeTagRepository",
      "filePath": "server/repositories/TreeTagRepository.js",
      "lineRange": [
        3,
        41
      ],
      "summary": "Concrete repository adding tree-tag retrieval and update queries on top of BaseRepository.",
      "tags": [
        "repository",
        "tag",
        "data-access"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/CaptureTagService.js",
      "type": "file",
      "name": "CaptureTagService.js",
      "filePath": "server/services/CaptureTagService.js",
      "summary": "Service coordinating capture-tag operations, wiring a database Session into the CaptureTag model for reads and mutations.",
      "tags": [
        "service",
        "tag",
        "orchestration"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/services/CaptureTagService.js:CaptureTagService",
      "type": "class",
      "name": "CaptureTagService",
      "filePath": "server/services/CaptureTagService.js",
      "lineRange": [
        4,
        43
      ],
      "summary": "Service exposing capture-tag retrieval and tag-attachment operations over the CaptureTag model within a session.",
      "tags": [
        "service",
        "tag",
        "orchestration"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/TagService.js",
      "type": "file",
      "name": "TagService.js",
      "filePath": "server/services/TagService.js",
      "summary": "Service coordinating tag CRUD operations, wiring a database Session into the Tag model.",
      "tags": [
        "service",
        "tag",
        "orchestration"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/services/TagService.js:TagService",
      "type": "class",
      "name": "TagService",
      "filePath": "server/services/TagService.js",
      "lineRange": [
        4,
        51
      ],
      "summary": "Service exposing tag listing, counting, lookup, creation, and update over the Tag model within a session.",
      "tags": [
        "service",
        "tag",
        "crud"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/TreeTagService.js",
      "type": "file",
      "name": "TreeTagService.js",
      "filePath": "server/services/TreeTagService.js",
      "summary": "Service coordinating tree-tag operations, wiring a database Session into the TreeTag model for reads and mutations.",
      "tags": [
        "service",
        "tag",
        "orchestration"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/services/TreeTagService.js:TreeTagService",
      "type": "class",
      "name": "TreeTagService",
      "filePath": "server/services/TreeTagService.js",
      "lineRange": [
        4,
        43
      ],
      "summary": "Service exposing tree-tag retrieval and tag-attachment operations over the TreeTag model within a session.",
      "tags": [
        "service",
        "tag",
        "orchestration"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:__tests__/integration/grower_account/legacy-planter-creation.js",
      "type": "file",
      "name": "legacy-planter-creation.js",
      "filePath": "__tests__/integration/grower_account/legacy-planter-creation.js",
      "summary": "Integration test verifying legacy planter creation flow against a live Knex database connection.",
      "tags": [
        "test",
        "integration",
        "grower",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/seed-cli.js",
      "type": "file",
      "name": "seed-cli.js",
      "filePath": "database/seed-cli.js",
      "summary": "Command-line entry point that runs database seed scripts by invoking the seed CLI runner.",
      "tags": [
        "entry-point",
        "database",
        "seed",
        "cli"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:database/seed-cli.js:exec",
      "type": "function",
      "name": "exec",
      "filePath": "database/seed-cli.js",
      "lineRange": [
        13,
        25
      ],
      "summary": "Executes the seed process, coordinating Knex connection and seed data loading.",
      "tags": [
        "database",
        "seed",
        "cli"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/seeds/01_table_growers.js",
      "type": "file",
      "name": "01_table_growers.js",
      "filePath": "database/seeds/01_table_growers.js",
      "summary": "Knex seed that loads grower records from a JSON fixture into the growers table, parsing point geometry.",
      "tags": [
        "database",
        "seed",
        "grower",
        "migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/seeds/cli/seed.js",
      "type": "file",
      "name": "seed.js",
      "filePath": "database/seeds/cli/seed.js",
      "summary": "Seed runner that loads capture fixture data and inserts it through the Knex connection.",
      "tags": [
        "database",
        "seed",
        "capture",
        "utility"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/knex.js",
      "type": "file",
      "name": "knex.js",
      "filePath": "server/infra/database/knex.js",
      "summary": "Configures and exports the shared Knex/Postgres database connection used across the service.",
      "tags": [
        "database",
        "infrastructure",
        "singleton",
        "configuration"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Capture.js",
      "type": "file",
      "name": "Capture.js",
      "filePath": "server/models/Capture.js",
      "summary": "Domain model for tree captures, providing query, creation, and update logic plus domain event emission.",
      "tags": [
        "data-model",
        "domain",
        "capture",
        "service"
      ],
      "complexity": "complex"
    },
    {
      "id": "class:server/models/Capture.js:Capture",
      "type": "class",
      "name": "Capture",
      "filePath": "server/models/Capture.js",
      "lineRange": [
        7,
        262
      ],
      "summary": "Encapsulates capture business logic: filtering, retrieval, creation, updates, and CaptureCreated domain events.",
      "tags": [
        "data-model",
        "domain",
        "capture",
        "factory"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/models/DomainEvent.js",
      "type": "file",
      "name": "DomainEvent.js",
      "filePath": "server/models/DomainEvent.js",
      "summary": "Domain event model managing raising, receiving, and persistence of domain events via the event repository.",
      "tags": [
        "data-model",
        "domain",
        "event-handler",
        "serialization"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/models/DomainEvent.js:DomainEvent",
      "type": "class",
      "name": "DomainEvent",
      "filePath": "server/models/DomainEvent.js",
      "lineRange": [
        4,
        42
      ],
      "summary": "Represents a domain event with raise/receive lifecycle methods and persistence through the event repository.",
      "tags": [
        "domain",
        "event-handler",
        "data-model"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/tree.js",
      "type": "file",
      "name": "tree.js",
      "filePath": "server/models/tree.js",
      "summary": "Domain model for trees, providing query, creation, update, and potential-match logic over the tree repository.",
      "tags": [
        "data-model",
        "domain",
        "tree",
        "service"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/models/tree.js:Tree",
      "type": "class",
      "name": "Tree",
      "filePath": "server/models/tree.js",
      "lineRange": [
        8,
        161
      ],
      "summary": "Encapsulates tree business logic including retrieval, creation, updates, and potential-match resolution against captures.",
      "tags": [
        "data-model",
        "domain",
        "tree",
        "factory"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/repositories/CaptureRepository.js",
      "type": "file",
      "name": "CaptureRepository.js",
      "filePath": "server/repositories/CaptureRepository.js",
      "summary": "Data-access repository building filtered Knex queries for captures, extending the shared BaseRepository.",
      "tags": [
        "repository",
        "data-access",
        "capture",
        "database"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/repositories/CaptureRepository.js:CaptureRepository",
      "type": "class",
      "name": "CaptureRepository",
      "filePath": "server/repositories/CaptureRepository.js",
      "lineRange": [
        3,
        152
      ],
      "summary": "Repository providing filter-based capture queries and counts via a where-clause builder over BaseRepository.",
      "tags": [
        "repository",
        "data-access",
        "capture",
        "query-builder"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/repositories/TreeRepository.js",
      "type": "file",
      "name": "TreeRepository.js",
      "filePath": "server/repositories/TreeRepository.js",
      "summary": "Data-access repository extending BaseRepository with potential-match queries for trees.",
      "tags": [
        "repository",
        "data-access",
        "tree",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/repositories/TreeRepository.js:TreeRepository",
      "type": "class",
      "name": "TreeRepository",
      "filePath": "server/repositories/TreeRepository.js",
      "lineRange": [
        3,
        40
      ],
      "summary": "Repository exposing potential-match resolution queries for trees over the shared BaseRepository.",
      "tags": [
        "repository",
        "data-access",
        "tree",
        "query-builder"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/EventHandlerService.js",
      "type": "file",
      "name": "EventHandlerService.js",
      "filePath": "server/services/EventHandlerService.js",
      "summary": "Service that registers and dispatches domain event handlers, processing queued messages into capture updates.",
      "tags": [
        "service",
        "event-handler",
        "domain",
        "middleware"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/services/EventHandlerService.js:EventHandlerService",
      "type": "class",
      "name": "EventHandlerService",
      "filePath": "server/services/EventHandlerService.js",
      "lineRange": [
        19,
        55
      ],
      "summary": "Registers event handlers and applies them to incoming queue messages within a database session.",
      "tags": [
        "service",
        "event-handler",
        "domain"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/utils/enums.js",
      "type": "file",
      "name": "enums.js",
      "filePath": "server/utils/enums.js",
      "summary": "Defines shared enum constants used across models and services.",
      "tags": [
        "utility",
        "type-definition",
        "constants"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/handlers/growerAccountHandler/docs.js",
      "type": "file",
      "name": "docs.js",
      "filePath": "server/handlers/growerAccountHandler/docs.js",
      "summary": "Swagger/OpenAPI path definitions for the grower account endpoints, referencing the Joi-derived request and response schemas.",
      "tags": [
        "api-schema",
        "documentation",
        "swagger",
        "grower-account"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/handlers/growerAccountHandler/schemas.js",
      "type": "file",
      "name": "schemas.js",
      "filePath": "server/handlers/growerAccountHandler/schemas.js",
      "summary": "Joi validation schemas for grower account request bodies and query parameters, shared by the handler and image handler.",
      "tags": [
        "validation",
        "schema-definition",
        "joi",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/handlers/growerAccountImageHandler/docs.js",
      "type": "file",
      "name": "docs.js",
      "filePath": "server/handlers/growerAccountImageHandler/docs.js",
      "summary": "Swagger/OpenAPI path definitions for grower account image upload and update endpoints.",
      "tags": [
        "api-schema",
        "documentation",
        "swagger",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/handlers/growerAccountImageHandler/index.js",
      "type": "file",
      "name": "index.js",
      "filePath": "server/handlers/growerAccountImageHandler/index.js",
      "summary": "Express request handlers for creating and updating grower account images, validating input with Joi and delegating persistence to GrowerAccountImageService.",
      "tags": [
        "api-handler",
        "grower-account",
        "image",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/handlers/growerAccountImageHandler/schemas.js",
      "type": "file",
      "name": "schemas.js",
      "filePath": "server/handlers/growerAccountImageHandler/schemas.js",
      "summary": "Joi validation schemas for grower account image patch bodies and image id query parameters.",
      "tags": [
        "validation",
        "schema-definition",
        "joi",
        "image"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/handlers/swaggerDoc.js",
      "type": "file",
      "name": "swaggerDoc.js",
      "filePath": "server/handlers/swaggerDoc.js",
      "summary": "Aggregates all per-handler Swagger path definitions and package metadata into a single OpenAPI document served by the API.",
      "tags": [
        "api-schema",
        "swagger",
        "documentation",
        "barrel"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/handlers/tagHandler/docs.js",
      "type": "file",
      "name": "docs.js",
      "filePath": "server/handlers/tagHandler/docs.js",
      "summary": "Swagger/OpenAPI path definitions for tag endpoints, referencing the tag Joi schemas.",
      "tags": [
        "api-schema",
        "documentation",
        "swagger",
        "tag"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/handlers/tagHandler/schemas.js",
      "type": "file",
      "name": "schemas.js",
      "filePath": "server/handlers/tagHandler/schemas.js",
      "summary": "Joi validation schemas for tag creation and query request validation.",
      "tags": [
        "validation",
        "schema-definition",
        "joi",
        "tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/handlers/treeHandler/docs.js",
      "type": "file",
      "name": "docs.js",
      "filePath": "server/handlers/treeHandler/docs.js",
      "summary": "Swagger/OpenAPI path definitions for the tree endpoints, the largest handler doc covering listing, retrieval, and filtering operations.",
      "tags": [
        "api-schema",
        "documentation",
        "swagger",
        "tree"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/handlers/treeHandler/schemas.js",
      "type": "file",
      "name": "schemas.js",
      "filePath": "server/handlers/treeHandler/schemas.js",
      "summary": "Joi validation schemas for tree query parameters and request validation.",
      "tags": [
        "validation",
        "schema-definition",
        "joi",
        "tree"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routes/growerAccoutImageRoutes.js",
      "type": "file",
      "name": "growerAccoutImageRoutes.js",
      "filePath": "server/routes/growerAccoutImageRoutes.js",
      "summary": "Express router for grower account image endpoints, configuring multer file upload limits and wiring POST/PATCH routes to the image handlers.",
      "tags": [
        "router",
        "api-handler",
        "image",
        "file-upload"
      ],
      "complexity": "simple",
      "languageNotes": "Uses multer with fileFilter and a 500KB size limit to restrict uploads to jpeg/jpg/png/webp images."
    },
    {
      "id": "function:server/handlers/growerAccountImageHandler/index.js:growerAccountImageHandlerPost",
      "type": "function",
      "name": "growerAccountImageHandlerPost",
      "filePath": "server/handlers/growerAccountImageHandler/index.js",
      "lineRange": [
        11,
        25
      ],
      "summary": "Validates the grower account id, creates a GrowerAccountImageService, uploads the image file, and responds 201 with the created record.",
      "tags": [
        "api-handler",
        "image",
        "create",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/handlers/growerAccountImageHandler/index.js:growerAccountImageHandlerPatch",
      "type": "function",
      "name": "growerAccountImageHandlerPatch",
      "filePath": "server/handlers/growerAccountImageHandler/index.js",
      "lineRange": [
        27,
        45
      ],
      "summary": "Validates patch body and image id params, then updates the active flag of a grower account image via GrowerAccountImageService.",
      "tags": [
        "api-handler",
        "image",
        "update",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:__tests__/integration/capture/capture.spec.js",
      "type": "file",
      "name": "capture.spec.js",
      "filePath": "__tests__/integration/capture/capture.spec.js",
      "summary": "Integration test suite for the capture endpoints, exercising the Express app end-to-end with mock captures, grower accounts, tags and trees against a real database.",
      "tags": [
        "test",
        "integration-test",
        "capture",
        "api-handler"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "type": "file",
      "name": "grower_account.spec.js",
      "filePath": "__tests__/integration/grower_account/grower_account.spec.js",
      "summary": "Integration test suite for grower account endpoints, including image upload flows that stub the S3 infra layer.",
      "tags": [
        "test",
        "integration-test",
        "grower-account",
        "s3"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/integration/tag/tag.spec.js",
      "type": "file",
      "name": "tag.spec.js",
      "filePath": "__tests__/integration/tag/tag.spec.js",
      "summary": "Integration test suite covering the tag endpoints of the Express API with mock tag fixtures.",
      "tags": [
        "test",
        "integration-test",
        "tag"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/integration/tree/potential_matches.spec.js",
      "type": "file",
      "name": "potential_matches.spec.js",
      "filePath": "__tests__/integration/tree/potential_matches.spec.js",
      "summary": "Integration test suite validating the tree potential-matches endpoint using seeded trees, captures and grower accounts.",
      "tags": [
        "test",
        "integration-test",
        "tree",
        "matching"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/integration/tree/tree.spec.js",
      "type": "file",
      "name": "tree.spec.js",
      "filePath": "__tests__/integration/tree/tree.spec.js",
      "summary": "Integration test suite for tree endpoints, seeding trees, captures, tags and domain events to assert API behavior end-to-end.",
      "tags": [
        "test",
        "integration-test",
        "tree",
        "api-handler"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:__tests__/utils.js",
      "type": "file",
      "name": "utils.js",
      "filePath": "__tests__/utils.js",
      "summary": "Test helper module providing Knex-backed insert/delete operations for trees and captures, with a parsePoint helper that converts POINT strings into PostGIS geometry.",
      "tags": [
        "test",
        "utility",
        "database",
        "postgis"
      ],
      "complexity": "simple",
      "languageNotes": "Uses knex.raw with ST_PointFromText to build PostGIS geometry values from WKT POINT literals."
    },
    {
      "id": "file:server/app.js",
      "type": "file",
      "name": "app.js",
      "filePath": "server/app.js",
      "summary": "Express application factory that wires content-type validation middleware, Swagger UI docs, JSON body parsing, the main router, the error handler, and registers domain event handlers on startup.",
      "tags": [
        "entry-point",
        "middleware",
        "express",
        "api-handler",
        "tested"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/server.js",
      "type": "file",
      "name": "server.js",
      "filePath": "server/server.js",
      "summary": "Server bootstrap that loads environment config, initializes logging, and starts the Express app listening on the configured port.",
      "tags": [
        "entry-point",
        "bootstrap",
        "server"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/setup.js",
      "type": "file",
      "name": "setup.js",
      "filePath": "server/setup.js",
      "summary": "Global setup module that configures the loglevel default log level from the NODE_LOG_LEVEL environment variable.",
      "tags": [
        "configuration",
        "logging",
        "setup"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:__tests__/integration/events/events.spec.js",
      "type": "file",
      "name": "events.spec.js",
      "filePath": "__tests__/integration/events/events.spec.js",
      "summary": "Integration test that publishes a capture-created message through RabbitMQ and asserts the event flow, using mock capture and grower fixtures.",
      "tags": [
        "test",
        "integration",
        "messaging",
        "rabbitmq",
        "event-handler"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/integration/events/rabbitmq-test-config.js",
      "type": "file",
      "name": "rabbitmq-test-config.js",
      "filePath": "__tests__/integration/events/rabbitmq-test-config.js",
      "summary": "Test helper that builds a RabbitMQ broker configuration tailored for the integration event tests.",
      "tags": [
        "test",
        "configuration",
        "rabbitmq",
        "messaging",
        "utility"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/RabbitMQ/RabbitMQ.js",
      "type": "file",
      "name": "RabbitMQ.js",
      "filePath": "server/infra/RabbitMQ/RabbitMQ.js",
      "summary": "Infrastructure wrapper around the rascal Broker providing publish, subscribe, and teardown primitives for the message bus.",
      "tags": [
        "messaging",
        "rabbitmq",
        "service",
        "infrastructure",
        "broker"
      ],
      "complexity": "moderate",
      "languageNotes": "Uses rascal broker with republish/dead-letter recovery strategies on message nack."
    },
    {
      "id": "file:server/infra/RabbitMQ/config/index.js",
      "type": "file",
      "name": "index.js",
      "filePath": "server/infra/RabbitMQ/config/index.js",
      "summary": "Declares the rascal RabbitMQ topology (vhosts, exchanges, queues, publications, subscriptions) shared by the app and its tests.",
      "tags": [
        "configuration",
        "rabbitmq",
        "messaging",
        "infrastructure",
        "topology",
        "tested"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/CaptureService.js",
      "type": "file",
      "name": "CaptureService.js",
      "filePath": "server/services/CaptureService.js",
      "summary": "Service layer coordinating capture reads and writes, wrapping DB transactions, legacy-tree approval, and queue publication of capture-created events.",
      "tags": [
        "service",
        "data-model",
        "transaction",
        "messaging",
        "orchestration"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/services/LegacyAPIService.js",
      "type": "file",
      "name": "LegacyAPIService.js",
      "filePath": "server/services/LegacyAPIService.js",
      "summary": "Client service that approves legacy trees by issuing an authenticated axios PATCH to the legacy TreeTracker API.",
      "tags": [
        "service",
        "api-client",
        "integration",
        "legacy",
        "http"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/QueueService.js",
      "type": "file",
      "name": "QueueService.js",
      "filePath": "server/services/QueueService.js",
      "summary": "Service that owns the RabbitMQ lifecycle and publishes/subscribes domain events (capture-created, tree-created, raw-capture rejection), updating DomainEvent status on publish.",
      "tags": [
        "service",
        "messaging",
        "rabbitmq",
        "event-handler",
        "domain-event"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/RabbitMQ/RabbitMQ.js:RabbitMQ",
      "type": "class",
      "name": "RabbitMQ",
      "filePath": "server/infra/RabbitMQ/RabbitMQ.js",
      "lineRange": [
        5,
        60
      ],
      "summary": "Encapsulates a rascal Broker exposing publishMessage, subscribe, and teardownBroker with error logging and nack recovery strategies.",
      "tags": [
        "messaging",
        "rabbitmq",
        "broker",
        "infrastructure",
        "class"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/services/CaptureService.js:CaptureService",
      "type": "class",
      "name": "CaptureService",
      "filePath": "server/services/CaptureService.js",
      "lineRange": [
        6,
        81
      ],
      "summary": "Service class handling capture CRUD with transactional create/update, legacy-tree approval, and queue-based event emission.",
      "tags": [
        "service",
        "transaction",
        "data-model",
        "messaging",
        "class"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/services/QueueService.js:QueueService",
      "type": "class",
      "name": "QueueService",
      "filePath": "server/services/QueueService.js",
      "lineRange": [
        5,
        50
      ],
      "summary": "Service class managing broker init/teardown and publishing domain events while persisting DomainEvent status updates.",
      "tags": [
        "service",
        "messaging",
        "rabbitmq",
        "domain-event",
        "class"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:server/services/LegacyAPIService.js:approveLegacyTree",
      "type": "function",
      "name": "approveLegacyTree",
      "filePath": "server/services/LegacyAPIService.js",
      "lineRange": [
        9,
        37
      ],
      "summary": "Sends an authenticated axios PATCH to the legacy API to approve a tree, building the organization-scoped route.",
      "tags": [
        "api-client",
        "http",
        "legacy",
        "integration"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/S3/s3.js",
      "type": "file",
      "name": "s3.js",
      "filePath": "server/infra/S3/s3.js",
      "summary": "Instantiates and exports a shared AWS S3 client configured from environment credentials for image uploads.",
      "tags": [
        "singleton",
        "infrastructure",
        "aws-s3",
        "storage",
        "tested"
      ],
      "complexity": "simple",
      "languageNotes": "Module-level singleton pattern exporting a preconfigured aws-sdk S3 instance."
    },
    {
      "id": "file:server/models/GrowerAccountImage.js",
      "type": "file",
      "name": "GrowerAccountImage.js",
      "filePath": "server/models/GrowerAccountImage.js",
      "summary": "Domain model for grower account images that shapes response objects and delegates create/update persistence to its repository.",
      "tags": [
        "data-model",
        "domain",
        "serialization"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/models/GrowerAccountImage.js:GrowerAccountImage",
      "type": "class",
      "name": "GrowerAccountImage",
      "filePath": "server/models/GrowerAccountImage.js",
      "lineRange": [
        3,
        49
      ],
      "summary": "Encapsulates grower account image data, building frozen response objects and persisting new or updated images through the repository.",
      "tags": [
        "data-model",
        "domain",
        "serialization"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/repositories/GrowerAccountImageRepository.js",
      "type": "file",
      "name": "GrowerAccountImageRepository.js",
      "filePath": "server/repositories/GrowerAccountImageRepository.js",
      "summary": "Data access repository for the grower_account_image table, extending BaseRepository for shared CRUD behavior.",
      "tags": [
        "repository",
        "data-access",
        "persistence"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/repositories/GrowerAccountImageRepository.js:GrowerAccountImageRepository",
      "type": "class",
      "name": "GrowerAccountImageRepository",
      "filePath": "server/repositories/GrowerAccountImageRepository.js",
      "lineRange": [
        3,
        9
      ],
      "summary": "Repository subclass binding grower_account_image table operations to the shared BaseRepository CRUD implementation.",
      "tags": [
        "repository",
        "data-access",
        "persistence"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/GrowerAccountImageService.js",
      "type": "file",
      "name": "GrowerAccountImageService.js",
      "filePath": "server/services/GrowerAccountImageService.js",
      "summary": "Service orchestrating grower account image creation and updates by uploading files to S3 and persisting records within a transaction, with rollback and temp-file cleanup on failure.",
      "tags": [
        "service",
        "business-logic",
        "aws-s3",
        "transaction"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/services/GrowerAccountImageService.js:GrowerAccountImageService",
      "type": "class",
      "name": "GrowerAccountImageService",
      "filePath": "server/services/GrowerAccountImageService.js",
      "lineRange": [
        6,
        54
      ],
      "summary": "Coordinates image upload to S3 and database persistence for grower accounts, rolling back the transaction and unlinking temp files when an error occurs.",
      "tags": [
        "service",
        "business-logic",
        "aws-s3",
        "transaction"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/services/S3Service.js",
      "type": "file",
      "name": "S3Service.js",
      "filePath": "server/services/S3Service.js",
      "summary": "Thin wrapper exposing an uploadImage helper that pushes image buffers to the configured S3 bucket.",
      "tags": [
        "service",
        "aws-s3",
        "storage",
        "utility"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/services/S3Service.js:uploadImage",
      "type": "function",
      "name": "uploadImage",
      "filePath": "server/services/S3Service.js",
      "lineRange": [
        3,
        14
      ],
      "summary": "Uploads an image buffer to S3 under the given key and mimetype, returning the upload promise result.",
      "tags": [
        "aws-s3",
        "storage",
        "upload"
      ],
      "complexity": "simple"
    },
    {
      "id": "service:Dockerfile",
      "type": "service",
      "name": "Dockerfile",
      "filePath": "Dockerfile",
      "summary": "Single-stage Docker build on node:16-alpine that installs dependencies with npm ci and runs the API via 'node .' as the container command.",
      "tags": [
        "containerization",
        "infrastructure",
        "deployment",
        "nodejs"
      ],
      "complexity": "simple",
      "languageNotes": "Copies package manifests before source to leverage Docker layer caching for the npm ci step."
    },
    {
      "id": "config:.dockerignore",
      "type": "config",
      "name": ".dockerignore",
      "filePath": ".dockerignore",
      "summary": "Excludes node_modules from the Docker build context so dependencies install fresh inside the image.",
      "tags": [
        "configuration",
        "containerization",
        "infrastructure",
        "build-system"
      ],
      "complexity": "simple"
    },
    {
      "id": "pipeline:.github/workflows/test-tool-test-env.yml",
      "type": "pipeline",
      "name": "test-tool-test-env.yml",
      "filePath": ".github/workflows/test-tool-test-env.yml",
      "summary": "Manually dispatched GitHub Actions workflow that runs an arbitrary seed-data CLI command against the test Kubernetes cluster via doctl and kubectl exec.",
      "tags": [
        "ci-cd",
        "infrastructure",
        "kubernetes",
        "seed-data",
        "test-env"
      ],
      "complexity": "simple",
      "languageNotes": "workflow_dispatch input passes a free-form command into `npm run seed-cli` inside the running deployment pod."
    },
    {
      "id": "pipeline:.github/workflows/test-tool.yml",
      "type": "pipeline",
      "name": "test-tool.yml",
      "filePath": ".github/workflows/test-tool.yml",
      "summary": "Manually dispatched GitHub Actions workflow that runs an arbitrary seed-data CLI command against the dev Kubernetes cluster via doctl and kubectl exec.",
      "tags": [
        "ci-cd",
        "infrastructure",
        "kubernetes",
        "seed-data",
        "dev-env"
      ],
      "complexity": "simple",
      "languageNotes": "Near-identical twin of test-tool-test-env.yml but targets the dev DigitalOcean cluster secrets."
    },
    {
      "id": "pipeline:.github/workflows/treetracker-api-build-deploy-dev.yml",
      "type": "pipeline",
      "name": "treetracker-api-build-deploy-dev.yml",
      "filePath": ".github/workflows/treetracker-api-build-deploy-dev.yml",
      "summary": "Main CI/CD pipeline on push to main: runs lint, migrations and tests against Postgres/RabbitMQ service containers, then semantic-release, builds and pushes the Docker image, and bumps the dev kustomize overlay.",
      "tags": [
        "ci-cd",
        "deployment",
        "containerization",
        "semantic-release",
        "kustomize"
      ],
      "complexity": "moderate",
      "languageNotes": "Two-stage pipeline (test -> release) using service containers for Postgres and RabbitMQ; release job outputs the bumped version and commits an updated kustomization."
    },
    {
      "id": "pipeline:.github/workflows/treetracker-api-deploy-dev.yml",
      "type": "pipeline",
      "name": "treetracker-api-deploy-dev.yml",
      "filePath": ".github/workflows/treetracker-api-deploy-dev.yml",
      "summary": "Manually dispatched workflow that sets a given image tag in the development kustomize overlay and commits the change to trigger a dev deployment.",
      "tags": [
        "ci-cd",
        "deployment",
        "kustomize",
        "dev-env",
        "manual-dispatch"
      ],
      "complexity": "simple"
    },
    {
      "id": "pipeline:.github/workflows/treetracker-api-deploy-prod.yml",
      "type": "pipeline",
      "name": "treetracker-api-deploy-prod.yml",
      "filePath": ".github/workflows/treetracker-api-deploy-prod.yml",
      "summary": "Manually dispatched workflow that sets a given image tag in the production kustomize overlay and commits the change to trigger a prod deployment.",
      "tags": [
        "ci-cd",
        "deployment",
        "kustomize",
        "prod-env",
        "manual-dispatch"
      ],
      "complexity": "simple"
    },
    {
      "id": "pipeline:.github/workflows/treetracker-api-deploy-test.yml",
      "type": "pipeline",
      "name": "treetracker-api-deploy-test.yml",
      "filePath": ".github/workflows/treetracker-api-deploy-test.yml",
      "summary": "Manually dispatched workflow that sets a given image tag in the test kustomize overlay and commits the change to trigger a test deployment.",
      "tags": [
        "ci-cd",
        "deployment",
        "kustomize",
        "test-env",
        "manual-dispatch"
      ],
      "complexity": "simple"
    },
    {
      "id": "pipeline:.github/workflows/treetracker-api-pull-request-ci.yml",
      "type": "pipeline",
      "name": "treetracker-api-pull-request-ci.yml",
      "filePath": ".github/workflows/treetracker-api-pull-request-ci.yml",
      "summary": "Pull-request CI workflow that installs dependencies and runs ESLint, database migrations and the API test suite against Postgres/RabbitMQ service containers on PRs to main.",
      "tags": [
        "ci-cd",
        "test",
        "lint",
        "database",
        "pull-request"
      ],
      "complexity": "moderate",
      "languageNotes": "Uses service containers with health-check options for Postgres (postgis) and RabbitMQ to provide the integration-test environment."
    },
    {
      "id": "step:.github/workflows/test-tool-test-env.yml:seed",
      "type": "pipeline",
      "name": "seed",
      "summary": "Job that installs doctl, saves the test cluster kubeconfig, and executes the seed-cli command inside the treetracker-api deployment pod.",
      "tags": [
        "ci-cd",
        "kubernetes",
        "seed-data"
      ],
      "complexity": "simple"
    },
    {
      "id": "step:.github/workflows/test-tool.yml:seed",
      "type": "pipeline",
      "name": "seed",
      "summary": "Job that installs doctl, saves the dev cluster kubeconfig, and executes the seed-cli command inside the treetracker-api deployment pod.",
      "tags": [
        "ci-cd",
        "kubernetes",
        "seed-data"
      ],
      "complexity": "simple"
    },
    {
      "id": "step:.github/workflows/treetracker-api-build-deploy-dev.yml:test",
      "type": "pipeline",
      "name": "test",
      "summary": "Test job that runs npm ci, ESLint, database migrations and the API test suite against Postgres and RabbitMQ service containers.",
      "tags": [
        "ci-cd",
        "test",
        "lint",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "step:.github/workflows/treetracker-api-build-deploy-dev.yml:release",
      "type": "pipeline",
      "name": "release",
      "summary": "Release job that runs semantic-release, builds and pushes the Docker image, then updates and commits the dev kustomize overlay with the bumped version.",
      "tags": [
        "ci-cd",
        "deployment",
        "containerization",
        "semantic-release"
      ],
      "complexity": "moderate"
    },
    {
      "id": "step:.github/workflows/treetracker-api-deploy-dev.yml:deploy-dev",
      "type": "pipeline",
      "name": "deploy-dev",
      "summary": "Job that installs kustomize, sets the requested image tag in the development overlay, and commits/pushes the change.",
      "tags": [
        "ci-cd",
        "deployment",
        "kustomize"
      ],
      "complexity": "simple"
    },
    {
      "id": "step:.github/workflows/treetracker-api-deploy-prod.yml:deploy-prod",
      "type": "pipeline",
      "name": "deploy-prod",
      "summary": "Job that installs kustomize, sets the requested image tag in the production overlay, and commits/pushes the change.",
      "tags": [
        "ci-cd",
        "deployment",
        "kustomize"
      ],
      "complexity": "simple"
    },
    {
      "id": "step:.github/workflows/treetracker-api-deploy-test.yml:deploy-test",
      "type": "pipeline",
      "name": "deploy-test",
      "summary": "Job that installs kustomize, sets the requested image tag in the test overlay, and commits/pushes the change.",
      "tags": [
        "ci-cd",
        "deployment",
        "kustomize"
      ],
      "complexity": "simple"
    },
    {
      "id": "step:.github/workflows/treetracker-api-pull-request-ci.yml:test",
      "type": "pipeline",
      "name": "test",
      "summary": "Job that runs npm ci, ESLint, database migrations and the API test suite against Postgres and RabbitMQ service containers on pull requests.",
      "tags": [
        "ci-cd",
        "test",
        "lint",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:.prettierrc.json",
      "type": "config",
      "name": ".prettierrc.json",
      "filePath": ".prettierrc.json",
      "summary": "Prettier code formatter configuration setting no semicolons, trailing commas, and single quotes across the codebase.",
      "tags": [
        "configuration",
        "formatting",
        "prettier",
        "code-style"
      ],
      "complexity": "simple"
    },
    {
      "id": "document:CHANGELOG.md",
      "type": "document",
      "name": "CHANGELOG.md",
      "filePath": "CHANGELOG.md",
      "summary": "Auto-generated release changelog listing Features and Bug Fixes for every version from 1.0.0 through 1.34.0 with links to GitHub compare diffs.",
      "tags": [
        "documentation",
        "changelog",
        "release-notes",
        "versioning"
      ],
      "complexity": "complex",
      "languageNotes": "Conventional-commit style changelog generated by semantic-release; each version has Features and Bug Fixes subsections."
    },
    {
      "id": "document:README.md",
      "type": "document",
      "name": "README.md",
      "filePath": "README.md",
      "summary": "Getting-started guide for the TreeTracker API microservice covering project setup, Postgres database setup and migration, the layered MVC-like architecture, and testing and seeding workflows.",
      "tags": [
        "documentation",
        "entry-point",
        "getting-started",
        "overview"
      ],
      "complexity": "moderate"
    },
    {
      "id": "config:package.json",
      "type": "config",
      "name": "package.json",
      "filePath": "package.json",
      "summary": "npm manifest for the treetracker microservice declaring the server entry point, lint/test/seed/migration scripts, and Express/Knex/Postgres runtime and test dependencies.",
      "tags": [
        "configuration",
        "npm",
        "build-system",
        "dependencies"
      ],
      "complexity": "moderate",
      "languageNotes": "Scripts wire mocha integration/repository suites, eslint+prettier, nodemon dev server, and db-migrate/knex seeding."
    },
    {
      "id": "config:__tests__/mock/attributes.json",
      "type": "config",
      "name": "attributes.json",
      "filePath": "__tests__/mock/attributes.json",
      "summary": "Test fixture holding a sample attributes object used to seed capture and tree records in integration tests.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "attributes"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/capture1.json",
      "type": "config",
      "name": "capture1.json",
      "filePath": "__tests__/mock/capture1.json",
      "summary": "Mock capture record fixture consumed by capture, events, and tree integration specs to drive test scenarios.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "capture"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/capture2.json",
      "type": "config",
      "name": "capture2.json",
      "filePath": "__tests__/mock/capture2.json",
      "summary": "Second mock capture record fixture used by the capture integration spec for multi-record test cases.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "capture"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/domain_event1.json",
      "type": "config",
      "name": "domain_event1.json",
      "filePath": "__tests__/mock/domain_event1.json",
      "summary": "Mock domain event fixture used by the tree integration spec to validate event handling.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "domain-event"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/domain_event2.json",
      "type": "config",
      "name": "domain_event2.json",
      "filePath": "__tests__/mock/domain_event2.json",
      "summary": "Second mock domain event fixture consumed by the capture integration spec for event-driven test cases.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "domain-event"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/grower_account1.json",
      "type": "config",
      "name": "grower_account1.json",
      "filePath": "__tests__/mock/grower_account1.json",
      "summary": "Mock grower account fixture seeded by capture, events, grower_account, and tree integration specs.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/grower_account2.json",
      "type": "config",
      "name": "grower_account2.json",
      "filePath": "__tests__/mock/grower_account2.json",
      "summary": "Second mock grower account fixture used by the capture and grower_account integration specs.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/tag1.json",
      "type": "config",
      "name": "tag1.json",
      "filePath": "__tests__/mock/tag1.json",
      "summary": "Minimal mock tag fixture consumed by the tag integration spec.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/tag2.json",
      "type": "config",
      "name": "tag2.json",
      "filePath": "__tests__/mock/tag2.json",
      "summary": "Second mock tag fixture used by the capture and tree integration specs.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/tree1.json",
      "type": "config",
      "name": "tree1.json",
      "filePath": "__tests__/mock/tree1.json",
      "summary": "Mock tree record fixture consumed by capture, potential_matches, and tree integration specs.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "tree"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:__tests__/mock/tree2.json",
      "type": "config",
      "name": "tree2.json",
      "filePath": "__tests__/mock/tree2.json",
      "summary": "Second mock tree record fixture used by the potential_matches and tree integration specs.",
      "tags": [
        "test-fixture",
        "mock-data",
        "configuration",
        "tree"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20210117023353-status-enum-up.sql:capture_status",
      "type": "table",
      "name": "20210117023353-status-enum-up.sql",
      "filePath": "database/migrations/sqls/20210117023353-status-enum-up.sql",
      "summary": "Migration that creates the Postgres status enum type used by capture and tree records.",
      "tags": [
        "database",
        "migration",
        "schema-definition",
        "enum"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20210117023353-status-enum-down.sql:capture_status",
      "type": "table",
      "name": "20210117023353-status-enum-down.sql",
      "filePath": "database/migrations/sqls/20210117023353-status-enum-down.sql",
      "summary": "Rollback migration that drops the status enum type created by its up counterpart.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "enum"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20210218195106-capture-up.sql:capture",
      "type": "table",
      "name": "20210218195106-capture-up.sql",
      "filePath": "database/migrations/sqls/20210218195106-capture-up.sql",
      "summary": "Creates the core capture table storing tree-capture observations with GPS location, imagery, planter and species metadata, plus seven supporting indexes.",
      "tags": [
        "database",
        "migration",
        "schema-definition",
        "capture",
        "geospatial"
      ],
      "complexity": "moderate",
      "languageNotes": "Uses a GiST index on estimated_geometric_location for PostGIS geospatial queries."
    },
    {
      "id": "table:database/migrations/sqls/20210218195106-capture-down.sql:capture",
      "type": "table",
      "name": "20210218195106-capture-down.sql",
      "filePath": "database/migrations/sqls/20210218195106-capture-down.sql",
      "summary": "Rollback migration that drops the capture table and its indexes.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "capture"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20210219042951-domain-event-up.sql:domain_event",
      "type": "table",
      "name": "20210219042951-domain-event-up.sql",
      "filePath": "database/migrations/sqls/20210219042951-domain-event-up.sql",
      "summary": "Creates the domain_event table for the outbox/event pattern with status and payload indexes plus yearly partitioned event tables for sent and handled events.",
      "tags": [
        "database",
        "migration",
        "schema-definition",
        "domain-event",
        "event-sourcing"
      ],
      "complexity": "moderate",
      "languageNotes": "Defines partitioned tables (domain_event_sent_2021..2023, domain_event_handled_2021..2023) for time-based event archival."
    },
    {
      "id": "table:database/migrations/sqls/20210219042951-domain-event-down.sql:domain_event",
      "type": "table",
      "name": "20210219042951-domain-event-down.sql",
      "filePath": "database/migrations/sqls/20210219042951-domain-event-down.sql",
      "summary": "Rollback migration that drops the domain_event table and related partitions.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "domain-event"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20210219043110-tree-up.sql:tree",
      "type": "table",
      "name": "20210219043110-tree-up.sql",
      "filePath": "database/migrations/sqls/20210219043110-tree-up.sql",
      "summary": "Creates the core tree table referencing its latest capture, storing GPS location, species and status, with supporting status, date and geospatial indexes.",
      "tags": [
        "database",
        "migration",
        "schema-definition",
        "tree",
        "geospatial"
      ],
      "complexity": "simple",
      "languageNotes": "GiST index on estimated_geometric_location supports PostGIS spatial lookups."
    },
    {
      "id": "table:database/migrations/sqls/20210219043110-tree-down.sql:tree",
      "type": "table",
      "name": "20210219043110-tree-down.sql",
      "filePath": "database/migrations/sqls/20210219043110-tree-down.sql",
      "summary": "Rollback migration that drops the tree table and its indexes.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "tree"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20210503011318-rename-to-location-up.sql:estimated_geometric_location",
      "type": "table",
      "name": "20210503011318-rename-to-location-up.sql",
      "filePath": "database/migrations/sqls/20210503011318-rename-to-location-up.sql",
      "summary": "Migration that renames geospatial location columns and indexes on the capture and tree tables to a consistent location naming.",
      "tags": [
        "database",
        "migration",
        "rename",
        "geospatial"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20210503011318-rename-to-location-down.sql:estimated_geometric_location",
      "type": "table",
      "name": "20210503011318-rename-to-location-down.sql",
      "filePath": "database/migrations/sqls/20210503011318-rename-to-location-down.sql",
      "summary": "Rollback migration that reverts the location column and index renames on capture and tree.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "rename"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211217023643-grower-account-up.sql:grower_account",
      "type": "table",
      "name": "20211217023643-grower-account-up.sql",
      "filePath": "database/migrations/sqls/20211217023643-grower-account-up.sql",
      "summary": "Creates the grower_account table linking wallets, person and organization identifiers with contact and profile metadata for tree growers.",
      "tags": [
        "database",
        "migration",
        "schema-definition",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211217023643-grower-account-down.sql:grower_account",
      "type": "table",
      "name": "20211217023643-grower-account-down.sql",
      "filePath": "database/migrations/sqls/20211217023643-grower-account-down.sql",
      "summary": "Rollback migration that drops the grower_account table.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219082806-tag-up.sql:tag",
      "type": "table",
      "name": "20211219082806-tag-up.sql",
      "filePath": "database/migrations/sqls/20211219082806-tag-up.sql",
      "summary": "Creates the tag table storing named, public/private labels applied to captures and trees.",
      "tags": [
        "database",
        "migration",
        "schema-definition",
        "tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219082806-tag-down.sql:tag",
      "type": "table",
      "name": "20211219082806-tag-down.sql",
      "filePath": "database/migrations/sqls/20211219082806-tag-down.sql",
      "summary": "Rollback migration that drops the tag table.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219142620-capture-tag-up.sql:capture_tag",
      "type": "table",
      "name": "20211219142620-capture-tag-up.sql",
      "filePath": "database/migrations/sqls/20211219142620-capture-tag-up.sql",
      "summary": "Creates the capture_tag join table linking captures to tags in a many-to-many relationship.",
      "tags": [
        "database",
        "migration",
        "schema-definition",
        "join-table",
        "capture-tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219142620-capture-tag-down.sql:capture_tag",
      "type": "table",
      "name": "20211219142620-capture-tag-down.sql",
      "filePath": "database/migrations/sqls/20211219142620-capture-tag-down.sql",
      "summary": "Rollback migration that drops the capture_tag join table.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "capture-tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219143359-tree-tag-up.sql:tree_tag",
      "type": "table",
      "name": "20211219143359-tree-tag-up.sql",
      "filePath": "database/migrations/sqls/20211219143359-tree-tag-up.sql",
      "summary": "Creates the tree_tag join table linking trees to tags in a many-to-many relationship.",
      "tags": [
        "database",
        "migration",
        "schema-definition",
        "join-table",
        "tree-tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219143359-tree-tag-down.sql:tree_tag",
      "type": "table",
      "name": "20211219143359-tree-tag-down.sql",
      "filePath": "database/migrations/sqls/20211219143359-tree-tag-down.sql",
      "summary": "Rollback migration that drops the tree_tag join table.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "tree-tag"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219205211-rename-capture-location-up.sql:capture_est_gmtric_loc_idx_gist",
      "type": "table",
      "name": "20211219205211-rename-capture-location-up.sql",
      "filePath": "database/migrations/sqls/20211219205211-rename-capture-location-up.sql",
      "summary": "Migration that renames the capture geospatial location GiST index for naming consistency.",
      "tags": [
        "database",
        "migration",
        "rename",
        "index",
        "geospatial"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219205211-rename-capture-location-down.sql:capture_est_gmtric_loc_idx_gist",
      "type": "table",
      "name": "20211219205211-rename-capture-location-down.sql",
      "filePath": "database/migrations/sqls/20211219205211-rename-capture-location-down.sql",
      "summary": "Rollback migration that reverts the capture location GiST index rename.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "index"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219205822-rename-tree-location-down.sql:tree",
      "type": "table",
      "name": "20211219205822-rename-tree-location-down.sql",
      "filePath": "database/migrations/sqls/20211219205822-rename-tree-location-down.sql",
      "summary": "Rollback migration renaming tree.estimated_geometric_location back to location and rebuilding the GiST spatial index.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "tree",
        "spatial-index"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219205822-rename-tree-location-up.sql:tree",
      "type": "table",
      "name": "20211219205822-rename-tree-location-up.sql",
      "filePath": "database/migrations/sqls/20211219205822-rename-tree-location-up.sql",
      "summary": "Renames tree.location to estimated_geometric_location and rebuilds the GiST spatial index on the column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "tree",
        "spatial-index"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219211516-capture-device-update-down.sql:capture",
      "type": "table",
      "name": "20211219211516-capture-device-update-down.sql",
      "filePath": "database/migrations/sqls/20211219211516-capture-device-update-down.sql",
      "summary": "Rollback restoring capture.device_identifier varchar column and dropping device_configuration_id.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219211516-capture-device-update-up.sql:capture",
      "type": "table",
      "name": "20211219211516-capture-device-update-up.sql",
      "filePath": "database/migrations/sqls/20211219211516-capture-device-update-up.sql",
      "summary": "Replaces capture.device_identifier with a required device_configuration_id uuid column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219211814-capture-session-id-down.sql:capture",
      "type": "table",
      "name": "20211219211814-capture-session-id-down.sql",
      "filePath": "database/migrations/sqls/20211219211814-capture-session-id-down.sql",
      "summary": "Rollback dropping the capture.session_id column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219211814-capture-session-id-up.sql:capture",
      "type": "table",
      "name": "20211219211814-capture-session-id-up.sql",
      "filePath": "database/migrations/sqls/20211219211814-capture-session-id-up.sql",
      "summary": "Adds a required session_id uuid column to the capture table.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219212027-update-tree-status-down.sql:tree",
      "type": "table",
      "name": "20211219212027-update-tree-status-down.sql",
      "filePath": "database/migrations/sqls/20211219212027-update-tree-status-down.sql",
      "summary": "Rollback converting tree.status back to a plain varchar column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "tree",
        "enum"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219212027-update-tree-status-up.sql:tree",
      "type": "table",
      "name": "20211219212027-update-tree-status-up.sql",
      "filePath": "database/migrations/sqls/20211219212027-update-tree-status-up.sql",
      "summary": "Replaces tree.status varchar with the status enum type defaulting to active.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "tree",
        "enum"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219213129-update-capture-status-down.sql:capture",
      "type": "table",
      "name": "20211219213129-update-capture-status-down.sql",
      "filePath": "database/migrations/sqls/20211219213129-update-capture-status-down.sql",
      "summary": "Rollback converting capture.status back to a plain varchar column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "enum"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219213129-update-capture-status-up.sql:capture",
      "type": "table",
      "name": "20211219213129-update-capture-status-up.sql",
      "filePath": "database/migrations/sqls/20211219213129-update-capture-status-up.sql",
      "summary": "Replaces capture.status varchar with the status enum type defaulting to active.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "enum"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219213548-tree-attributes-down.sql:tree",
      "type": "table",
      "name": "20211219213548-tree-attributes-down.sql",
      "filePath": "database/migrations/sqls/20211219213548-tree-attributes-down.sql",
      "summary": "Rollback dropping the tree.attributes jsonb column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "tree",
        "jsonb"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219213548-tree-attributes-up.sql:tree",
      "type": "table",
      "name": "20211219213548-tree-attributes-up.sql",
      "filePath": "database/migrations/sqls/20211219213548-tree-attributes-up.sql",
      "summary": "Adds a jsonb attributes column to the tree table.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "tree",
        "jsonb"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219233755-planter-to-grower-down.sql:capture",
      "type": "table",
      "name": "20211219233755-planter-to-grower-down.sql",
      "filePath": "database/migrations/sqls/20211219233755-planter-to-grower-down.sql",
      "summary": "Rollback renaming grower columns back to planter and restoring integer planter_id and organization columns on capture.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "rename"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211219233755-planter-to-grower-up.sql:capture",
      "type": "table",
      "name": "20211219233755-planter-to-grower-up.sql",
      "filePath": "database/migrations/sqls/20211219233755-planter-to-grower-up.sql",
      "summary": "Renames capture planter columns to grower and adds a uuid grower_id foreign key to grower_account plus a uuid planting_organization_id.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "rename"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211220234459-capture-species-uuid-down.sql:capture",
      "type": "table",
      "name": "20211220234459-capture-species-uuid-down.sql",
      "filePath": "database/migrations/sqls/20211220234459-capture-species-uuid-down.sql",
      "summary": "Rollback reverting capture.species_id back to an int4 column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "uuid-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211220234459-capture-species-uuid-up.sql:capture",
      "type": "table",
      "name": "20211220234459-capture-species-uuid-up.sql",
      "filePath": "database/migrations/sqls/20211220234459-capture-species-uuid-up.sql",
      "summary": "Converts capture.species_id from int4 to a uuid column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture",
        "uuid-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211220234707-tree-species-uuid-down.sql:tree",
      "type": "table",
      "name": "20211220234707-tree-species-uuid-down.sql",
      "filePath": "database/migrations/sqls/20211220234707-tree-species-uuid-down.sql",
      "summary": "Rollback reverting tree.species_id back to an int4 column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "tree",
        "uuid-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211220234707-tree-species-uuid-up.sql:tree",
      "type": "table",
      "name": "20211220234707-tree-species-uuid-up.sql",
      "filePath": "database/migrations/sqls/20211220234707-tree-species-uuid-up.sql",
      "summary": "Converts tree.species_id from int4 to a uuid column.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "tree",
        "uuid-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211222232655-add-capture-tag-unique-down.sql:capture_tag",
      "type": "table",
      "name": "20211222232655-add-capture-tag-unique-down.sql",
      "filePath": "database/migrations/sqls/20211222232655-add-capture-tag-unique-down.sql",
      "summary": "Rollback dropping the unique_capture_tag index.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture_tag",
        "unique-constraint"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211222232655-add-capture-tag-unique-up.sql:capture_tag",
      "type": "table",
      "name": "20211222232655-add-capture-tag-unique-up.sql",
      "filePath": "database/migrations/sqls/20211222232655-add-capture-tag-unique-up.sql",
      "summary": "Adds a unique index on capture_tag(capture_id, tag_id) to prevent duplicate capture tags.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "capture_tag",
        "unique-constraint"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211222232830-add-tree-tag-unique-up.sql:tree_tag",
      "type": "table",
      "name": "20211222232830-add-tree-tag-unique-up.sql",
      "filePath": "database/migrations/sqls/20211222232830-add-tree-tag-unique-up.sql",
      "summary": "Adds a unique index on (tree_id, tag_id) to prevent duplicate tag assignments on trees.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211222232830-add-tree-tag-unique-down.sql:tree_tag",
      "type": "table",
      "name": "20211222232830-add-tree-tag-unique-down.sql",
      "filePath": "database/migrations/sqls/20211222232830-add-tree-tag-unique-down.sql",
      "summary": "Reverts the tree_tag unique index migration (empty rollback).",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211230232949-change-public-up.sql:tag",
      "type": "table",
      "name": "20211230232949-change-public-up.sql",
      "filePath": "database/migrations/sqls/20211230232949-change-public-up.sql",
      "summary": "Renames the tag.public column to isPublic.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20211230232949-change-public-down.sql:tag",
      "type": "table",
      "name": "20211230232949-change-public-down.sql",
      "filePath": "database/migrations/sqls/20211230232949-change-public-down.sql",
      "summary": "Reverts the tag column rename (empty rollback).",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220114035335-add-tag-name-unique-constraint-up.sql:tag",
      "type": "table",
      "name": "20220114035335-add-tag-name-unique-constraint-up.sql",
      "filePath": "database/migrations/sqls/20220114035335-add-tag-name-unique-constraint-up.sql",
      "summary": "Adds a unique constraint on tag.name.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220114035335-add-tag-name-unique-constraint-down.sql:tag",
      "type": "table",
      "name": "20220114035335-add-tag-name-unique-constraint-down.sql",
      "filePath": "database/migrations/sqls/20220114035335-add-tag-name-unique-constraint-down.sql",
      "summary": "Drops the tag_name_unique constraint.",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220119035259-drop-wallet-not-null-up.sql:grower_account",
      "type": "table",
      "name": "20220119035259-drop-wallet-not-null-up.sql",
      "filePath": "database/migrations/sqls/20220119035259-drop-wallet-not-null-up.sql",
      "summary": "Drops the NOT NULL constraint on grower_account.wallet_id.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220119035259-drop-wallet-not-null-down.sql:grower_account",
      "type": "table",
      "name": "20220119035259-drop-wallet-not-null-down.sql",
      "filePath": "database/migrations/sqls/20220119035259-drop-wallet-not-null-down.sql",
      "summary": "Reverts the wallet_id NOT NULL change (empty rollback).",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220119035317-add-wallet-unique-up.sql:grower_account",
      "type": "table",
      "name": "20220119035317-add-wallet-unique-up.sql",
      "filePath": "database/migrations/sqls/20220119035317-add-wallet-unique-up.sql",
      "summary": "Adds a unique constraint on grower_account.wallet.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220119035317-add-wallet-unique-down.sql:grower_account",
      "type": "table",
      "name": "20220119035317-add-wallet-unique-down.sql",
      "filePath": "database/migrations/sqls/20220119035317-add-wallet-unique-down.sql",
      "summary": "Drops the wallet_name_unique constraint on grower_account.",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220124203531-update-grower-account-name-up.sql:grower_account",
      "type": "table",
      "name": "20220124203531-update-grower-account-name-up.sql",
      "filePath": "database/migrations/sqls/20220124203531-update-grower-account-name-up.sql",
      "summary": "Renames grower_account.name to first_name and adds a last_name column.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220124203531-update-grower-account-name-down.sql:grower_account",
      "type": "table",
      "name": "20220124203531-update-grower-account-name-down.sql",
      "filePath": "database/migrations/sqls/20220124203531-update-grower-account-name-down.sql",
      "summary": "Reverts the grower_account name split (drops last_name, restores name).",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220127232527-AddCreateAtDefaultCapture-up.sql:capture",
      "type": "table",
      "name": "20220127232527-AddCreateAtDefaultCapture-up.sql",
      "filePath": "database/migrations/sqls/20220127232527-AddCreateAtDefaultCapture-up.sql",
      "summary": "Sets a default of now() on capture.created_at.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220127232527-AddCreateAtDefaultCapture-down.sql:capture",
      "type": "table",
      "name": "20220127232527-AddCreateAtDefaultCapture-down.sql",
      "filePath": "database/migrations/sqls/20220127232527-AddCreateAtDefaultCapture-down.sql",
      "summary": "Removes the default value from capture.created_at.",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220127232724-AddCapturedAtToCapture-up.sql:capture",
      "type": "table",
      "name": "20220127232724-AddCapturedAtToCapture-up.sql",
      "filePath": "database/migrations/sqls/20220127232724-AddCapturedAtToCapture-up.sql",
      "summary": "Adds a NOT NULL captured_at timestamp column to capture, backfilled with now().",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220127232724-AddCapturedAtToCapture-down.sql:capture",
      "type": "table",
      "name": "20220127232724-AddCapturedAtToCapture-down.sql",
      "filePath": "database/migrations/sqls/20220127232724-AddCapturedAtToCapture-down.sql",
      "summary": "Drops the captured_at column from capture.",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220203193500-drop-grower-username-photo-url-up.sql:capture",
      "type": "table",
      "name": "20220203193500-drop-grower-username-photo-url-up.sql",
      "filePath": "database/migrations/sqls/20220203193500-drop-grower-username-photo-url-up.sql",
      "summary": "Drops the grower_username and grower_photo_url columns from capture.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220203193500-drop-grower-username-photo-url-down.sql:capture",
      "type": "table",
      "name": "20220203193500-drop-grower-username-photo-url-down.sql",
      "filePath": "database/migrations/sqls/20220203193500-drop-grower-username-photo-url-down.sql",
      "summary": "Restores the grower_username and grower_photo_url columns on capture.",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220203200214-rename-grower-id-in-capture-up.sql:capture",
      "type": "table",
      "name": "20220203200214-rename-grower-id-in-capture-up.sql",
      "filePath": "database/migrations/sqls/20220203200214-rename-grower-id-in-capture-up.sql",
      "summary": "Renames capture.grower_id to grower_account_id and indexes it.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220203200214-rename-grower-id-in-capture-down.sql:capture",
      "type": "table",
      "name": "20220203200214-rename-grower-id-in-capture-down.sql",
      "filePath": "database/migrations/sqls/20220203200214-rename-grower-id-in-capture-down.sql",
      "summary": "Reverts the grower_account_id rename and drops its index on capture.",
      "tags": [
        "database",
        "migration",
        "sql",
        "rollback"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220204225428-drop-wallet-id-grower-account-up.sql:grower_account",
      "type": "table",
      "name": "20220204225428-drop-wallet-id-grower-account-up.sql",
      "filePath": "database/migrations/sqls/20220204225428-drop-wallet-id-grower-account-up.sql",
      "summary": "Drops the wallet_id column from grower_account and recreates the unique wallet index. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220204225428-drop-wallet-id-grower-account-down.sql:grower_account",
      "type": "table",
      "name": "20220204225428-drop-wallet-id-grower-account-down.sql",
      "filePath": "database/migrations/sqls/20220204225428-drop-wallet-id-grower-account-down.sql",
      "summary": "Reverses the '20220204225428-drop-wallet-id-grower-account' migration on the grower_account table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220221084222-growerAccountLocation-up.sql:grower_account",
      "type": "table",
      "name": "20220221084222-growerAccountLocation-up.sql",
      "filePath": "database/migrations/sqls/20220221084222-growerAccountLocation-up.sql",
      "summary": "Adds geospatial location (POINT geometry 4326), lat and lon columns to grower_account. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220221084222-growerAccountLocation-down.sql:grower_account",
      "type": "table",
      "name": "20220221084222-growerAccountLocation-down.sql",
      "filePath": "database/migrations/sqls/20220221084222-growerAccountLocation-down.sql",
      "summary": "Reverses the '20220221084222-growerAccountLocation' migration on the grower_account table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220321204145-grower-account-organization-up.sql:grower_account_org",
      "type": "table",
      "name": "20220321204145-grower-account-organization-up.sql",
      "filePath": "database/migrations/sqls/20220321204145-grower-account-organization-up.sql",
      "summary": "Creates the grower_account_org join table linking grower accounts to organizations with status and audit timestamps. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220321204145-grower-account-organization-down.sql:grower_account_org",
      "type": "table",
      "name": "20220321204145-grower-account-organization-down.sql",
      "filePath": "database/migrations/sqls/20220321204145-grower-account-organization-down.sql",
      "summary": "Reverses the '20220321204145-grower-account-organization' migration on the grower_account_org table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220411074015-add-grower-account-bulk-pack-file-name-up.sql:grower_account",
      "type": "table",
      "name": "20220411074015-add-grower-account-bulk-pack-file-name-up.sql",
      "filePath": "database/migrations/sqls/20220411074015-add-grower-account-bulk-pack-file-name-up.sql",
      "summary": "Adds the bulk_pack_file_name column to grower_account. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220411074015-add-grower-account-bulk-pack-file-name-down.sql:grower_account",
      "type": "table",
      "name": "20220411074015-add-grower-account-bulk-pack-file-name-down.sql",
      "filePath": "database/migrations/sqls/20220411074015-add-grower-account-bulk-pack-file-name-down.sql",
      "summary": "Reverses the '20220411074015-add-grower-account-bulk-pack-file-name' migration on the grower_account table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220411233052-add-owner-id-to-tag-up.sql:tag",
      "type": "table",
      "name": "20220411233052-add-owner-id-to-tag-up.sql",
      "filePath": "database/migrations/sqls/20220411233052-add-owner-id-to-tag-up.sql",
      "summary": "Adds the owner_id column to the tag table. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220411233052-add-owner-id-to-tag-down.sql:tag",
      "type": "table",
      "name": "20220411233052-add-owner-id-to-tag-down.sql",
      "filePath": "database/migrations/sqls/20220411233052-add-owner-id-to-tag-down.sql",
      "summary": "Reverses the '20220411233052-add-owner-id-to-tag' migration on the tag table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220412072449-update-tag-unique-constraint-up.sql:tag",
      "type": "table",
      "name": "20220412072449-update-tag-unique-constraint-up.sql",
      "filePath": "database/migrations/sqls/20220412072449-update-tag-unique-constraint-up.sql",
      "summary": "Replaces the tag name unique constraint with a composite (name, owner_id) unique constraint. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220412072449-update-tag-unique-constraint-down.sql:tag",
      "type": "table",
      "name": "20220412072449-update-tag-unique-constraint-down.sql",
      "filePath": "database/migrations/sqls/20220412072449-update-tag-unique-constraint-down.sql",
      "summary": "Reverses the '20220412072449-update-tag-unique-constraint' migration on the tag table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220613072449-update-capture-referenceid-allow-null-up.sql:capture",
      "type": "table",
      "name": "20220613072449-update-capture-referenceid-allow-null-up.sql",
      "filePath": "database/migrations/sqls/20220613072449-update-capture-referenceid-allow-null-up.sql",
      "summary": "Relaxes the capture.reference_id column to allow NULL values. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220613072449-update-capture-referenceid-allow-null-down.sql:capture",
      "type": "table",
      "name": "20220613072449-update-capture-referenceid-allow-null-down.sql",
      "filePath": "database/migrations/sqls/20220613072449-update-capture-referenceid-allow-null-down.sql",
      "summary": "Reverses the '20220613072449-update-capture-referenceid-allow-null' migration on the capture table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220731213059-add-grower-account-about-up.sql:grower_account",
      "type": "table",
      "name": "20220731213059-add-grower-account-about-up.sql",
      "filePath": "database/migrations/sqls/20220731213059-add-grower-account-about-up.sql",
      "summary": "Adds the about column to grower_account. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220731213059-add-grower-account-about-down.sql:grower_account",
      "type": "table",
      "name": "20220731213059-add-grower-account-about-down.sql",
      "filePath": "database/migrations/sqls/20220731213059-add-grower-account-about-down.sql",
      "summary": "Reverses the '20220731213059-add-grower-account-about' migration on the grower_account table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220804213159-update-capture-reference-up.sql:capture",
      "type": "table",
      "name": "20220804213159-update-capture-reference-up.sql",
      "filePath": "database/migrations/sqls/20220804213159-update-capture-reference-up.sql",
      "summary": "Restores the NOT NULL constraint on capture.reference_id. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220804213159-update-capture-reference-down.sql:capture",
      "type": "table",
      "name": "20220804213159-update-capture-reference-down.sql",
      "filePath": "database/migrations/sqls/20220804213159-update-capture-reference-down.sql",
      "summary": "Reverses the '20220804213159-update-capture-reference' migration on the capture table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220804214655-add-gender-column-up.sql:grower_account",
      "type": "table",
      "name": "20220804214655-add-gender-column-up.sql",
      "filePath": "database/migrations/sqls/20220804214655-add-gender-column-up.sql",
      "summary": "Adds the gender column to grower_account. Forward (up) migration.",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "up-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220804214655-add-gender-column-down.sql:grower_account",
      "type": "table",
      "name": "20220804214655-add-gender-column-down.sql",
      "filePath": "database/migrations/sqls/20220804214655-add-gender-column-down.sql",
      "summary": "Reverses the '20220804214655-add-gender-column' migration on the grower_account table (down).",
      "tags": [
        "database",
        "migration",
        "sql",
        "schema-definition",
        "down-migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220810061329-add-capture-tree-id-down.sql",
      "type": "table",
      "name": "20220810061329-add-capture-tree-id-down.sql",
      "filePath": "database/migrations/sqls/20220810061329-add-capture-tree-id-down.sql",
      "summary": "Down migration dropping the capture_tree_id_fkey foreign key constraint from the capture table.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "constraint"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220810061329-add-capture-tree-id-up.sql",
      "type": "table",
      "name": "20220810061329-add-capture-tree-id-up.sql",
      "filePath": "database/migrations/sqls/20220810061329-add-capture-tree-id-up.sql",
      "summary": "Up migration adding a foreign key from capture.tree_id referencing tree.id.",
      "tags": [
        "database",
        "migration",
        "constraint",
        "foreign-key"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220820032302-add-reference-id-unique-down.sql",
      "type": "table",
      "name": "20220820032302-add-reference-id-unique-down.sql",
      "filePath": "database/migrations/sqls/20220820032302-add-reference-id-unique-down.sql",
      "summary": "Down migration removing the unique constraint on capture.reference_id.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "constraint"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20220820032302-add-reference-id-unique-up.sql",
      "type": "table",
      "name": "20220820032302-add-reference-id-unique-up.sql",
      "filePath": "database/migrations/sqls/20220820032302-add-reference-id-unique-up.sql",
      "summary": "Up migration adding a unique constraint on capture.reference_id.",
      "tags": [
        "database",
        "migration",
        "constraint",
        "unique"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20221107062128-grower-account-reference-id-down.sql",
      "type": "table",
      "name": "20221107062128-grower-account-reference-id-down.sql",
      "filePath": "database/migrations/sqls/20221107062128-grower-account-reference-id-down.sql",
      "summary": "Down migration dropping the reference_id column from grower_account.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20221107062128-grower-account-reference-id-up.sql",
      "type": "table",
      "name": "20221107062128-grower-account-reference-id-up.sql",
      "filePath": "database/migrations/sqls/20221107062128-grower-account-reference-id-up.sql",
      "summary": "Up migration adding an integer reference_id column to grower_account.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "column"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20221129085159-AddGeographyIndexOnTree-down.sql",
      "type": "table",
      "name": "20221129085159-AddGeographyIndexOnTree-down.sql",
      "filePath": "database/migrations/sqls/20221129085159-AddGeographyIndexOnTree-down.sql",
      "summary": "Down migration dropping the GiST geography index tree_est_gmtric_loc_idx_gist_gg on tree.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "index"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20221129085159-AddGeographyIndexOnTree-up.sql",
      "type": "table",
      "name": "20221129085159-AddGeographyIndexOnTree-up.sql",
      "filePath": "database/migrations/sqls/20221129085159-AddGeographyIndexOnTree-up.sql",
      "summary": "Up migration creating a GiST geography index on tree.estimated_geographic_location for spatial queries.",
      "tags": [
        "database",
        "migration",
        "index",
        "postgis"
      ],
      "complexity": "simple",
      "languageNotes": "Uses PostGIS GiST index over a geography cast to accelerate spatial proximity queries."
    },
    {
      "id": "table:database/migrations/sqls/20221209065400-CapturePlantingOrgIdAllowNull-down.sql",
      "type": "table",
      "name": "20221209065400-CapturePlantingOrgIdAllowNull-down.sql",
      "filePath": "database/migrations/sqls/20221209065400-CapturePlantingOrgIdAllowNull-down.sql",
      "summary": "No-op down migration for the capture.planting_organization_id nullability change.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "no-op"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20221209065400-CapturePlantingOrgIdAllowNull-up.sql",
      "type": "table",
      "name": "20221209065400-CapturePlantingOrgIdAllowNull-up.sql",
      "filePath": "database/migrations/sqls/20221209065400-CapturePlantingOrgIdAllowNull-up.sql",
      "summary": "Up migration relaxing capture.planting_organization_id to allow NULL values.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "nullability"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20221229015520-AddCapturedAtIndex-down.sql",
      "type": "table",
      "name": "20221229015520-AddCapturedAtIndex-down.sql",
      "filePath": "database/migrations/sqls/20221229015520-AddCapturedAtIndex-down.sql",
      "summary": "Down migration dropping the capture_captured_at_idx index.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "index"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20221229015520-AddCapturedAtIndex-up.sql",
      "type": "table",
      "name": "20221229015520-AddCapturedAtIndex-up.sql",
      "filePath": "database/migrations/sqls/20221229015520-AddCapturedAtIndex-up.sql",
      "summary": "Up migration creating an index on capture.captured_at to speed time-based lookups.",
      "tags": [
        "database",
        "migration",
        "index",
        "performance"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20230130192407-grower-account-table-down.sql",
      "type": "table",
      "name": "20230130192407-grower-account-table-down.sql",
      "filePath": "database/migrations/sqls/20230130192407-grower-account-table-down.sql",
      "summary": "Down migration dropping the grower_account_image table.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "table"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20230130192407-grower-account-table-up.sql",
      "type": "table",
      "name": "20230130192407-grower-account-table-up.sql",
      "filePath": "database/migrations/sqls/20230130192407-grower-account-table-up.sql",
      "summary": "Up migration creating the grower_account_image table linking image URLs to grower accounts with audit timestamps.",
      "tags": [
        "database",
        "migration",
        "table",
        "schema-definition"
      ],
      "complexity": "simple",
      "languageNotes": "UUID primary key via uuid_generate_v4() with a foreign key to grower_account and timestamptz audit columns."
    },
    {
      "id": "table:database/migrations/sqls/20230130192407-grower-account-table-up.sql:grower_account_image",
      "type": "table",
      "name": "grower_account_image",
      "filePath": "database/migrations/sqls/20230130192407-grower-account-table-up.sql",
      "summary": "Table storing image URLs associated with grower accounts, including active flag and audit timestamps.",
      "tags": [
        "database",
        "table",
        "data-model",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20230501001217-add-token-to-capture-down.sql",
      "type": "table",
      "name": "20230501001217-add-token-to-capture-down.sql",
      "filePath": "database/migrations/sqls/20230501001217-add-token-to-capture-down.sql",
      "summary": "Down migration dropping the token_id and token_issued columns from capture.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20230501001217-add-token-to-capture-up.sql",
      "type": "table",
      "name": "20230501001217-add-token-to-capture-up.sql",
      "filePath": "database/migrations/sqls/20230501001217-add-token-to-capture-up.sql",
      "summary": "Up migration adding token_id (uuid) and token_issued (boolean) columns to capture for token tracking.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "token"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20230501001718-show-in-map-down.sql",
      "type": "table",
      "name": "20230501001718-show-in-map-down.sql",
      "filePath": "database/migrations/sqls/20230501001718-show-in-map-down.sql",
      "summary": "Down migration dropping the show_in_map column from grower_account.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20230501001718-show-in-map-up.sql",
      "type": "table",
      "name": "20230501001718-show-in-map-up.sql",
      "filePath": "database/migrations/sqls/20230501001718-show-in-map-up.sql",
      "summary": "Up migration adding a show_in_map boolean column (default false) to grower_account.",
      "tags": [
        "database",
        "migration",
        "schema-change",
        "column"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20230501015815-materialized-view-capture-match-down.sql",
      "type": "table",
      "name": "20230501015815-materialized-view-capture-match-down.sql",
      "filePath": "database/migrations/sqls/20230501015815-materialized-view-capture-match-down.sql",
      "summary": "Down migration dropping the capture_tree_match materialized view.",
      "tags": [
        "database",
        "migration",
        "rollback",
        "materialized-view"
      ],
      "complexity": "simple"
    },
    {
      "id": "table:database/migrations/sqls/20230501015815-materialized-view-capture-match-up.sql",
      "type": "table",
      "name": "20230501015815-materialized-view-capture-match-up.sql",
      "filePath": "database/migrations/sqls/20230501015815-materialized-view-capture-match-up.sql",
      "summary": "Up migration creating the capture_tree_match materialized view that spatially matches captures to nearby trees using PostGIS st_dwithin and a 30-day age window.",
      "tags": [
        "database",
        "migration",
        "materialized-view",
        "postgis"
      ],
      "complexity": "moderate",
      "languageNotes": "Materialized view with WITH NO DATA; uses st_dwithin spatial join and a captured_at vs created_at interval predicate to correlate captures and trees."
    },
    {
      "id": "config:database/seeds/data/20220130-Captures.json",
      "type": "config",
      "name": "20220130-Captures.json",
      "filePath": "database/seeds/data/20220130-Captures.json",
      "summary": "Large database seed fixture holding capture records (tree observation events with GPS, image URLs, and timestamps) loaded during the 2022-01-30 seed run.",
      "tags": [
        "database",
        "seed-data",
        "fixture",
        "captures",
        "data"
      ],
      "complexity": "complex",
      "languageNotes": "Very large JSON array (~475k lines) of capture records used to populate the captures table in test/dev environments."
    },
    {
      "id": "config:database/seeds/data/20220130-Growers.json",
      "type": "config",
      "name": "20220130-Growers.json",
      "filePath": "database/seeds/data/20220130-Growers.json",
      "summary": "Database seed fixture of grower account records (wallet, organization, location, status) loaded during the 2022-01-30 seed run.",
      "tags": [
        "database",
        "seed-data",
        "fixture",
        "growers",
        "data"
      ],
      "complexity": "moderate"
    },
    {
      "id": "config:database/seeds/data/20220130-Trees.json",
      "type": "config",
      "name": "20220130-Trees.json",
      "filePath": "database/seeds/data/20220130-Trees.json",
      "summary": "Database seed fixture of tree records with latest capture references, geometric/geographic locations, and image URLs for the 2022-01-30 seed run.",
      "tags": [
        "database",
        "seed-data",
        "fixture",
        "trees",
        "data"
      ],
      "complexity": "complex"
    },
    {
      "id": "config:database/seeds/data/20220210-Captures.json",
      "type": "config",
      "name": "20220210-Captures.json",
      "filePath": "database/seeds/data/20220210-Captures.json",
      "summary": "Large database seed fixture of capture records loaded during the 2022-02-10 seed run, extending the capture test dataset.",
      "tags": [
        "database",
        "seed-data",
        "fixture",
        "captures",
        "data"
      ],
      "complexity": "complex",
      "languageNotes": "Very large JSON array (~462k lines) of capture records for populating the captures table."
    },
    {
      "id": "config:database/seeds/data/20220210-Trees.json",
      "type": "config",
      "name": "20220210-Trees.json",
      "filePath": "database/seeds/data/20220210-Trees.json",
      "summary": "Database seed fixture of tree records loaded during the 2022-02-10 seed run, extending the tree test dataset.",
      "tags": [
        "database",
        "seed-data",
        "fixture",
        "trees",
        "data"
      ],
      "complexity": "complex"
    },
    {
      "id": "config:deployment/base/cluster-role-binding.yaml",
      "type": "config",
      "name": "cluster-role-binding.yaml",
      "filePath": "deployment/base/cluster-role-binding.yaml",
      "summary": "Kubernetes ClusterRoleBinding that grants the k8s-wait-for ClusterRole to the default ServiceAccount in the treetracker-api namespace, run as an ArgoCD PostSync hook.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "rbac",
        "security",
        "orchestration"
      ],
      "complexity": "simple",
      "languageNotes": "Uses ArgoCD sync-wave hook annotations to coordinate post-deploy RBAC setup."
    },
    {
      "id": "config:deployment/base/cluster-role.yaml",
      "type": "config",
      "name": "cluster-role.yaml",
      "filePath": "deployment/base/cluster-role.yaml",
      "summary": "Kubernetes ClusterRole named k8s-wait-for granting get/watch/list on services, pods, and jobs so a wait-for init step can observe migration job completion.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "rbac",
        "security",
        "orchestration"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/base/database-connection-sealed-secret.yaml",
      "type": "config",
      "name": "database-connection-sealed-secret.yaml",
      "filePath": "deployment/base/database-connection-sealed-secret.yaml",
      "summary": "SealedSecret holding the encrypted runtime Postgres connection string (key db) consumed by the treetracker-api deployment as DATABASE_URL.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "security",
        "database",
        "configuration"
      ],
      "complexity": "simple",
      "languageNotes": "Bitnami SealedSecret keeps encrypted credentials safe to commit to git."
    },
    {
      "id": "config:deployment/base/database-migration-connection-sealed-secret.yaml",
      "type": "config",
      "name": "database-migration-connection-sealed-secret.yaml",
      "filePath": "deployment/base/database-migration-connection-sealed-secret.yaml",
      "summary": "SealedSecret holding the encrypted database connection string used by the migration Job to run db-migrate with elevated schema privileges.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "security",
        "database",
        "migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/base/database-migration-job.yaml",
      "type": "config",
      "name": "database-migration-job.yaml",
      "filePath": "deployment/base/database-migration-job.yaml",
      "summary": "Kubernetes Job run as an ArgoCD PostSync hook that executes db-migrate up against the migrations directory to apply schema changes on each deploy.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "migration",
        "database",
        "ci-cd"
      ],
      "complexity": "moderate",
      "languageNotes": "restartPolicy Never with backoffLimit 1 allows a single migration retry; node affinity pins it to the microservices node pool."
    },
    {
      "id": "config:deployment/base/deployment.yaml",
      "type": "config",
      "name": "deployment.yaml",
      "filePath": "deployment/base/deployment.yaml",
      "summary": "Kubernetes Deployment running two replicas of the greenstand/treetracker-api container on port 80, wiring DATABASE_URL and RABBIT_MQ_URL from sealed secrets.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "deployment",
        "containerization",
        "orchestration"
      ],
      "complexity": "moderate",
      "languageNotes": "Node affinity constrains scheduling to the microservices-node-pool on DigitalOcean Kubernetes."
    },
    {
      "id": "config:deployment/base/kustomization.yaml",
      "type": "config",
      "name": "kustomization.yaml",
      "filePath": "deployment/base/kustomization.yaml",
      "summary": "Kustomize base that aggregates the deployment, service, mapping, RBAC, migration job, and sealed-secret manifests into a single deployable resource set.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "kustomize",
        "orchestration",
        "build-system"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/base/mapping.yaml",
      "type": "config",
      "name": "mapping.yaml",
      "filePath": "deployment/base/mapping.yaml",
      "summary": "Ambassador Mapping routing external traffic on the /treetracker/ prefix to the treetracker-api service with path rewrite to root and no timeout.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "routing",
        "api-gateway",
        "networking"
      ],
      "complexity": "simple",
      "languageNotes": "getambassador.io/v2 Mapping acts as the ingress routing rule for the API."
    },
    {
      "id": "config:deployment/base/namespace.yaml",
      "type": "config",
      "name": "namespace.yaml",
      "filePath": "deployment/base/namespace.yaml",
      "summary": "Defines the treetracker-api Kubernetes Namespace that isolates all of the service's resources.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "namespace",
        "orchestration",
        "configuration"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/base/rabbitmq-connection-sealed-secret.yaml",
      "type": "config",
      "name": "rabbitmq-connection-sealed-secret.yaml",
      "filePath": "deployment/base/rabbitmq-connection-sealed-secret.yaml",
      "summary": "SealedSecret holding the encrypted RabbitMQ message-queue URL (key messageQueue) consumed by the deployment as RABBIT_MQ_URL.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "security",
        "messaging",
        "configuration"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/base/service.yaml",
      "type": "config",
      "name": "service.yaml",
      "filePath": "deployment/base/service.yaml",
      "summary": "Kubernetes Service exposing the treetracker-api pods on port 80 and forwarding to container targetPort 3006.",
      "tags": [
        "infrastructure",
        "kubernetes",
        "networking",
        "service",
        "orchestration"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/development/database-connection-sealed-secret.yaml",
      "type": "config",
      "name": "database-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/development/database-connection-sealed-secret.yaml",
      "summary": "Bitnami SealedSecret holding the encrypted database connection string for the treetracker-api namespace in the development environment.",
      "tags": [
        "configuration",
        "security",
        "database",
        "sealed-secret",
        "kubernetes"
      ],
      "complexity": "simple",
      "languageNotes": "SealedSecret encrypts the plaintext Secret so it can be committed to Git and decrypted only in-cluster by the sealed-secrets controller."
    },
    {
      "id": "config:deployment/overlays/development/database-migration-connection-sealed-secret.yaml",
      "type": "config",
      "name": "database-migration-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/development/database-migration-connection-sealed-secret.yaml",
      "summary": "Bitnami SealedSecret holding the encrypted database connection string used by migration jobs in the development environment.",
      "tags": [
        "configuration",
        "security",
        "database",
        "migration",
        "sealed-secret"
      ],
      "complexity": "simple",
      "languageNotes": "Separate credential from the runtime connection so migrations can use elevated schema privileges."
    },
    {
      "id": "config:deployment/overlays/development/deployment.yaml",
      "type": "config",
      "name": "deployment.yaml",
      "filePath": "deployment/overlays/development/deployment.yaml",
      "summary": "Strategic-merge patch overriding the base Deployment to run a single treetracker-api replica in the development environment.",
      "tags": [
        "configuration",
        "deployment",
        "kubernetes",
        "overlay",
        "development"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/development/kustomization.yaml",
      "type": "config",
      "name": "kustomization.yaml",
      "filePath": "deployment/overlays/development/kustomization.yaml",
      "summary": "Kustomize overlay for the development environment that references the base manifests, pins the treetracker-api image tag 1.34.0, and applies the local strategic-merge patches.",
      "tags": [
        "configuration",
        "kustomize",
        "kubernetes",
        "overlay",
        "orchestration"
      ],
      "complexity": "simple",
      "languageNotes": "Kustomize overlay composes the shared base with environment-specific patches and image tags without templating."
    },
    {
      "id": "config:deployment/overlays/development/mapping.yaml",
      "type": "config",
      "name": "mapping.yaml",
      "filePath": "deployment/overlays/development/mapping.yaml",
      "summary": "Ambassador Mapping configuring CORS rules (allowed origins, methods, and headers) for the treetracker-api service in the development environment.",
      "tags": [
        "configuration",
        "ambassador",
        "routing",
        "cors",
        "kubernetes"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/development/rabbitmq-connection-sealed-secret.yaml",
      "type": "config",
      "name": "rabbitmq-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/development/rabbitmq-connection-sealed-secret.yaml",
      "summary": "Bitnami SealedSecret holding the encrypted RabbitMQ message-queue connection string for the treetracker-api namespace in the development environment.",
      "tags": [
        "configuration",
        "security",
        "message-queue",
        "sealed-secret",
        "kubernetes"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/production/database-connection-sealed-secret.yaml",
      "type": "config",
      "name": "database-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/production/database-connection-sealed-secret.yaml",
      "summary": "Production Bitnami SealedSecret holding the encrypted database connection string for the TreeTracker API.",
      "tags": [
        "configuration",
        "security",
        "kubernetes",
        "database",
        "deployment"
      ],
      "complexity": "simple",
      "languageNotes": "SealedSecret CRD encrypts secret data at rest so it can be committed to git safely."
    },
    {
      "id": "config:deployment/overlays/production/database-migration-connection-sealed-secret.yaml",
      "type": "config",
      "name": "database-migration-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/production/database-migration-connection-sealed-secret.yaml",
      "summary": "Production Bitnami SealedSecret holding the encrypted database connection string used by the migration job.",
      "tags": [
        "configuration",
        "security",
        "kubernetes",
        "migration",
        "deployment"
      ],
      "complexity": "simple",
      "languageNotes": "Separate migration credentials allow elevated schema-change privileges distinct from the runtime app."
    },
    {
      "id": "config:deployment/overlays/production/kustomization.yaml",
      "type": "config",
      "name": "kustomization.yaml",
      "filePath": "deployment/overlays/production/kustomization.yaml",
      "summary": "Production Kustomize overlay that layers sealed-secret patches over the base manifests and pins the treetracker-api image to tag 1.33.4.",
      "tags": [
        "configuration",
        "kubernetes",
        "orchestration",
        "deployment",
        "kustomize"
      ],
      "complexity": "simple",
      "languageNotes": "Kustomize overlay uses patchesStrategicMerge plus an images override to specialize the shared base for production."
    },
    {
      "id": "config:deployment/overlays/production/rabbitmq-connection-sealed-secret.yaml",
      "type": "config",
      "name": "rabbitmq-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/production/rabbitmq-connection-sealed-secret.yaml",
      "summary": "Production Bitnami SealedSecret holding the encrypted RabbitMQ connection string for the TreeTracker API messaging.",
      "tags": [
        "configuration",
        "security",
        "kubernetes",
        "messaging",
        "deployment"
      ],
      "complexity": "simple",
      "languageNotes": "SealedSecret CRD encrypts the message-broker credentials for safe storage in version control."
    },
    {
      "id": "config:deployment/overlays/test/database-connection-sealed-secret.yaml",
      "type": "config",
      "name": "database-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/test/database-connection-sealed-secret.yaml",
      "summary": "Bitnami SealedSecret holding the encrypted database connection string for the test overlay of the treetracker-api namespace.",
      "tags": [
        "configuration",
        "kubernetes",
        "security",
        "sealed-secret",
        "database"
      ],
      "complexity": "simple",
      "languageNotes": "SealedSecret encrypts data at rest so it can be committed to git and decrypted only in-cluster by the sealed-secrets controller."
    },
    {
      "id": "config:deployment/overlays/test/database-migration-connection-sealed-secret.yaml",
      "type": "config",
      "name": "database-migration-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/test/database-migration-connection-sealed-secret.yaml",
      "summary": "Bitnami SealedSecret holding the encrypted database connection string used by the migration job in the test overlay.",
      "tags": [
        "configuration",
        "kubernetes",
        "security",
        "sealed-secret",
        "migration"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/test/kustomization.yaml",
      "type": "config",
      "name": "kustomization.yaml",
      "filePath": "deployment/overlays/test/kustomization.yaml",
      "summary": "Kustomize test overlay that builds on the base manifests, applies strategic-merge patches for sealed secrets and the Ambassador mapping, and pins the treetracker-api image tag.",
      "tags": [
        "configuration",
        "kubernetes",
        "kustomize",
        "deployment",
        "orchestration"
      ],
      "complexity": "simple",
      "languageNotes": "Uses patchesStrategicMerge to overlay environment-specific secrets and image tag onto the shared ../../base resources."
    },
    {
      "id": "config:deployment/overlays/test/mapping.yaml",
      "type": "config",
      "name": "mapping.yaml",
      "filePath": "deployment/overlays/test/mapping.yaml",
      "summary": "Ambassador (getambassador.io/v2) Mapping defining CORS rules for the treetracker-api in the test environment, allowing the test admin origin.",
      "tags": [
        "configuration",
        "kubernetes",
        "ambassador",
        "routing",
        "cors"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/test/rabbitmq-connection-sealed-secret.yaml",
      "type": "config",
      "name": "rabbitmq-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/test/rabbitmq-connection-sealed-secret.yaml",
      "summary": "Bitnami SealedSecret holding the encrypted RabbitMQ connection string for the test overlay of the treetracker-api namespace.",
      "tags": [
        "configuration",
        "kubernetes",
        "security",
        "sealed-secret",
        "messaging"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:.eslintignore",
      "type": "config",
      "name": ".eslintignore",
      "filePath": ".eslintignore",
      "summary": "Lists file paths excluded from ESLint linting for the API project.",
      "tags": [
        "configuration",
        "linting",
        "build-system"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:.huskyrc",
      "type": "config",
      "name": ".huskyrc",
      "filePath": ".huskyrc",
      "summary": "Husky git hooks configuration enabling commit-time checks such as linting and commit-message validation.",
      "tags": [
        "configuration",
        "git-hooks",
        "development"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:.npmrc",
      "type": "config",
      "name": ".npmrc",
      "filePath": ".npmrc",
      "summary": "npm client configuration controlling registry and install behavior for the project.",
      "tags": [
        "configuration",
        "npm",
        "build-system"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:.releaserc",
      "type": "config",
      "name": ".releaserc",
      "filePath": ".releaserc",
      "summary": "semantic-release configuration defining the main release branch and the plugin chain for changelog generation, npm publishing, and GitHub releases.",
      "tags": [
        "configuration",
        "ci-cd",
        "release",
        "deployment"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:CODEOWNERS",
      "type": "config",
      "name": "CODEOWNERS",
      "filePath": "CODEOWNERS",
      "summary": "GitHub CODEOWNERS file mapping file patterns to reviewers for automatic pull-request review assignment.",
      "tags": [
        "configuration",
        "code-review",
        "governance"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:assets/greenstand.webp",
      "type": "file",
      "name": "greenstand.webp",
      "filePath": "assets/greenstand.webp",
      "summary": "Greenstand brand logo image asset in WebP format used in project documentation or UI.",
      "tags": [
        "asset",
        "image",
        "branding"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:commitlint.config.js",
      "type": "config",
      "name": "commitlint.config.js",
      "filePath": "commitlint.config.js",
      "summary": "commitlint configuration extending the conventional-commits ruleset to enforce commit-message format.",
      "tags": [
        "configuration",
        "git-hooks",
        "linting",
        "development"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:database/database.json.example",
      "type": "config",
      "name": "database.json.example",
      "filePath": "database/database.json.example",
      "summary": "Template db-migrate connection configuration showing Postgres driver settings for the dev and integration environments with placeholder credentials.",
      "tags": [
        "configuration",
        "database",
        "migration",
        "template"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/etl/create-grower-account-from-legacy.sql",
      "type": "file",
      "name": "create-grower-account-from-legacy.sql",
      "filePath": "database/etl/create-grower-account-from-legacy.sql",
      "summary": "One-off ETL script that backfills the treetracker.grower_account table from legacy planter, planter_registrations, entity, and trees data, de-duplicating growers by phone or email.",
      "tags": [
        "database",
        "data-pipeline",
        "migration",
        "etl"
      ],
      "complexity": "moderate",
      "languageNotes": "Uses Postgres DISTINCT ON with correlated subqueries to pick the latest registration and photo per planter."
    },
    {
      "id": "file:database/migrations/.gitkeep",
      "type": "file",
      "name": ".gitkeep",
      "filePath": "database/migrations/.gitkeep",
      "summary": "Empty placeholder file keeping the migrations directory tracked in git.",
      "tags": [
        "placeholder",
        "git",
        "scaffolding"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20210117023353-status-enum.js",
      "type": "file",
      "name": "20210117023353-status-enum.js",
      "filePath": "database/migrations/20210117023353-status-enum.js",
      "summary": "db-migrate migration that applies the paired status-enum up/down SQL files defining status enum types.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20210218195106-capture.js",
      "type": "file",
      "name": "20210218195106-capture.js",
      "filePath": "database/migrations/20210218195106-capture.js",
      "summary": "db-migrate migration that creates the capture schema by running the paired capture up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20210219042951-domain-event.js",
      "type": "file",
      "name": "20210219042951-domain-event.js",
      "filePath": "database/migrations/20210219042951-domain-event.js",
      "summary": "db-migrate migration that creates the domain_event table for the outbox pattern by running the paired SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20210219043110-tree.js",
      "type": "file",
      "name": "20210219043110-tree.js",
      "filePath": "database/migrations/20210219043110-tree.js",
      "summary": "db-migrate migration that creates the tree schema by running the paired tree up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20210317210236-geography.js",
      "type": "file",
      "name": "20210317210236-geography.js",
      "filePath": "database/migrations/20210317210236-geography.js",
      "summary": "db-migrate migration that adds geography-related structures by running the paired geography up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20210318003922-geography-capture.js",
      "type": "file",
      "name": "20210318003922-geography-capture.js",
      "filePath": "database/migrations/20210318003922-geography-capture.js",
      "summary": "db-migrate migration that links geography to captures by running the paired geography-capture up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20210503011318-rename-to-location.js",
      "type": "file",
      "name": "20210503011318-rename-to-location.js",
      "filePath": "database/migrations/20210503011318-rename-to-location.js",
      "summary": "db-migrate migration that renames geography structures to location by running the paired rename-to-location up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "refactor"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20211217023643-grower-account.js",
      "type": "file",
      "name": "20211217023643-grower-account.js",
      "filePath": "database/migrations/20211217023643-grower-account.js",
      "summary": "db-migrate migration that creates the grower_account table by running the paired grower-account up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20211219082806-tag.js",
      "type": "file",
      "name": "20211219082806-tag.js",
      "filePath": "database/migrations/20211219082806-tag.js",
      "summary": "db-migrate migration that creates the tag table by running the paired tag up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20211219142620-capture-tag.js",
      "type": "file",
      "name": "20211219142620-capture-tag.js",
      "filePath": "database/migrations/20211219142620-capture-tag.js",
      "summary": "db-migrate migration that creates the capture_tag join table by running the paired capture-tag up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20211219143359-tree-tag.js",
      "type": "file",
      "name": "20211219143359-tree-tag.js",
      "filePath": "database/migrations/20211219143359-tree-tag.js",
      "summary": "db-migrate migration that creates the tree_tag join table by running the paired tree-tag up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20211219205211-rename-capture-location.js",
      "type": "file",
      "name": "20211219205211-rename-capture-location.js",
      "filePath": "database/migrations/20211219205211-rename-capture-location.js",
      "summary": "db-migrate migration that renames capture location columns by running the paired rename-capture-location up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "refactor"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20211219205822-rename-tree-location.js",
      "type": "file",
      "name": "20211219205822-rename-tree-location.js",
      "filePath": "database/migrations/20211219205822-rename-tree-location.js",
      "summary": "db-migrate migration that renames tree location columns by running the paired rename-tree-location up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "refactor"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20211219211516-capture-device-update.js",
      "type": "file",
      "name": "20211219211516-capture-device-update.js",
      "filePath": "database/migrations/20211219211516-capture-device-update.js",
      "summary": "db-migrate migration that updates capture device fields by running the paired capture-device-update up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-definition"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20211219211814-capture-session-id.js",
      "type": "file",
      "name": "20211219211814-capture-session-id.js",
      "filePath": "database/migrations/20211219211814-capture-session-id.js",
      "summary": "Adds a session_id column to the capture table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "capture",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20211219212027-update-tree-status.js",
      "type": "file",
      "name": "20211219212027-update-tree-status.js",
      "filePath": "database/migrations/20211219212027-update-tree-status.js",
      "summary": "Updates the tree table status column definition.",
      "tags": [
        "migration",
        "database",
        "knex",
        "tree",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20211219213129-update-capture-status.js",
      "type": "file",
      "name": "20211219213129-update-capture-status.js",
      "filePath": "database/migrations/20211219213129-update-capture-status.js",
      "summary": "Updates the capture table status column definition.",
      "tags": [
        "migration",
        "database",
        "knex",
        "capture",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20211219213548-tree-attributes.js",
      "type": "file",
      "name": "20211219213548-tree-attributes.js",
      "filePath": "database/migrations/20211219213548-tree-attributes.js",
      "summary": "Adds an attributes column to the tree table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "tree",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20211219233755-planter-to-grower.js",
      "type": "file",
      "name": "20211219233755-planter-to-grower.js",
      "filePath": "database/migrations/20211219233755-planter-to-grower.js",
      "summary": "Renames planter concept to grower across the schema.",
      "tags": [
        "migration",
        "database",
        "knex",
        "grower",
        "rename"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20211220234459-capture-species-uuid.js",
      "type": "file",
      "name": "20211220234459-capture-species-uuid.js",
      "filePath": "database/migrations/20211220234459-capture-species-uuid.js",
      "summary": "Adds a species_id UUID column to the capture table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "capture",
        "species"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20211220234707-tree-species-uuid.js",
      "type": "file",
      "name": "20211220234707-tree-species-uuid.js",
      "filePath": "database/migrations/20211220234707-tree-species-uuid.js",
      "summary": "Adds a species_id UUID column to the tree table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "tree",
        "species"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20211222232655-add-capture-tag-unique.js",
      "type": "file",
      "name": "20211222232655-add-capture-tag-unique.js",
      "filePath": "database/migrations/20211222232655-add-capture-tag-unique.js",
      "summary": "Adds a unique constraint to the capture_tag table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "capture",
        "unique-constraint"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20211222232830-add-tree-tag-unique.js",
      "type": "file",
      "name": "20211222232830-add-tree-tag-unique.js",
      "filePath": "database/migrations/20211222232830-add-tree-tag-unique.js",
      "summary": "Adds a unique constraint to the tree_tag table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "tree",
        "unique-constraint"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20211230232949-change-public.js",
      "type": "file",
      "name": "20211230232949-change-public.js",
      "filePath": "database/migrations/20211230232949-change-public.js",
      "summary": "Changes the public/visibility flag on a table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "visibility",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220114035335-add-tag-name-unique-constraint.js",
      "type": "file",
      "name": "20220114035335-add-tag-name-unique-constraint.js",
      "filePath": "database/migrations/20220114035335-add-tag-name-unique-constraint.js",
      "summary": "Adds a unique constraint on the tag name column.",
      "tags": [
        "migration",
        "database",
        "knex",
        "tag",
        "unique-constraint"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220119035259-drop-wallet-not-null.js",
      "type": "file",
      "name": "20220119035259-drop-wallet-not-null.js",
      "filePath": "database/migrations/20220119035259-drop-wallet-not-null.js",
      "summary": "Drops the NOT NULL constraint on a wallet column.",
      "tags": [
        "migration",
        "database",
        "knex",
        "wallet",
        "constraint"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220119035317-add-wallet-unique.js",
      "type": "file",
      "name": "20220119035317-add-wallet-unique.js",
      "filePath": "database/migrations/20220119035317-add-wallet-unique.js",
      "summary": "Adds a unique constraint on the wallet column.",
      "tags": [
        "migration",
        "database",
        "knex",
        "wallet",
        "unique-constraint"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220124203531-update-grower-account-name.js",
      "type": "file",
      "name": "20220124203531-update-grower-account-name.js",
      "filePath": "database/migrations/20220124203531-update-grower-account-name.js",
      "summary": "Updates the grower_account name column.",
      "tags": [
        "migration",
        "database",
        "knex",
        "grower",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220127232527-AddCreateAtDefaultCapture.js",
      "type": "file",
      "name": "20220127232527-AddCreateAtDefaultCapture.js",
      "filePath": "database/migrations/20220127232527-AddCreateAtDefaultCapture.js",
      "summary": "Adds a default created_at value to the capture table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "capture",
        "default-value"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220127232724-AddCapturedAtToCapture.js",
      "type": "file",
      "name": "20220127232724-AddCapturedAtToCapture.js",
      "filePath": "database/migrations/20220127232724-AddCapturedAtToCapture.js",
      "summary": "Adds a captured_at column to the capture table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "capture",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220203193500-drop-grower-username-photo-url.js",
      "type": "file",
      "name": "20220203193500-drop-grower-username-photo-url.js",
      "filePath": "database/migrations/20220203193500-drop-grower-username-photo-url.js",
      "summary": "Drops username and photo_url columns from grower_account.",
      "tags": [
        "migration",
        "database",
        "knex",
        "grower",
        "drop-column"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220203200214-rename-grower-id-in-capture.js",
      "type": "file",
      "name": "20220203200214-rename-grower-id-in-capture.js",
      "filePath": "database/migrations/20220203200214-rename-grower-id-in-capture.js",
      "summary": "Renames the grower id column in the capture table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "capture",
        "rename"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220204225428-drop-wallet-id-grower-account.js",
      "type": "file",
      "name": "20220204225428-drop-wallet-id-grower-account.js",
      "filePath": "database/migrations/20220204225428-drop-wallet-id-grower-account.js",
      "summary": "Drops the wallet_id column from grower_account.",
      "tags": [
        "migration",
        "database",
        "knex",
        "grower",
        "drop-column"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220221084222-growerAccountLocation.js",
      "type": "file",
      "name": "20220221084222-growerAccountLocation.js",
      "filePath": "database/migrations/20220221084222-growerAccountLocation.js",
      "summary": "Adds a location column to the grower_account table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "grower",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220321204145-grower-account-organization.js",
      "type": "file",
      "name": "20220321204145-grower-account-organization.js",
      "filePath": "database/migrations/20220321204145-grower-account-organization.js",
      "summary": "Adds an organization reference to the grower_account table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "grower",
        "organization"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220411074015-add-grower-account-bulk-pack-file-name.js",
      "type": "file",
      "name": "20220411074015-add-grower-account-bulk-pack-file-name.js",
      "filePath": "database/migrations/20220411074015-add-grower-account-bulk-pack-file-name.js",
      "summary": "Adds a bulk_pack_file_name column to the grower_account table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "grower",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220411233052-add-owner-id-to-tag.js",
      "type": "file",
      "name": "20220411233052-add-owner-id-to-tag.js",
      "filePath": "database/migrations/20220411233052-add-owner-id-to-tag.js",
      "summary": "Adds an owner_id column to the tag table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "tag",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220412072449-update-tag-unique-constraint.js",
      "type": "file",
      "name": "20220412072449-update-tag-unique-constraint.js",
      "filePath": "database/migrations/20220412072449-update-tag-unique-constraint.js",
      "summary": "Updates the unique constraint on the tag table.",
      "tags": [
        "migration",
        "database",
        "knex",
        "tag",
        "unique-constraint"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220613072449-update-capture-referenceid-allow-null.js",
      "type": "file",
      "name": "20220613072449-update-capture-referenceid-allow-null.js",
      "filePath": "database/migrations/20220613072449-update-capture-referenceid-allow-null.js",
      "summary": "Allows null values for the capture reference_id column.",
      "tags": [
        "migration",
        "database",
        "knex",
        "capture",
        "constraint"
      ],
      "complexity": "simple",
      "languageNotes": "Knex migration exporting up/down functions."
    },
    {
      "id": "file:database/migrations/20220731213059-add-grower-account-about.js",
      "type": "file",
      "name": "20220731213059-add-grower-account-about.js",
      "filePath": "database/migrations/20220731213059-add-grower-account-about.js",
      "summary": "db-migrate migration that adds an 'about' column to the grower_account table by executing paired up/down SQL files from the sqls directory.",
      "tags": [
        "migration",
        "database",
        "grower-account",
        "schema-change"
      ],
      "complexity": "simple",
      "languageNotes": "db-migrate style migration delegating actual DDL to external .sql files loaded via fs.readFile."
    },
    {
      "id": "file:database/migrations/20220804213159-update-capture-reference.js",
      "type": "file",
      "name": "20220804213159-update-capture-reference.js",
      "filePath": "database/migrations/20220804213159-update-capture-reference.js",
      "summary": "db-migrate migration that updates the capture reference definition via paired up/down SQL scripts.",
      "tags": [
        "migration",
        "database",
        "capture",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20220804214655-add-gender-column.js",
      "type": "file",
      "name": "20220804214655-add-gender-column.js",
      "filePath": "database/migrations/20220804214655-add-gender-column.js",
      "summary": "db-migrate migration that adds a gender column, applying up/down SQL files from the sqls directory.",
      "tags": [
        "migration",
        "database",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20220810061329-add-capture-tree-id.js",
      "type": "file",
      "name": "20220810061329-add-capture-tree-id.js",
      "filePath": "database/migrations/20220810061329-add-capture-tree-id.js",
      "summary": "db-migrate migration that adds a tree_id reference to the capture table via external SQL scripts.",
      "tags": [
        "migration",
        "database",
        "capture",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20220820032302-add-reference-id-unique.js",
      "type": "file",
      "name": "20220820032302-add-reference-id-unique.js",
      "filePath": "database/migrations/20220820032302-add-reference-id-unique.js",
      "summary": "db-migrate migration that enforces a unique constraint on reference_id using paired up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "constraint",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20221107062128-grower-account-reference-id.js",
      "type": "file",
      "name": "20221107062128-grower-account-reference-id.js",
      "filePath": "database/migrations/20221107062128-grower-account-reference-id.js",
      "summary": "db-migrate migration that adds a reference_id to the grower_account table via external SQL scripts.",
      "tags": [
        "migration",
        "database",
        "grower-account",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20221129085159-AddGeographyIndexOnTree.js",
      "type": "file",
      "name": "20221129085159-AddGeographyIndexOnTree.js",
      "filePath": "database/migrations/20221129085159-AddGeographyIndexOnTree.js",
      "summary": "db-migrate migration that creates a geography index on the tree table to speed up spatial queries.",
      "tags": [
        "migration",
        "database",
        "index",
        "geospatial"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20221209065400-CapturePlantingOrgIdAllowNull.js",
      "type": "file",
      "name": "20221209065400-CapturePlantingOrgIdAllowNull.js",
      "filePath": "database/migrations/20221209065400-CapturePlantingOrgIdAllowNull.js",
      "summary": "db-migrate migration that relaxes the capture planting_organization_id column to allow null values.",
      "tags": [
        "migration",
        "database",
        "capture",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20221229015520-AddCapturedAtIndex.js",
      "type": "file",
      "name": "20221229015520-AddCapturedAtIndex.js",
      "filePath": "database/migrations/20221229015520-AddCapturedAtIndex.js",
      "summary": "db-migrate migration that adds an index on the captured_at column to improve time-range query performance.",
      "tags": [
        "migration",
        "database",
        "index",
        "capture"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20230130192407-grower-account-table.js",
      "type": "file",
      "name": "20230130192407-grower-account-table.js",
      "filePath": "database/migrations/20230130192407-grower-account-table.js",
      "summary": "db-migrate migration that creates or alters the grower_account table structure via paired up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "grower-account",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20230501001217-add-token-to-capture.js",
      "type": "file",
      "name": "20230501001217-add-token-to-capture.js",
      "filePath": "database/migrations/20230501001217-add-token-to-capture.js",
      "summary": "db-migrate migration that adds a token column to the capture table via external SQL scripts.",
      "tags": [
        "migration",
        "database",
        "capture",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20230501001718-show-in-map.js",
      "type": "file",
      "name": "20230501001718-show-in-map.js",
      "filePath": "database/migrations/20230501001718-show-in-map.js",
      "summary": "db-migrate migration that adds a show_in_map flag column via paired up/down SQL files.",
      "tags": [
        "migration",
        "database",
        "schema-change"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/20230501015815-materialized-view-capture-match.js",
      "type": "file",
      "name": "20230501015815-materialized-view-capture-match.js",
      "filePath": "database/migrations/20230501015815-materialized-view-capture-match.js",
      "summary": "db-migrate migration that creates a materialized view for capture matching to accelerate the matching tool queries.",
      "tags": [
        "migration",
        "database",
        "materialized-view",
        "matching"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/seeds/00_job_database_cleaner.js",
      "type": "file",
      "name": "00_job_database_cleaner.js",
      "filePath": "database/seeds/00_job_database_cleaner.js",
      "summary": "Knex seed that clears tree, capture, and grower_account tables before other seeds populate fresh data.",
      "tags": [
        "seed",
        "database",
        "cleanup",
        "test-data"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/seeds/02_table_captures.js",
      "type": "file",
      "name": "02_table_captures.js",
      "filePath": "database/seeds/02_table_captures.js",
      "summary": "Knex seed that loads ~20,000 captures from a JSON fixture, splits them into 1000-row batches, assigns UUIDs, and inserts them into the capture table.",
      "tags": [
        "seed",
        "database",
        "capture",
        "test-data"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/seeds/03_table_trees.js",
      "type": "file",
      "name": "03_table_trees.js",
      "filePath": "database/seeds/03_table_trees.js",
      "summary": "Knex seed that loads tree fixture data from a JSON file and inserts it into the tree table.",
      "tags": [
        "seed",
        "database",
        "tree",
        "test-data"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/seeds/data/mocks.js",
      "type": "file",
      "name": "mocks.js",
      "filePath": "database/seeds/data/mocks.js",
      "summary": "Mock data helpers that generate randomized capture and potential-tree responses for testing the matching tool endpoints.",
      "tags": [
        "mock",
        "test-data",
        "matching",
        "fixtures"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:database/seeds/data/mocks.js:getMockCaptures",
      "type": "function",
      "name": "getMockCaptures",
      "filePath": "database/seeds/data/mocks.js",
      "lineRange": [
        80,
        99
      ],
      "summary": "Express-style handler that returns a mocked list of capture records for matching-tool testing.",
      "tags": [
        "mock",
        "handler",
        "capture",
        "test-data"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:database/seeds/data/mocks.js:getMockPotentialTrees",
      "type": "function",
      "name": "getMockPotentialTrees",
      "filePath": "database/seeds/data/mocks.js",
      "lineRange": [
        101,
        131
      ],
      "summary": "Express-style handler that returns a mocked list of potential tree matches for a capture during matching-tool testing.",
      "tags": [
        "mock",
        "handler",
        "matching",
        "test-data"
      ],
      "complexity": "moderate"
    },
    {
      "id": "document:docs/api/spec/matcheing-tool-test-case.md",
      "type": "document",
      "name": "matcheing-tool-test-case.md",
      "filePath": "docs/api/spec/matcheing-tool-test-case.md",
      "summary": "Test-case specification for the matching tool describing expected behavior and scenarios across nine documented sections.",
      "tags": [
        "documentation",
        "specification",
        "matching",
        "test-case"
      ],
      "complexity": "moderate"
    },
    {
      "id": "config:docs/api/spec/treetracker.v1.yaml",
      "type": "config",
      "name": "treetracker.v1.yaml",
      "filePath": "docs/api/spec/treetracker.v1.yaml",
      "summary": "OpenAPI v1 specification describing the TreeTracker API surface, including paths, request/response schemas, and models.",
      "tags": [
        "api-schema",
        "openapi",
        "documentation",
        "specification"
      ],
      "complexity": "complex",
      "languageNotes": "Large OpenAPI 3 document (~1300 lines) defining the public REST contract."
    },
    {
      "id": "document:docs/decisions/0001-grower-accounts-having-multiple-organizations.md",
      "type": "document",
      "name": "0001-grower-accounts-having-multiple-organizations.md",
      "filePath": "docs/decisions/0001-grower-accounts-having-multiple-organizations.md",
      "summary": "Architecture decision record capturing the choice to allow grower accounts to be associated with multiple organizations.",
      "tags": [
        "documentation",
        "adr",
        "architecture-decision",
        "grower-account"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:knexfile.js",
      "type": "file",
      "name": "knexfile.js",
      "filePath": "knexfile.js",
      "summary": "Knex configuration that validates the seeder database URL and defines development and usertest connection profiles with pooling and seed directory settings.",
      "tags": [
        "config",
        "database",
        "knex",
        "build-system"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:scripts/setup-dev-database-passwords.sh",
      "type": "file",
      "name": "setup-dev-database-passwords.sh",
      "filePath": "scripts/setup-dev-database-passwords.sh",
      "summary": "Shell script that fetches DigitalOcean database user passwords via doctl and populates local .env and database.json files from templates.",
      "tags": [
        "script",
        "setup",
        "database",
        "credentials"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:scripts/vars.sh",
      "type": "file",
      "name": "vars.sh",
      "filePath": "scripts/vars.sh",
      "summary": "Shared shell variable file defining the treetracker database schema name, sourced by other setup scripts.",
      "tags": [
        "script",
        "configuration",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/app.spec.js",
      "type": "file",
      "name": "app.spec.js",
      "filePath": "server/app.spec.js",
      "summary": "Placeholder Mocha test suite for the Express app with content-type header assertions currently commented out.",
      "tags": [
        "test",
        "placeholder",
        "server"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:tools/create-grower.sql",
      "type": "file",
      "name": "create-grower.sql",
      "filePath": "tools/create-grower.sql",
      "summary": "One-off SQL utility that inserts a sample grower_account row for manual testing or bootstrapping.",
      "tags": [
        "database",
        "utility",
        "grower-account",
        "sql"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:tools/create-testing-data.sql",
      "type": "file",
      "name": "create-testing-data.sql",
      "filePath": "tools/create-testing-data.sql",
      "summary": "Seed script that populates the treetracker.capture and treetracker.tree tables with test data selected from the legacy trees table, generating UUIDs and PostGIS geography points for active approved records.",
      "tags": [
        "database",
        "data-seeding",
        "sql",
        "postgis",
        "test"
      ],
      "complexity": "simple",
      "languageNotes": "Uses uuid_generate_v4() and PostGIS ST_SetSRID/ST_Point to build geography columns during the INSERT ... SELECT."
    }
  ],
  "edges": [
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerPost",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerPost",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerPatch",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerPatch",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerSingleGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerSingleGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerTagGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerTagGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerTagPost",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerTagPost",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerSingleTagGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerSingleTagGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerSingleTagPatch",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "function:server/handlers/captureHandler/index.js:captureHandlerSingleTagPatch",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerPost",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerPost",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerPatch",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerPatch",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerSingleGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerSingleGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerPut",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "function:server/handlers/growerAccountHandler/index.js:growerAccountHandlerPut",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "function:server/handlers/tagHandler/index.js:tagHandlerGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "function:server/handlers/tagHandler/index.js:tagHandlerGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "function:server/handlers/tagHandler/index.js:tagHandlerPost",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "function:server/handlers/tagHandler/index.js:tagHandlerPost",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "function:server/handlers/tagHandler/index.js:tagHandlerPatch",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "function:server/handlers/tagHandler/index.js:tagHandlerPatch",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "function:server/handlers/tagHandler/index.js:tagHandlerSingleGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "function:server/handlers/tagHandler/index.js:tagHandlerSingleGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerPost",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerPost",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerGetPotentialMatches",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerGetPotentialMatches",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerSingleGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerSingleGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerPatch",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerPatch",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerTagGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerTagGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerTagPost",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerTagPost",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerSingleTagGet",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerSingleTagGet",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerSingleTagPatch",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "function:server/handlers/treeHandler/index.js:treeHandlerSingleTagPatch",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/utils/helper.js",
      "target": "function:server/utils/helper.js:generatePrevAndNext",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/utils/helper.js",
      "target": "function:server/utils/helper.js:generatePrevAndNext",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/utils/helper.js",
      "target": "function:server/utils/helper.js:getFilterAndLimitOptions",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/utils/helper.js",
      "target": "function:server/utils/helper.js:getFilterAndLimitOptions",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/utils/utils.js",
      "target": "function:server/utils/utils.js:handlerWrapper",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/utils/utils.js",
      "target": "function:server/utils/utils.js:handlerWrapper",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/utils/utils.js",
      "target": "function:server/utils/utils.js:errorHandler",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/utils/utils.js",
      "target": "function:server/utils/utils.js:errorHandler",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/services/GrowerAccountService.js",
      "target": "class:server/services/GrowerAccountService.js:GrowerAccountService",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/GrowerAccountService.js",
      "target": "class:server/services/GrowerAccountService.js:GrowerAccountService",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/services/TreeService.js",
      "target": "class:server/services/TreeService.js:TreeService",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/TreeService.js",
      "target": "class:server/services/TreeService.js:TreeService",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/utils/HttpError.js",
      "target": "class:server/utils/HttpError.js:HttpError",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/utils/HttpError.js",
      "target": "class:server/utils/HttpError.js:HttpError",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/captureHandler/docs.js",
      "target": "file:server/handlers/captureHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "file:server/handlers/captureHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "file:server/services/CaptureService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "file:server/services/CaptureTagService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "file:server/utils/HttpError.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/captureHandler/index.js",
      "target": "file:server/utils/helper.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "file:server/handlers/growerAccountHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "file:server/services/GrowerAccountService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "file:server/utils/HttpError.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/growerAccountHandler/index.js",
      "target": "file:server/utils/helper.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "file:server/handlers/tagHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "file:server/services/TagService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "file:server/utils/HttpError.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/tagHandler/index.js",
      "target": "file:server/utils/helper.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "file:server/handlers/treeHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "file:server/services/TreeService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "file:server/services/TreeTagService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "file:server/utils/HttpError.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/treeHandler/index.js",
      "target": "file:server/utils/helper.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/captureRoutes.js",
      "target": "file:server/handlers/captureHandler/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/captureRoutes.js",
      "target": "file:server/utils/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/growerAccountRoutes.js",
      "target": "file:server/handlers/growerAccountHandler/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/growerAccountRoutes.js",
      "target": "file:server/utils/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/index.js",
      "target": "file:server/routes/captureRoutes.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/index.js",
      "target": "file:server/routes/growerAccountRoutes.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/index.js",
      "target": "file:server/routes/growerAccoutImageRoutes.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/index.js",
      "target": "file:server/routes/tagRoutes.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/index.js",
      "target": "file:server/routes/treeRoutes.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/tagRoutes.js",
      "target": "file:server/handlers/tagHandler/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/tagRoutes.js",
      "target": "file:server/utils/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/treeRoutes.js",
      "target": "file:server/handlers/treeHandler/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/treeRoutes.js",
      "target": "file:server/utils/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/GrowerAccountService.js",
      "target": "file:server/infra/database/Session.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/GrowerAccountService.js",
      "target": "file:server/models/GrowerAccount.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/TreeService.js",
      "target": "file:server/infra/database/Session.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/TreeService.js",
      "target": "file:server/models/tree.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/TreeService.js",
      "target": "file:server/services/QueueService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/utils/utils.js",
      "target": "file:server/utils/HttpError.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/Session.js",
      "target": "file:server/infra/database/knex.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/Session.js",
      "target": "class:server/infra/database/Session.js:Session",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/Session.js",
      "target": "class:server/infra/database/Session.js:Session",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/CaptureTag.js",
      "target": "file:server/repositories/CaptureTagRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/CaptureTag.js",
      "target": "file:server/utils/HttpError.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/CaptureTag.js",
      "target": "class:server/models/CaptureTag.js:CaptureTag",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/GrowerAccount.js",
      "target": "file:server/infra/database/knex.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/GrowerAccount.js",
      "target": "file:server/repositories/GrowerAccountRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/GrowerAccount.js",
      "target": "file:server/repositories/Legacy/PlanterRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/GrowerAccount.js",
      "target": "class:server/models/GrowerAccount.js:GrowerAccount",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/Tag.js",
      "target": "file:server/repositories/TagRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Tag.js",
      "target": "file:server/utils/HttpError.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Tag.js",
      "target": "class:server/models/Tag.js:Tag",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/TreeTag.js",
      "target": "file:server/repositories/TreeTagRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/TreeTag.js",
      "target": "file:server/utils/HttpError.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/TreeTag.js",
      "target": "class:server/models/TreeTag.js:TreeTag",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/repositories/BaseRepository.js",
      "target": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/repositories/BaseRepository.js",
      "target": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/repositories/BaseRepository.js",
      "target": "file:server/repositories/BaseRepository.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/repositories/BaseRepository.spec.js",
      "target": "file:server/infra/database/Session.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/BaseRepository.spec.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/CaptureTagRepository.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/CaptureTagRepository.js",
      "target": "class:server/repositories/CaptureTagRepository.js:CaptureTagRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "class:server/repositories/CaptureTagRepository.js:CaptureTagRepository",
      "target": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/repositories/EventRepository.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/EventRepository.js",
      "target": "class:server/repositories/EventRepository.js:EventRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "class:server/repositories/EventRepository.js:EventRepository",
      "target": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/repositories/GrowerAccountRepository.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/GrowerAccountRepository.js",
      "target": "class:server/repositories/GrowerAccountRepository.js:GrowerAccountRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "class:server/repositories/GrowerAccountRepository.js:GrowerAccountRepository",
      "target": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/repositories/Legacy/PlanterRepository.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/Legacy/PlanterRepository.js",
      "target": "class:server/repositories/Legacy/PlanterRepository.js:LegacyPlanterRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "class:server/repositories/Legacy/PlanterRepository.js:LegacyPlanterRepository",
      "target": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/repositories/TagRepository.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/TagRepository.js",
      "target": "class:server/repositories/TagRepository.js:TagRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "class:server/repositories/TagRepository.js:TagRepository",
      "target": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/repositories/TreeTagRepository.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/TreeTagRepository.js",
      "target": "class:server/repositories/TreeTagRepository.js:TreeTagRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "class:server/repositories/TreeTagRepository.js:TreeTagRepository",
      "target": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/services/CaptureTagService.js",
      "target": "file:server/infra/database/Session.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/CaptureTagService.js",
      "target": "file:server/models/CaptureTag.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/CaptureTagService.js",
      "target": "class:server/services/CaptureTagService.js:CaptureTagService",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/TagService.js",
      "target": "file:server/infra/database/Session.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/TagService.js",
      "target": "file:server/models/Tag.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/TagService.js",
      "target": "class:server/services/TagService.js:TagService",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/TreeTagService.js",
      "target": "file:server/infra/database/Session.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/TreeTagService.js",
      "target": "file:server/models/TreeTag.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/TreeTagService.js",
      "target": "class:server/services/TreeTagService.js:TreeTagService",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:__tests__/integration/grower_account/legacy-planter-creation.js",
      "target": "file:server/infra/database/knex.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:database/seed-cli.js",
      "target": "file:database/seeds/cli/seed.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:database/seed-cli.js",
      "target": "function:database/seed-cli.js:exec",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:database/seeds/01_table_growers.js",
      "target": "file:server/infra/database/knex.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:database/seeds/cli/seed.js",
      "target": "file:server/infra/database/knex.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Capture.js",
      "target": "file:server/infra/database/knex.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Capture.js",
      "target": "file:server/models/DomainEvent.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Capture.js",
      "target": "file:server/repositories/CaptureRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Capture.js",
      "target": "file:server/repositories/TreeRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Capture.js",
      "target": "file:server/utils/enums.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Capture.js",
      "target": "class:server/models/Capture.js:Capture",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/Capture.js",
      "target": "class:server/models/Capture.js:Capture",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/DomainEvent.js",
      "target": "file:server/repositories/EventRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/DomainEvent.js",
      "target": "class:server/models/DomainEvent.js:DomainEvent",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/DomainEvent.js",
      "target": "class:server/models/DomainEvent.js:DomainEvent",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/tree.js",
      "target": "file:server/infra/database/knex.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/tree.js",
      "target": "file:server/models/Capture.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/tree.js",
      "target": "file:server/models/DomainEvent.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/tree.js",
      "target": "file:server/repositories/CaptureRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/tree.js",
      "target": "file:server/repositories/TreeRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/tree.js",
      "target": "file:server/utils/enums.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/tree.js",
      "target": "class:server/models/tree.js:Tree",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/tree.js",
      "target": "class:server/models/tree.js:Tree",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/repositories/CaptureRepository.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/CaptureRepository.js",
      "target": "class:server/repositories/CaptureRepository.js:CaptureRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/repositories/CaptureRepository.js",
      "target": "class:server/repositories/CaptureRepository.js:CaptureRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "class:server/repositories/CaptureRepository.js:CaptureRepository",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/repositories/TreeRepository.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/TreeRepository.js",
      "target": "class:server/repositories/TreeRepository.js:TreeRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/repositories/TreeRepository.js",
      "target": "class:server/repositories/TreeRepository.js:TreeRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "class:server/repositories/TreeRepository.js:TreeRepository",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/services/EventHandlerService.js",
      "target": "file:server/infra/database/Session.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/EventHandlerService.js",
      "target": "file:server/models/Capture.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/EventHandlerService.js",
      "target": "file:server/models/DomainEvent.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/EventHandlerService.js",
      "target": "file:server/services/QueueService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/EventHandlerService.js",
      "target": "file:server/utils/enums.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/EventHandlerService.js",
      "target": "class:server/services/EventHandlerService.js:EventHandlerService",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/EventHandlerService.js",
      "target": "class:server/services/EventHandlerService.js:EventHandlerService",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/growerAccountHandler/docs.js",
      "target": "file:server/handlers/growerAccountHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/growerAccountImageHandler/docs.js",
      "target": "file:server/handlers/growerAccountImageHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/growerAccountImageHandler/index.js",
      "target": "file:server/handlers/growerAccountHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/growerAccountImageHandler/index.js",
      "target": "file:server/handlers/growerAccountImageHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/growerAccountImageHandler/index.js",
      "target": "file:server/services/GrowerAccountImageService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/swaggerDoc.js",
      "target": "file:server/handlers/captureHandler/docs.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/swaggerDoc.js",
      "target": "file:server/handlers/growerAccountHandler/docs.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/swaggerDoc.js",
      "target": "file:server/handlers/growerAccountImageHandler/docs.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/swaggerDoc.js",
      "target": "file:server/handlers/tagHandler/docs.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/swaggerDoc.js",
      "target": "file:server/handlers/treeHandler/docs.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/tagHandler/docs.js",
      "target": "file:server/handlers/tagHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/treeHandler/docs.js",
      "target": "file:server/handlers/treeHandler/schemas.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/growerAccoutImageRoutes.js",
      "target": "file:server/handlers/growerAccountImageHandler/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routes/growerAccoutImageRoutes.js",
      "target": "file:server/utils/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/growerAccountImageHandler/index.js",
      "target": "function:server/handlers/growerAccountImageHandler/index.js:growerAccountImageHandlerPost",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/growerAccountImageHandler/index.js",
      "target": "function:server/handlers/growerAccountImageHandler/index.js:growerAccountImageHandlerPatch",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/handlers/growerAccountImageHandler/index.js",
      "target": "function:server/handlers/growerAccountImageHandler/index.js:growerAccountImageHandlerPost",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/handlers/growerAccountImageHandler/index.js",
      "target": "function:server/handlers/growerAccountImageHandler/index.js:growerAccountImageHandlerPatch",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "file:__tests__/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "file:server/app.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "file:server/services/LegacyAPIService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "target": "file:__tests__/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "target": "file:server/app.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "target": "file:server/infra/S3/s3.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tag/tag.spec.js",
      "target": "file:__tests__/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tag/tag.spec.js",
      "target": "file:server/app.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/potential_matches.spec.js",
      "target": "file:__tests__/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/potential_matches.spec.js",
      "target": "file:server/app.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/tree.spec.js",
      "target": "file:__tests__/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/tree.spec.js",
      "target": "file:server/app.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/utils.js",
      "target": "file:server/infra/database/knex.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.js",
      "target": "file:server/handlers/swaggerDoc.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.js",
      "target": "file:server/routes/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.js",
      "target": "file:server/services/EventHandlerService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.js",
      "target": "file:server/utils/HttpError.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.js",
      "target": "file:server/utils/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/server.js",
      "target": "file:server/app.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/server.js",
      "target": "file:server/setup.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.js",
      "target": "file:__tests__/integration/capture/capture.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.js",
      "target": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.js",
      "target": "file:__tests__/integration/tag/tag.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.js",
      "target": "file:__tests__/integration/tree/potential_matches.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.js",
      "target": "file:__tests__/integration/tree/tree.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:__tests__/integration/events/events.spec.js",
      "target": "file:__tests__/integration/events/rabbitmq-test-config.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/events/events.spec.js",
      "target": "file:__tests__/utils.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/events/events.spec.js",
      "target": "file:server/infra/RabbitMQ/config/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/events/rabbitmq-test-config.js",
      "target": "file:server/infra/RabbitMQ/config/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/RabbitMQ/RabbitMQ.js",
      "target": "file:server/infra/RabbitMQ/config/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/CaptureService.js",
      "target": "file:server/infra/database/Session.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/CaptureService.js",
      "target": "file:server/models/Capture.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/CaptureService.js",
      "target": "file:server/services/LegacyAPIService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/CaptureService.js",
      "target": "file:server/services/QueueService.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/QueueService.js",
      "target": "file:server/infra/RabbitMQ/RabbitMQ.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/QueueService.js",
      "target": "file:server/infra/RabbitMQ/config/index.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/QueueService.js",
      "target": "file:server/models/DomainEvent.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/RabbitMQ/RabbitMQ.js",
      "target": "class:server/infra/RabbitMQ/RabbitMQ.js:RabbitMQ",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/RabbitMQ/RabbitMQ.js",
      "target": "class:server/infra/RabbitMQ/RabbitMQ.js:RabbitMQ",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/services/CaptureService.js",
      "target": "class:server/services/CaptureService.js:CaptureService",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/CaptureService.js",
      "target": "class:server/services/CaptureService.js:CaptureService",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/services/QueueService.js",
      "target": "class:server/services/QueueService.js:QueueService",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/QueueService.js",
      "target": "class:server/services/QueueService.js:QueueService",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/services/LegacyAPIService.js",
      "target": "function:server/services/LegacyAPIService.js:approveLegacyTree",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/LegacyAPIService.js",
      "target": "function:server/services/LegacyAPIService.js:approveLegacyTree",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/services/CaptureService.js",
      "target": "function:server/services/LegacyAPIService.js:approveLegacyTree",
      "type": "calls",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/services/QueueService.js",
      "target": "class:server/infra/RabbitMQ/RabbitMQ.js:RabbitMQ",
      "type": "calls",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/RabbitMQ/config/index.js",
      "target": "file:__tests__/integration/events/events.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/models/GrowerAccountImage.js",
      "target": "file:server/repositories/GrowerAccountImageRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/repositories/GrowerAccountImageRepository.js",
      "target": "file:server/repositories/BaseRepository.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/GrowerAccountImageService.js",
      "target": "file:server/infra/database/Session.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/GrowerAccountImageService.js",
      "target": "file:server/models/GrowerAccountImage.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/GrowerAccountImageService.js",
      "target": "file:server/services/S3Service.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/S3Service.js",
      "target": "file:server/infra/S3/s3.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/GrowerAccountImage.js",
      "target": "class:server/models/GrowerAccountImage.js:GrowerAccountImage",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/repositories/GrowerAccountImageRepository.js",
      "target": "class:server/repositories/GrowerAccountImageRepository.js:GrowerAccountImageRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/GrowerAccountImageService.js",
      "target": "class:server/services/GrowerAccountImageService.js:GrowerAccountImageService",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/S3Service.js",
      "target": "function:server/services/S3Service.js:uploadImage",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/GrowerAccountImage.js",
      "target": "class:server/models/GrowerAccountImage.js:GrowerAccountImage",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/repositories/GrowerAccountImageRepository.js",
      "target": "class:server/repositories/GrowerAccountImageRepository.js:GrowerAccountImageRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/services/GrowerAccountImageService.js",
      "target": "class:server/services/GrowerAccountImageService.js:GrowerAccountImageService",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/services/S3Service.js",
      "target": "function:server/services/S3Service.js:uploadImage",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "class:server/repositories/GrowerAccountImageRepository.js:GrowerAccountImageRepository",
      "target": "class:server/repositories/BaseRepository.js:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/services/GrowerAccountImageService.js",
      "target": "function:server/services/S3Service.js:uploadImage",
      "type": "calls",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/S3/s3.js",
      "target": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:.dockerignore",
      "target": "service:Dockerfile",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "pipeline:.github/workflows/test-tool-test-env.yml",
      "target": "step:.github/workflows/test-tool-test-env.yml:seed",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/test-tool.yml",
      "target": "step:.github/workflows/test-tool.yml:seed",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/treetracker-api-build-deploy-dev.yml",
      "target": "step:.github/workflows/treetracker-api-build-deploy-dev.yml:test",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/treetracker-api-build-deploy-dev.yml",
      "target": "step:.github/workflows/treetracker-api-build-deploy-dev.yml:release",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "step:.github/workflows/treetracker-api-build-deploy-dev.yml:release",
      "target": "step:.github/workflows/treetracker-api-build-deploy-dev.yml:test",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "pipeline:.github/workflows/treetracker-api-deploy-dev.yml",
      "target": "step:.github/workflows/treetracker-api-deploy-dev.yml:deploy-dev",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/treetracker-api-deploy-prod.yml",
      "target": "step:.github/workflows/treetracker-api-deploy-prod.yml:deploy-prod",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/treetracker-api-deploy-test.yml",
      "target": "step:.github/workflows/treetracker-api-deploy-test.yml:deploy-test",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/treetracker-api-pull-request-ci.yml",
      "target": "step:.github/workflows/treetracker-api-pull-request-ci.yml:test",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "config:package.json",
      "target": "file:server/app.js",
      "type": "configures",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:.prettierrc.json",
      "target": "file:server/app.js",
      "type": "configures",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "document:README.md",
      "target": "file:server/app.js",
      "type": "documents",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "document:README.md",
      "target": "config:package.json",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "document:CHANGELOG.md",
      "target": "config:package.json",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/attributes.json",
      "target": "file:__tests__/integration/capture/capture.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/capture1.json",
      "target": "file:__tests__/integration/capture/capture.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/capture1.json",
      "target": "file:__tests__/integration/events/events.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/capture1.json",
      "target": "file:__tests__/integration/tree/potential_matches.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/capture1.json",
      "target": "file:__tests__/integration/tree/tree.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/capture2.json",
      "target": "file:__tests__/integration/capture/capture.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/domain_event1.json",
      "target": "file:__tests__/integration/tree/tree.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/domain_event2.json",
      "target": "file:__tests__/integration/capture/capture.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/grower_account1.json",
      "target": "file:__tests__/integration/capture/capture.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/grower_account1.json",
      "target": "file:__tests__/integration/events/events.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/grower_account1.json",
      "target": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/grower_account1.json",
      "target": "file:__tests__/integration/tree/potential_matches.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/grower_account1.json",
      "target": "file:__tests__/integration/tree/tree.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/grower_account2.json",
      "target": "file:__tests__/integration/capture/capture.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/grower_account2.json",
      "target": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/tag1.json",
      "target": "file:__tests__/integration/tag/tag.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/tag2.json",
      "target": "file:__tests__/integration/capture/capture.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/tag2.json",
      "target": "file:__tests__/integration/tree/tree.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/tree1.json",
      "target": "file:__tests__/integration/capture/capture.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/tree1.json",
      "target": "file:__tests__/integration/tree/potential_matches.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/tree1.json",
      "target": "file:__tests__/integration/tree/tree.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/tree2.json",
      "target": "file:__tests__/integration/tree/potential_matches.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:__tests__/mock/tree2.json",
      "target": "file:__tests__/integration/tree/tree.spec.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20210117023353-status-enum-up.sql:capture_status",
      "target": "table:database/migrations/sqls/20210117023353-status-enum-down.sql:capture_status",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20210218195106-capture-up.sql:capture",
      "target": "table:database/migrations/sqls/20210218195106-capture-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20210219042951-domain-event-up.sql:domain_event",
      "target": "table:database/migrations/sqls/20210219042951-domain-event-down.sql:domain_event",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20210219043110-tree-up.sql:tree",
      "target": "table:database/migrations/sqls/20210219043110-tree-down.sql:tree",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20210503011318-rename-to-location-up.sql:estimated_geometric_location",
      "target": "table:database/migrations/sqls/20210503011318-rename-to-location-down.sql:estimated_geometric_location",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211217023643-grower-account-up.sql:grower_account",
      "target": "table:database/migrations/sqls/20211217023643-grower-account-down.sql:grower_account",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219082806-tag-up.sql:tag",
      "target": "table:database/migrations/sqls/20211219082806-tag-down.sql:tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219142620-capture-tag-up.sql:capture_tag",
      "target": "table:database/migrations/sqls/20211219142620-capture-tag-down.sql:capture_tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219143359-tree-tag-up.sql:tree_tag",
      "target": "table:database/migrations/sqls/20211219143359-tree-tag-down.sql:tree_tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219205211-rename-capture-location-up.sql:capture_est_gmtric_loc_idx_gist",
      "target": "table:database/migrations/sqls/20211219205211-rename-capture-location-down.sql:capture_est_gmtric_loc_idx_gist",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219142620-capture-tag-up.sql:capture_tag",
      "target": "table:database/migrations/sqls/20210218195106-capture-up.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219142620-capture-tag-up.sql:capture_tag",
      "target": "table:database/migrations/sqls/20211219082806-tag-up.sql:tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219143359-tree-tag-up.sql:tree_tag",
      "target": "table:database/migrations/sqls/20210219043110-tree-up.sql:tree",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219143359-tree-tag-up.sql:tree_tag",
      "target": "table:database/migrations/sqls/20211219082806-tag-up.sql:tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20210218195106-capture-up.sql:capture",
      "target": "table:database/migrations/sqls/20210219043110-tree-up.sql:tree",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20210219043110-tree-up.sql:tree",
      "target": "table:database/migrations/sqls/20210218195106-capture-up.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20210503011318-rename-to-location-up.sql:estimated_geometric_location",
      "target": "table:database/migrations/sqls/20210218195106-capture-up.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20210503011318-rename-to-location-up.sql:estimated_geometric_location",
      "target": "table:database/migrations/sqls/20210219043110-tree-up.sql:tree",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219205211-rename-capture-location-up.sql:capture_est_gmtric_loc_idx_gist",
      "target": "table:database/migrations/sqls/20210218195106-capture-up.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219205822-rename-tree-location-up.sql:tree",
      "target": "table:database/migrations/sqls/20211219205822-rename-tree-location-down.sql:tree",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219211516-capture-device-update-up.sql:capture",
      "target": "table:database/migrations/sqls/20211219211516-capture-device-update-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219211814-capture-session-id-up.sql:capture",
      "target": "table:database/migrations/sqls/20211219211814-capture-session-id-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219212027-update-tree-status-up.sql:tree",
      "target": "table:database/migrations/sqls/20211219212027-update-tree-status-down.sql:tree",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219213129-update-capture-status-up.sql:capture",
      "target": "table:database/migrations/sqls/20211219213129-update-capture-status-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219213548-tree-attributes-up.sql:tree",
      "target": "table:database/migrations/sqls/20211219213548-tree-attributes-down.sql:tree",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211219233755-planter-to-grower-up.sql:capture",
      "target": "table:database/migrations/sqls/20211219233755-planter-to-grower-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211220234459-capture-species-uuid-up.sql:capture",
      "target": "table:database/migrations/sqls/20211220234459-capture-species-uuid-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211220234707-tree-species-uuid-up.sql:tree",
      "target": "table:database/migrations/sqls/20211220234707-tree-species-uuid-down.sql:tree",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211222232655-add-capture-tag-unique-up.sql:capture_tag",
      "target": "table:database/migrations/sqls/20211222232655-add-capture-tag-unique-down.sql:capture_tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211222232830-add-tree-tag-unique-up.sql:tree_tag",
      "target": "table:database/migrations/sqls/20211222232830-add-tree-tag-unique-down.sql:tree_tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20211230232949-change-public-up.sql:tag",
      "target": "table:database/migrations/sqls/20211230232949-change-public-down.sql:tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220114035335-add-tag-name-unique-constraint-up.sql:tag",
      "target": "table:database/migrations/sqls/20220114035335-add-tag-name-unique-constraint-down.sql:tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220119035259-drop-wallet-not-null-up.sql:grower_account",
      "target": "table:database/migrations/sqls/20220119035259-drop-wallet-not-null-down.sql:grower_account",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220119035317-add-wallet-unique-up.sql:grower_account",
      "target": "table:database/migrations/sqls/20220119035317-add-wallet-unique-down.sql:grower_account",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220124203531-update-grower-account-name-up.sql:grower_account",
      "target": "table:database/migrations/sqls/20220124203531-update-grower-account-name-down.sql:grower_account",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220127232527-AddCreateAtDefaultCapture-up.sql:capture",
      "target": "table:database/migrations/sqls/20220127232527-AddCreateAtDefaultCapture-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220127232724-AddCapturedAtToCapture-up.sql:capture",
      "target": "table:database/migrations/sqls/20220127232724-AddCapturedAtToCapture-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220203193500-drop-grower-username-photo-url-up.sql:capture",
      "target": "table:database/migrations/sqls/20220203193500-drop-grower-username-photo-url-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220203200214-rename-grower-id-in-capture-up.sql:capture",
      "target": "table:database/migrations/sqls/20220203200214-rename-grower-id-in-capture-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220204225428-drop-wallet-id-grower-account-up.sql:grower_account",
      "target": "table:database/migrations/sqls/20220204225428-drop-wallet-id-grower-account-down.sql:grower_account",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220221084222-growerAccountLocation-up.sql:grower_account",
      "target": "table:database/migrations/sqls/20220221084222-growerAccountLocation-down.sql:grower_account",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220321204145-grower-account-organization-up.sql:grower_account_org",
      "target": "table:database/migrations/sqls/20220321204145-grower-account-organization-down.sql:grower_account_org",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220411074015-add-grower-account-bulk-pack-file-name-up.sql:grower_account",
      "target": "table:database/migrations/sqls/20220411074015-add-grower-account-bulk-pack-file-name-down.sql:grower_account",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220411233052-add-owner-id-to-tag-up.sql:tag",
      "target": "table:database/migrations/sqls/20220411233052-add-owner-id-to-tag-down.sql:tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220412072449-update-tag-unique-constraint-up.sql:tag",
      "target": "table:database/migrations/sqls/20220412072449-update-tag-unique-constraint-down.sql:tag",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220613072449-update-capture-referenceid-allow-null-up.sql:capture",
      "target": "table:database/migrations/sqls/20220613072449-update-capture-referenceid-allow-null-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220731213059-add-grower-account-about-up.sql:grower_account",
      "target": "table:database/migrations/sqls/20220731213059-add-grower-account-about-down.sql:grower_account",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220804213159-update-capture-reference-up.sql:capture",
      "target": "table:database/migrations/sqls/20220804213159-update-capture-reference-down.sql:capture",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20220804214655-add-gender-column-up.sql:grower_account",
      "target": "table:database/migrations/sqls/20220804214655-add-gender-column-down.sql:grower_account",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "table:database/migrations/sqls/20230130192407-grower-account-table-up.sql",
      "target": "table:database/migrations/sqls/20230130192407-grower-account-table-up.sql:grower_account_image",
      "type": "migrates",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "config:database/seeds/data/20220130-Captures.json",
      "target": "config:database/seeds/data/20220130-Trees.json",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:database/seeds/data/20220130-Trees.json",
      "target": "config:database/seeds/data/20220130-Growers.json",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:database/seeds/data/20220210-Captures.json",
      "target": "config:database/seeds/data/20220210-Trees.json",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:deployment/base/kustomization.yaml",
      "target": "config:deployment/base/deployment.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/kustomization.yaml",
      "target": "config:deployment/base/mapping.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/kustomization.yaml",
      "target": "config:deployment/base/service.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/kustomization.yaml",
      "target": "config:deployment/base/database-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/kustomization.yaml",
      "target": "config:deployment/base/cluster-role.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/kustomization.yaml",
      "target": "config:deployment/base/cluster-role-binding.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/kustomization.yaml",
      "target": "config:deployment/base/database-migration-job.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/kustomization.yaml",
      "target": "config:deployment/base/database-migration-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/kustomization.yaml",
      "target": "config:deployment/base/rabbitmq-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/deployment.yaml",
      "target": "config:deployment/base/database-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/deployment.yaml",
      "target": "config:deployment/base/rabbitmq-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/database-migration-job.yaml",
      "target": "config:deployment/base/database-migration-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/service.yaml",
      "target": "config:deployment/base/deployment.yaml",
      "type": "routes",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/mapping.yaml",
      "target": "config:deployment/base/service.yaml",
      "type": "routes",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/base/cluster-role-binding.yaml",
      "target": "config:deployment/base/cluster-role.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/development/kustomization.yaml",
      "target": "config:deployment/overlays/development/database-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/development/kustomization.yaml",
      "target": "config:deployment/overlays/development/database-migration-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/development/kustomization.yaml",
      "target": "config:deployment/overlays/development/deployment.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/development/kustomization.yaml",
      "target": "config:deployment/overlays/development/mapping.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/development/kustomization.yaml",
      "target": "config:deployment/overlays/development/rabbitmq-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/production/kustomization.yaml",
      "target": "config:deployment/overlays/production/database-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/production/kustomization.yaml",
      "target": "config:deployment/overlays/production/database-migration-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/production/kustomization.yaml",
      "target": "config:deployment/overlays/production/rabbitmq-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/test/kustomization.yaml",
      "target": "config:deployment/overlays/test/database-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/test/kustomization.yaml",
      "target": "config:deployment/overlays/test/database-migration-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/test/kustomization.yaml",
      "target": "config:deployment/overlays/test/rabbitmq-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/test/kustomization.yaml",
      "target": "config:deployment/overlays/test/mapping.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "file:database/etl/create-grower-account-from-legacy.sql",
      "target": "file:database/migrations/20211217023643-grower-account.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20211219142620-capture-tag.js",
      "target": "file:database/migrations/20211219082806-tag.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20211219142620-capture-tag.js",
      "target": "file:database/migrations/20210218195106-capture.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20211219143359-tree-tag.js",
      "target": "file:database/migrations/20211219082806-tag.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20211219143359-tree-tag.js",
      "target": "file:database/migrations/20210219043110-tree.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20211219205211-rename-capture-location.js",
      "target": "file:database/migrations/20210218195106-capture.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20211219205822-rename-tree-location.js",
      "target": "file:database/migrations/20210219043110-tree.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20210503011318-rename-to-location.js",
      "target": "file:database/migrations/20210317210236-geography.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20210318003922-geography-capture.js",
      "target": "file:database/migrations/20210317210236-geography.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20210318003922-geography-capture.js",
      "target": "file:database/migrations/20210218195106-capture.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/migrations/20211219211516-capture-device-update.js",
      "target": "file:database/migrations/20210218195106-capture.js",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:database/seeds/data/mocks.js",
      "target": "function:database/seeds/data/mocks.js:getMockCaptures",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:database/seeds/data/mocks.js",
      "target": "function:database/seeds/data/mocks.js:getMockPotentialTrees",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/app.js",
      "target": "file:server/app.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5,
      "description": "Path-based pairing (deterministic)"
    },
    {
      "source": "file:database/seeds/02_table_captures.js",
      "target": "config:database/seeds/data/20220210-Captures.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:database/seeds/03_table_trees.js",
      "target": "config:database/seeds/data/20220210-Trees.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:database/seeds/01_table_growers.js",
      "target": "config:database/seeds/data/20220130-Growers.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:database/seeds/cli/seed.js",
      "target": "config:database/seeds/data/20220210-Captures.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/handlers/swaggerDoc.js",
      "target": "config:package.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "config:__tests__/mock/attributes.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "config:__tests__/mock/capture1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "config:__tests__/mock/capture2.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "config:__tests__/mock/domain_event2.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "config:__tests__/mock/grower_account1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "config:__tests__/mock/grower_account2.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "config:__tests__/mock/tag2.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/capture/capture.spec.js",
      "target": "config:__tests__/mock/tree1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "target": "config:__tests__/mock/grower_account1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/grower_account/grower_account.spec.js",
      "target": "config:__tests__/mock/grower_account2.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tag/tag.spec.js",
      "target": "config:__tests__/mock/tag1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/potential_matches.spec.js",
      "target": "config:__tests__/mock/capture1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/potential_matches.spec.js",
      "target": "config:__tests__/mock/grower_account1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/potential_matches.spec.js",
      "target": "config:__tests__/mock/tree1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/potential_matches.spec.js",
      "target": "config:__tests__/mock/tree2.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/tree.spec.js",
      "target": "config:__tests__/mock/capture1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/tree.spec.js",
      "target": "config:__tests__/mock/domain_event1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/tree.spec.js",
      "target": "config:__tests__/mock/grower_account1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/tree.spec.js",
      "target": "config:__tests__/mock/tag2.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/tree.spec.js",
      "target": "config:__tests__/mock/tree1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/tree/tree.spec.js",
      "target": "config:__tests__/mock/tree2.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.js",
      "target": "config:package.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/events/events.spec.js",
      "target": "config:__tests__/mock/capture1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/integration/events/events.spec.js",
      "target": "config:__tests__/mock/grower_account1.json",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    }
  ],
  "layers": [
    {
      "id": "layer:api",
      "name": "API Layer",
      "description": "Express route definitions and endpoint handlers for captures, trees, tags, and grower accounts, including Joi request schemas and Swagger/OpenAPI docs generation.",
      "nodeIds": [
        "file:server/handlers/captureHandler/docs.js",
        "file:server/handlers/captureHandler/index.js",
        "file:server/handlers/captureHandler/schemas.js",
        "file:server/handlers/growerAccountHandler/index.js",
        "file:server/handlers/tagHandler/index.js",
        "file:server/handlers/treeHandler/index.js",
        "file:server/routes/captureRoutes.js",
        "file:server/routes/growerAccountRoutes.js",
        "file:server/routes/index.js",
        "file:server/routes/tagRoutes.js",
        "file:server/routes/treeRoutes.js",
        "file:server/handlers/growerAccountHandler/docs.js",
        "file:server/handlers/growerAccountHandler/schemas.js",
        "file:server/handlers/growerAccountImageHandler/docs.js",
        "file:server/handlers/growerAccountImageHandler/index.js",
        "file:server/handlers/growerAccountImageHandler/schemas.js",
        "file:server/handlers/swaggerDoc.js",
        "file:server/handlers/tagHandler/docs.js",
        "file:server/handlers/tagHandler/schemas.js",
        "file:server/handlers/treeHandler/docs.js",
        "file:server/handlers/treeHandler/schemas.js",
        "file:server/routes/growerAccoutImageRoutes.js"
      ]
    },
    {
      "id": "layer:service",
      "name": "Service Layer",
      "description": "Business logic and orchestration services (capture, tree, tag, grower account, S3, queue, legacy API, domain-event handling) that coordinate repositories and external integrations.",
      "nodeIds": [
        "file:server/services/GrowerAccountService.js",
        "file:server/services/TreeService.js",
        "file:server/services/CaptureTagService.js",
        "file:server/services/TagService.js",
        "file:server/services/TreeTagService.js",
        "file:server/services/EventHandlerService.js",
        "file:server/services/CaptureService.js",
        "file:server/services/LegacyAPIService.js",
        "file:server/services/QueueService.js",
        "file:server/services/GrowerAccountImageService.js",
        "file:server/services/S3Service.js"
      ]
    },
    {
      "id": "layer:data-access",
      "name": "Domain Models & Data Access",
      "description": "Domain model constructors and Knex-based repositories (including BaseRepository) that read and write PostgreSQL entities for trees, captures, tags, and grower accounts.",
      "nodeIds": [
        "file:server/models/CaptureTag.js",
        "file:server/models/GrowerAccount.js",
        "file:server/models/Tag.js",
        "file:server/models/TreeTag.js",
        "file:server/repositories/BaseRepository.js",
        "file:server/repositories/CaptureTagRepository.js",
        "file:server/repositories/EventRepository.js",
        "file:server/repositories/GrowerAccountRepository.js",
        "file:server/repositories/Legacy/PlanterRepository.js",
        "file:server/repositories/TagRepository.js",
        "file:server/repositories/TreeTagRepository.js",
        "file:server/models/Capture.js",
        "file:server/models/DomainEvent.js",
        "file:server/models/tree.js",
        "file:server/repositories/CaptureRepository.js",
        "file:server/repositories/TreeRepository.js",
        "file:server/models/GrowerAccountImage.js",
        "file:server/repositories/GrowerAccountImageRepository.js"
      ]
    },
    {
      "id": "layer:integration",
      "name": "Platform Integration",
      "description": "Adapters to external systems: PostgreSQL session/Knex connection, RabbitMQ messaging client and config, and AWS S3 client.",
      "nodeIds": [
        "file:server/infra/database/Session.js",
        "file:server/infra/database/knex.js",
        "file:server/infra/RabbitMQ/RabbitMQ.js",
        "file:server/infra/RabbitMQ/config/index.js",
        "file:server/infra/S3/s3.js"
      ]
    },
    {
      "id": "layer:core",
      "name": "Application Core & Utilities",
      "description": "Express app assembly, server bootstrap, setup, Knex configuration file, and shared utilities (HttpError, enums, helpers).",
      "nodeIds": [
        "file:server/utils/HttpError.js",
        "file:server/utils/helper.js",
        "file:server/utils/utils.js",
        "file:server/utils/enums.js",
        "file:server/app.js",
        "file:server/server.js",
        "file:server/setup.js",
        "file:knexfile.js"
      ]
    },
    {
      "id": "layer:database",
      "name": "Database Schema & Data",
      "description": "Knex/db-migrate SQL and JS migrations, seed data and seed CLI, ETL, and generated table schema nodes defining the PostgreSQL structure.",
      "nodeIds": [
        "file:database/seed-cli.js",
        "file:database/seeds/01_table_growers.js",
        "file:database/seeds/cli/seed.js",
        "table:database/migrations/sqls/20210117023353-status-enum-up.sql:capture_status",
        "table:database/migrations/sqls/20210117023353-status-enum-down.sql:capture_status",
        "table:database/migrations/sqls/20210218195106-capture-up.sql:capture",
        "table:database/migrations/sqls/20210218195106-capture-down.sql:capture",
        "table:database/migrations/sqls/20210219042951-domain-event-up.sql:domain_event",
        "table:database/migrations/sqls/20210219042951-domain-event-down.sql:domain_event",
        "table:database/migrations/sqls/20210219043110-tree-up.sql:tree",
        "table:database/migrations/sqls/20210219043110-tree-down.sql:tree",
        "table:database/migrations/sqls/20210503011318-rename-to-location-up.sql:estimated_geometric_location",
        "table:database/migrations/sqls/20210503011318-rename-to-location-down.sql:estimated_geometric_location",
        "table:database/migrations/sqls/20211217023643-grower-account-up.sql:grower_account",
        "table:database/migrations/sqls/20211217023643-grower-account-down.sql:grower_account",
        "table:database/migrations/sqls/20211219082806-tag-up.sql:tag",
        "table:database/migrations/sqls/20211219082806-tag-down.sql:tag",
        "table:database/migrations/sqls/20211219142620-capture-tag-up.sql:capture_tag",
        "table:database/migrations/sqls/20211219142620-capture-tag-down.sql:capture_tag",
        "table:database/migrations/sqls/20211219143359-tree-tag-up.sql:tree_tag",
        "table:database/migrations/sqls/20211219143359-tree-tag-down.sql:tree_tag",
        "table:database/migrations/sqls/20211219205211-rename-capture-location-up.sql:capture_est_gmtric_loc_idx_gist",
        "table:database/migrations/sqls/20211219205211-rename-capture-location-down.sql:capture_est_gmtric_loc_idx_gist",
        "table:database/migrations/sqls/20211219205822-rename-tree-location-down.sql:tree",
        "table:database/migrations/sqls/20211219205822-rename-tree-location-up.sql:tree",
        "table:database/migrations/sqls/20211219211516-capture-device-update-down.sql:capture",
        "table:database/migrations/sqls/20211219211516-capture-device-update-up.sql:capture",
        "table:database/migrations/sqls/20211219211814-capture-session-id-down.sql:capture",
        "table:database/migrations/sqls/20211219211814-capture-session-id-up.sql:capture",
        "table:database/migrations/sqls/20211219212027-update-tree-status-down.sql:tree",
        "table:database/migrations/sqls/20211219212027-update-tree-status-up.sql:tree",
        "table:database/migrations/sqls/20211219213129-update-capture-status-down.sql:capture",
        "table:database/migrations/sqls/20211219213129-update-capture-status-up.sql:capture",
        "table:database/migrations/sqls/20211219213548-tree-attributes-down.sql:tree",
        "table:database/migrations/sqls/20211219213548-tree-attributes-up.sql:tree",
        "table:database/migrations/sqls/20211219233755-planter-to-grower-down.sql:capture",
        "table:database/migrations/sqls/20211219233755-planter-to-grower-up.sql:capture",
        "table:database/migrations/sqls/20211220234459-capture-species-uuid-down.sql:capture",
        "table:database/migrations/sqls/20211220234459-capture-species-uuid-up.sql:capture",
        "table:database/migrations/sqls/20211220234707-tree-species-uuid-down.sql:tree",
        "table:database/migrations/sqls/20211220234707-tree-species-uuid-up.sql:tree",
        "table:database/migrations/sqls/20211222232655-add-capture-tag-unique-down.sql:capture_tag",
        "table:database/migrations/sqls/20211222232655-add-capture-tag-unique-up.sql:capture_tag",
        "table:database/migrations/sqls/20211222232830-add-tree-tag-unique-up.sql:tree_tag",
        "table:database/migrations/sqls/20211222232830-add-tree-tag-unique-down.sql:tree_tag",
        "table:database/migrations/sqls/20211230232949-change-public-up.sql:tag",
        "table:database/migrations/sqls/20211230232949-change-public-down.sql:tag",
        "table:database/migrations/sqls/20220114035335-add-tag-name-unique-constraint-up.sql:tag",
        "table:database/migrations/sqls/20220114035335-add-tag-name-unique-constraint-down.sql:tag",
        "table:database/migrations/sqls/20220119035259-drop-wallet-not-null-up.sql:grower_account",
        "table:database/migrations/sqls/20220119035259-drop-wallet-not-null-down.sql:grower_account",
        "table:database/migrations/sqls/20220119035317-add-wallet-unique-up.sql:grower_account",
        "table:database/migrations/sqls/20220119035317-add-wallet-unique-down.sql:grower_account",
        "table:database/migrations/sqls/20220124203531-update-grower-account-name-up.sql:grower_account",
        "table:database/migrations/sqls/20220124203531-update-grower-account-name-down.sql:grower_account",
        "table:database/migrations/sqls/20220127232527-AddCreateAtDefaultCapture-up.sql:capture",
        "table:database/migrations/sqls/20220127232527-AddCreateAtDefaultCapture-down.sql:capture",
        "table:database/migrations/sqls/20220127232724-AddCapturedAtToCapture-up.sql:capture",
        "table:database/migrations/sqls/20220127232724-AddCapturedAtToCapture-down.sql:capture",
        "table:database/migrations/sqls/20220203193500-drop-grower-username-photo-url-up.sql:capture",
        "table:database/migrations/sqls/20220203193500-drop-grower-username-photo-url-down.sql:capture",
        "table:database/migrations/sqls/20220203200214-rename-grower-id-in-capture-up.sql:capture",
        "table:database/migrations/sqls/20220203200214-rename-grower-id-in-capture-down.sql:capture",
        "table:database/migrations/sqls/20220204225428-drop-wallet-id-grower-account-up.sql:grower_account",
        "table:database/migrations/sqls/20220204225428-drop-wallet-id-grower-account-down.sql:grower_account",
        "table:database/migrations/sqls/20220221084222-growerAccountLocation-up.sql:grower_account",
        "table:database/migrations/sqls/20220221084222-growerAccountLocation-down.sql:grower_account",
        "table:database/migrations/sqls/20220321204145-grower-account-organization-up.sql:grower_account_org",
        "table:database/migrations/sqls/20220321204145-grower-account-organization-down.sql:grower_account_org",
        "table:database/migrations/sqls/20220411074015-add-grower-account-bulk-pack-file-name-up.sql:grower_account",
        "table:database/migrations/sqls/20220411074015-add-grower-account-bulk-pack-file-name-down.sql:grower_account",
        "table:database/migrations/sqls/20220411233052-add-owner-id-to-tag-up.sql:tag",
        "table:database/migrations/sqls/20220411233052-add-owner-id-to-tag-down.sql:tag",
        "table:database/migrations/sqls/20220412072449-update-tag-unique-constraint-up.sql:tag",
        "table:database/migrations/sqls/20220412072449-update-tag-unique-constraint-down.sql:tag",
        "table:database/migrations/sqls/20220613072449-update-capture-referenceid-allow-null-up.sql:capture",
        "table:database/migrations/sqls/20220613072449-update-capture-referenceid-allow-null-down.sql:capture",
        "table:database/migrations/sqls/20220731213059-add-grower-account-about-up.sql:grower_account",
        "table:database/migrations/sqls/20220731213059-add-grower-account-about-down.sql:grower_account",
        "table:database/migrations/sqls/20220804213159-update-capture-reference-up.sql:capture",
        "table:database/migrations/sqls/20220804213159-update-capture-reference-down.sql:capture",
        "table:database/migrations/sqls/20220804214655-add-gender-column-up.sql:grower_account",
        "table:database/migrations/sqls/20220804214655-add-gender-column-down.sql:grower_account",
        "table:database/migrations/sqls/20220810061329-add-capture-tree-id-down.sql",
        "table:database/migrations/sqls/20220810061329-add-capture-tree-id-up.sql",
        "table:database/migrations/sqls/20220820032302-add-reference-id-unique-down.sql",
        "table:database/migrations/sqls/20220820032302-add-reference-id-unique-up.sql",
        "table:database/migrations/sqls/20221107062128-grower-account-reference-id-down.sql",
        "table:database/migrations/sqls/20221107062128-grower-account-reference-id-up.sql",
        "table:database/migrations/sqls/20221129085159-AddGeographyIndexOnTree-down.sql",
        "table:database/migrations/sqls/20221129085159-AddGeographyIndexOnTree-up.sql",
        "table:database/migrations/sqls/20221209065400-CapturePlantingOrgIdAllowNull-down.sql",
        "table:database/migrations/sqls/20221209065400-CapturePlantingOrgIdAllowNull-up.sql",
        "table:database/migrations/sqls/20221229015520-AddCapturedAtIndex-down.sql",
        "table:database/migrations/sqls/20221229015520-AddCapturedAtIndex-up.sql",
        "table:database/migrations/sqls/20230130192407-grower-account-table-down.sql",
        "table:database/migrations/sqls/20230130192407-grower-account-table-up.sql",
        "table:database/migrations/sqls/20230130192407-grower-account-table-up.sql:grower_account_image",
        "table:database/migrations/sqls/20230501001217-add-token-to-capture-down.sql",
        "table:database/migrations/sqls/20230501001217-add-token-to-capture-up.sql",
        "table:database/migrations/sqls/20230501001718-show-in-map-down.sql",
        "table:database/migrations/sqls/20230501001718-show-in-map-up.sql",
        "table:database/migrations/sqls/20230501015815-materialized-view-capture-match-down.sql",
        "table:database/migrations/sqls/20230501015815-materialized-view-capture-match-up.sql",
        "config:database/seeds/data/20220130-Captures.json",
        "config:database/seeds/data/20220130-Growers.json",
        "config:database/seeds/data/20220130-Trees.json",
        "config:database/seeds/data/20220210-Captures.json",
        "config:database/seeds/data/20220210-Trees.json",
        "config:database/database.json.example",
        "file:database/etl/create-grower-account-from-legacy.sql",
        "file:database/migrations/.gitkeep",
        "file:database/migrations/20210117023353-status-enum.js",
        "file:database/migrations/20210218195106-capture.js",
        "file:database/migrations/20210219042951-domain-event.js",
        "file:database/migrations/20210219043110-tree.js",
        "file:database/migrations/20210317210236-geography.js",
        "file:database/migrations/20210318003922-geography-capture.js",
        "file:database/migrations/20210503011318-rename-to-location.js",
        "file:database/migrations/20211217023643-grower-account.js",
        "file:database/migrations/20211219082806-tag.js",
        "file:database/migrations/20211219142620-capture-tag.js",
        "file:database/migrations/20211219143359-tree-tag.js",
        "file:database/migrations/20211219205211-rename-capture-location.js",
        "file:database/migrations/20211219205822-rename-tree-location.js",
        "file:database/migrations/20211219211516-capture-device-update.js",
        "file:database/migrations/20211219211814-capture-session-id.js",
        "file:database/migrations/20211219212027-update-tree-status.js",
        "file:database/migrations/20211219213129-update-capture-status.js",
        "file:database/migrations/20211219213548-tree-attributes.js",
        "file:database/migrations/20211219233755-planter-to-grower.js",
        "file:database/migrations/20211220234459-capture-species-uuid.js",
        "file:database/migrations/20211220234707-tree-species-uuid.js",
        "file:database/migrations/20211222232655-add-capture-tag-unique.js",
        "file:database/migrations/20211222232830-add-tree-tag-unique.js",
        "file:database/migrations/20211230232949-change-public.js",
        "file:database/migrations/20220114035335-add-tag-name-unique-constraint.js",
        "file:database/migrations/20220119035259-drop-wallet-not-null.js",
        "file:database/migrations/20220119035317-add-wallet-unique.js",
        "file:database/migrations/20220124203531-update-grower-account-name.js",
        "file:database/migrations/20220127232527-AddCreateAtDefaultCapture.js",
        "file:database/migrations/20220127232724-AddCapturedAtToCapture.js",
        "file:database/migrations/20220203193500-drop-grower-username-photo-url.js",
        "file:database/migrations/20220203200214-rename-grower-id-in-capture.js",
        "file:database/migrations/20220204225428-drop-wallet-id-grower-account.js",
        "file:database/migrations/20220221084222-growerAccountLocation.js",
        "file:database/migrations/20220321204145-grower-account-organization.js",
        "file:database/migrations/20220411074015-add-grower-account-bulk-pack-file-name.js",
        "file:database/migrations/20220411233052-add-owner-id-to-tag.js",
        "file:database/migrations/20220412072449-update-tag-unique-constraint.js",
        "file:database/migrations/20220613072449-update-capture-referenceid-allow-null.js",
        "file:database/migrations/20220731213059-add-grower-account-about.js",
        "file:database/migrations/20220804213159-update-capture-reference.js",
        "file:database/migrations/20220804214655-add-gender-column.js",
        "file:database/migrations/20220810061329-add-capture-tree-id.js",
        "file:database/migrations/20220820032302-add-reference-id-unique.js",
        "file:database/migrations/20221107062128-grower-account-reference-id.js",
        "file:database/migrations/20221129085159-AddGeographyIndexOnTree.js",
        "file:database/migrations/20221209065400-CapturePlantingOrgIdAllowNull.js",
        "file:database/migrations/20221229015520-AddCapturedAtIndex.js",
        "file:database/migrations/20230130192407-grower-account-table.js",
        "file:database/migrations/20230501001217-add-token-to-capture.js",
        "file:database/migrations/20230501001718-show-in-map.js",
        "file:database/migrations/20230501015815-materialized-view-capture-match.js",
        "file:database/seeds/00_job_database_cleaner.js",
        "file:database/seeds/02_table_captures.js",
        "file:database/seeds/03_table_trees.js",
        "file:database/seeds/data/mocks.js"
      ]
    },
    {
      "id": "layer:test",
      "name": "Testing",
      "description": "Mocha integration specs, mocks, and inline unit specs (app.spec.js, BaseRepository.spec.js) that validate handlers, services, and repositories.",
      "nodeIds": [
        "file:server/repositories/BaseRepository.spec.js",
        "file:__tests__/integration/grower_account/legacy-planter-creation.js",
        "file:__tests__/integration/capture/capture.spec.js",
        "file:__tests__/integration/grower_account/grower_account.spec.js",
        "file:__tests__/integration/tag/tag.spec.js",
        "file:__tests__/integration/tree/potential_matches.spec.js",
        "file:__tests__/integration/tree/tree.spec.js",
        "file:__tests__/utils.js",
        "file:__tests__/integration/events/events.spec.js",
        "file:__tests__/integration/events/rabbitmq-test-config.js",
        "config:__tests__/mock/attributes.json",
        "config:__tests__/mock/capture1.json",
        "config:__tests__/mock/capture2.json",
        "config:__tests__/mock/domain_event1.json",
        "config:__tests__/mock/domain_event2.json",
        "config:__tests__/mock/grower_account1.json",
        "config:__tests__/mock/grower_account2.json",
        "config:__tests__/mock/tag1.json",
        "config:__tests__/mock/tag2.json",
        "config:__tests__/mock/tree1.json",
        "config:__tests__/mock/tree2.json",
        "file:server/app.spec.js"
      ]
    },
    {
      "id": "layer:infrastructure",
      "name": "Infrastructure & CI/CD",
      "description": "Dockerfile, Kustomize deployment overlays (base/dev/prod/test) for Kubernetes, and GitHub Actions workflows for build, test, release, and deploy.",
      "nodeIds": [
        "service:Dockerfile",
        "config:.dockerignore",
        "pipeline:.github/workflows/test-tool-test-env.yml",
        "pipeline:.github/workflows/test-tool.yml",
        "pipeline:.github/workflows/treetracker-api-build-deploy-dev.yml",
        "pipeline:.github/workflows/treetracker-api-deploy-dev.yml",
        "pipeline:.github/workflows/treetracker-api-deploy-prod.yml",
        "pipeline:.github/workflows/treetracker-api-deploy-test.yml",
        "pipeline:.github/workflows/treetracker-api-pull-request-ci.yml",
        "step:.github/workflows/test-tool-test-env.yml:seed",
        "step:.github/workflows/test-tool.yml:seed",
        "step:.github/workflows/treetracker-api-build-deploy-dev.yml:test",
        "step:.github/workflows/treetracker-api-build-deploy-dev.yml:release",
        "step:.github/workflows/treetracker-api-deploy-dev.yml:deploy-dev",
        "step:.github/workflows/treetracker-api-deploy-prod.yml:deploy-prod",
        "step:.github/workflows/treetracker-api-deploy-test.yml:deploy-test",
        "step:.github/workflows/treetracker-api-pull-request-ci.yml:test",
        "config:deployment/base/cluster-role-binding.yaml",
        "config:deployment/base/cluster-role.yaml",
        "config:deployment/base/database-connection-sealed-secret.yaml",
        "config:deployment/base/database-migration-connection-sealed-secret.yaml",
        "config:deployment/base/database-migration-job.yaml",
        "config:deployment/base/deployment.yaml",
        "config:deployment/base/kustomization.yaml",
        "config:deployment/base/mapping.yaml",
        "config:deployment/base/namespace.yaml",
        "config:deployment/base/rabbitmq-connection-sealed-secret.yaml",
        "config:deployment/base/service.yaml",
        "config:deployment/overlays/development/database-connection-sealed-secret.yaml",
        "config:deployment/overlays/development/database-migration-connection-sealed-secret.yaml",
        "config:deployment/overlays/development/deployment.yaml",
        "config:deployment/overlays/development/kustomization.yaml",
        "config:deployment/overlays/development/mapping.yaml",
        "config:deployment/overlays/development/rabbitmq-connection-sealed-secret.yaml",
        "config:deployment/overlays/production/database-connection-sealed-secret.yaml",
        "config:deployment/overlays/production/database-migration-connection-sealed-secret.yaml",
        "config:deployment/overlays/production/kustomization.yaml",
        "config:deployment/overlays/production/rabbitmq-connection-sealed-secret.yaml",
        "config:deployment/overlays/test/database-connection-sealed-secret.yaml",
        "config:deployment/overlays/test/database-migration-connection-sealed-secret.yaml",
        "config:deployment/overlays/test/kustomization.yaml",
        "config:deployment/overlays/test/mapping.yaml",
        "config:deployment/overlays/test/rabbitmq-connection-sealed-secret.yaml"
      ]
    },
    {
      "id": "layer:project",
      "name": "Project Config & Documentation",
      "description": "Repository-level configuration (package.json, lint/prettier/husky/release configs, CODEOWNERS), documentation (README, CHANGELOG, ADRs, API spec), assets, and dev tooling scripts.",
      "nodeIds": [
        "config:.prettierrc.json",
        "document:CHANGELOG.md",
        "document:README.md",
        "config:package.json",
        "config:.eslintignore",
        "config:.huskyrc",
        "config:.npmrc",
        "config:.releaserc",
        "config:CODEOWNERS",
        "file:assets/greenstand.webp",
        "config:commitlint.config.js",
        "document:docs/api/spec/matcheing-tool-test-case.md",
        "config:docs/api/spec/treetracker.v1.yaml",
        "document:docs/decisions/0001-grower-accounts-having-multiple-organizations.md",
        "file:scripts/setup-dev-database-passwords.sh",
        "file:scripts/vars.sh",
        "file:tools/create-grower.sql",
        "file:tools/create-testing-data.sql"
      ]
    }
  ],
  "tour": [
    {
      "order": 1,
      "title": "Project Overview",
      "description": "Start with the README to learn what the TreeTracker API does and how it is built. It presents a Node.js/Express microservice over PostgreSQL, describes the layered MVC-like architecture, and documents the setup, migration, and seeding workflows. Use it as the roadmap for the rest of this tour.",
      "nodeIds": [
        "document:README.md",
        "config:package.json"
      ]
    },
    {
      "order": 2,
      "title": "Bootstrap and Express Wiring",
      "description": "server.js is the runtime entry point. It loads environment config, initializes logging, and starts the Express app on the configured port. app.js is the application factory that wires the middleware chain: content-type validation, Swagger UI, JSON body parsing, the main router, the error handler, and the domain event handlers registered on startup. Together they show how a request enters the system.",
      "nodeIds": [
        "file:server/server.js",
        "file:server/app.js"
      ]
    },
    {
      "order": 3,
      "title": "Routing and API Surface",
      "description": "Building on app.js, the routing layer maps URLs to handlers. routes/index.js is a barrel that aggregates every feature router into one array for mounting, and treeRoutes.js is a representative router that wires tree and tree-tag URLs to their handlers. swaggerDoc.js assembles the per-handler OpenAPI definitions into the single spec served at the docs endpoint, so the API contract stays close to the routes.",
      "nodeIds": [
        "file:server/routes/index.js",
        "file:server/routes/treeRoutes.js",
        "file:server/handlers/swaggerDoc.js"
      ]
    },
    {
      "order": 4,
      "title": "Request Handlers and Validation",
      "description": "Follow the tree request into its handler. treeHandler/index.js holds the Express handlers for tree CRUD, potential-match lookup, and tree-tag endpoints. schemas.js defines the Joi validation schemas that guard query parameters and request bodies before any business logic runs, and docs.js supplies the Swagger path definitions surfaced in Step 3. This is where HTTP concerns end and the domain begins.",
      "nodeIds": [
        "file:server/handlers/treeHandler/index.js",
        "file:server/handlers/treeHandler/schemas.js",
        "file:server/handlers/treeHandler/docs.js"
      ],
      "languageLesson": "Joi schemas describe expected shapes declaratively. Validating at the handler boundary keeps invalid input out of the service and model layers, so downstream code can trust its arguments."
    },
    {
      "order": 5,
      "title": "The Service Layer",
      "description": "Handlers delegate to services. TreeService.js coordinates tree CRUD, potential-match queries, and queue integration over a single database session, keeping transaction boundaries and cross-cutting orchestration out of the handlers. HttpError.js is the custom error type that services and handlers throw; it carries a status code and a rollback flag that the error middleware from Step 2 uses to unwind transactions.",
      "nodeIds": [
        "file:server/services/TreeService.js",
        "file:server/utils/HttpError.js"
      ]
    },
    {
      "order": 6,
      "title": "Domain Models and Repositories",
      "description": "Beneath the service sit the model and repository layers. models/tree.js holds the domain logic for querying, creating, updating, and matching trees, delegating persistence to TreeRepository.js. That repository extends BaseRepository.js, the generic Knex-backed base class that gives every entity getById, filtered queries, counting, create, and update primitives. This inheritance is the backbone of the data-access layer.",
      "nodeIds": [
        "file:server/models/tree.js",
        "file:server/repositories/TreeRepository.js",
        "file:server/repositories/BaseRepository.js"
      ],
      "languageLesson": "The repository pattern isolates SQL details behind a stable interface. A shared BaseRepository centralizes common query logic, so concrete repositories only add entity-specific queries such as the tree potential-match lookup."
    },
    {
      "order": 7,
      "title": "Database Connection and Transactions",
      "description": "Repositories run their queries through the infra layer. knex.js configures and exports the shared Knex/Postgres connection used across the service. Session.js wraps that connection to manage the transaction lifecycle (begin, commit, rollback) that the service layer in Step 5 relies on, tying the rollback flag from HttpError back to real database behavior.",
      "nodeIds": [
        "file:server/infra/database/knex.js",
        "file:server/infra/database/Session.js"
      ]
    },
    {
      "order": 8,
      "title": "Database Schema and Seed Data",
      "description": "The queries above operate on a schema defined by SQL migrations. The tree migration creates the core tree table with a reference to its latest capture, GPS location, species, status, and geospatial indexes; this is the physical shape behind the tree model from Step 6. The seed fixture supplies sample tree records so a fresh database is immediately usable for development and tests.",
      "nodeIds": [
        "table:database/migrations/sqls/20210219043110-tree-up.sql:tree",
        "config:database/seeds/data/20220130-Trees.json"
      ],
      "languageLesson": "Migrations evolve the schema in ordered, reversible steps (each has an up and a down file). Seed data is separate from migrations: migrations define structure, seeds populate content for local runs and tests."
    },
    {
      "order": 9,
      "title": "Asynchronous Messaging",
      "description": "Beyond the request cycle, the service communicates through events. QueueService.js owns the RabbitMQ lifecycle and publishes and subscribes to domain events such as capture-created and tree-created, updating DomainEvent status on publish. RabbitMQ.js wraps the rascal Broker with publish, subscribe, and teardown primitives, EventHandlerService.js dispatches queued messages to their handlers, and DomainEvent.js persists the event records.",
      "nodeIds": [
        "file:server/services/QueueService.js",
        "file:server/infra/RabbitMQ/RabbitMQ.js",
        "file:server/services/EventHandlerService.js",
        "file:server/models/DomainEvent.js"
      ],
      "languageLesson": "Persisting a domain event and its status alongside the business write is the outbox idea: the record proves an event should be published, so a failed broker call can be retried without losing the event."
    },
    {
      "order": 10,
      "title": "Image Upload to S3",
      "description": "Grower and capture images live in object storage rather than the database. s3.js instantiates the shared AWS S3 client from environment credentials, and S3Service.js exposes a thin uploadImage helper over it. GrowerAccountImageService.js shows the pattern in action: it uploads the file to S3 and persists the record inside one transaction, rolling back and cleaning up the temp file if either step fails.",
      "nodeIds": [
        "file:server/services/S3Service.js",
        "file:server/infra/S3/s3.js",
        "file:server/services/GrowerAccountImageService.js"
      ]
    },
    {
      "order": 11,
      "title": "Testing Approach",
      "description": "The project is verified with end-to-end integration tests. tree.spec.js seeds trees, captures, tags, and domain events, then exercises the tree endpoints to assert real API behavior across every layer covered so far. __tests__/utils.js is the shared helper that inserts and deletes trees and captures over Knex and converts POINT strings into PostGIS geometry for the geospatial columns from Step 8.",
      "nodeIds": [
        "file:__tests__/integration/tree/tree.spec.js",
        "file:__tests__/utils.js"
      ]
    },
    {
      "order": 12,
      "title": "Containerization, CI, and Deployment",
      "description": "Finally, see how the service ships. The Dockerfile builds the API on node:16-alpine and runs it with 'node .'. The pull-request CI workflow installs dependencies and runs ESLint, migrations, and the test suite against Postgres and RabbitMQ service containers. The Kubernetes deployment runs two replicas wired to database and RabbitMQ sealed secrets, and the kustomization base aggregates the deployment, service, RBAC, migration job, and secret manifests into one deployable set.",
      "nodeIds": [
        "service:Dockerfile",
        "pipeline:.github/workflows/treetracker-api-pull-request-ci.yml",
        "config:deployment/base/deployment.yaml",
        "config:deployment/base/kustomization.yaml"
      ],
      "languageLesson": "Kustomize composes Kubernetes manifests from a shared base plus per-environment overlays, avoiding copy-pasted YAML. Running migrations as a separate Job keeps schema changes decoupled from the long-running app pods."
    }
  ]
}