{
  "version": "1.0.0",
  "project": {
    "name": "treetracker-query-api",
    "languages": [
      "dockerfile",
      "javascript",
      "json",
      "markdown",
      "shell",
      "typescript",
      "yaml"
    ],
    "frameworks": [
      "Express",
      "Jest",
      "Mocha",
      "Docker",
      "GitHub Actions"
    ],
    "description": "RESTful API that exposes Greenstand treetracker data (captures, planters, organizations, trees and more) for clients such as the web map app. It follows a Domain Driven Design layered architecture with Express protocol routers, a business model layer, and a knex/pg repository layer.",
    "analyzedAt": "2026-09-03T05:22:29.591Z",
    "gitCommitHash": "42897d62c4a9e5fa4a49e99720ed28f3a254bb97"
  },
  "nodes": [
    {
      "id": "file:__tests__/e2e/bounds.spec.ts",
      "type": "file",
      "name": "bounds.spec.ts",
      "filePath": "__tests__/e2e/bounds.spec.ts",
      "summary": "End-to-end tests for the /bounds endpoint, asserting bounding-box responses via supertest against the Express app.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:__tests__/e2e/captures.spec.ts",
      "type": "file",
      "name": "captures.spec.ts",
      "filePath": "__tests__/e2e/captures.spec.ts",
      "summary": "End-to-end tests exercising the /v2/captures endpoint through the Express app.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:__tests__/e2e/countries.spec.ts",
      "type": "file",
      "name": "countries.spec.ts",
      "filePath": "__tests__/e2e/countries.spec.ts",
      "summary": "End-to-end tests for the /countries endpoint using seeded fixture data and supertest assertions.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/e2e/organizations.spec.ts",
      "type": "file",
      "name": "organizations.spec.ts",
      "filePath": "__tests__/e2e/organizations.spec.ts",
      "summary": "End-to-end tests validating the /organizations endpoint responses.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:__tests__/e2e/planters.spec.ts",
      "type": "file",
      "name": "planters.spec.ts",
      "filePath": "__tests__/e2e/planters.spec.ts",
      "summary": "End-to-end tests validating the /planters endpoint responses and query filters.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/e2e/species.spec.ts",
      "type": "file",
      "name": "species.spec.ts",
      "filePath": "__tests__/e2e/species.spec.ts",
      "summary": "End-to-end tests for the /species endpoint covering listing and filtering behavior.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/e2e/tokens.spec.ts",
      "type": "file",
      "name": "tokens.spec.ts",
      "filePath": "__tests__/e2e/tokens.spec.ts",
      "summary": "End-to-end tests for the /tokens endpoint, covering listing, filtering, and pagination.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/e2e/transactions.spec.ts",
      "type": "file",
      "name": "transactions.spec.ts",
      "filePath": "__tests__/e2e/transactions.spec.ts",
      "summary": "End-to-end tests for the /transactions endpoint covering transaction queries.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/e2e/trees.spec.ts",
      "type": "file",
      "name": "trees.spec.ts",
      "filePath": "__tests__/e2e/trees.spec.ts",
      "summary": "Comprehensive end-to-end tests for the /trees endpoint covering filters, counts, and featured trees.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/e2e/wallets.spec.ts",
      "type": "file",
      "name": "wallets.spec.ts",
      "filePath": "__tests__/e2e/wallets.spec.ts",
      "summary": "End-to-end tests validating the /wallets endpoint responses.",
      "tags": [
        "test",
        "e2e",
        "api-handler"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:__tests__/seed.js",
      "type": "file",
      "name": "seed.js",
      "filePath": "__tests__/seed.js",
      "summary": "Test fixture helper that seeds and clears database rows for e2e test setup and teardown.",
      "tags": [
        "test",
        "fixture",
        "database",
        "tested"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:__tests__/supertest.js",
      "type": "file",
      "name": "supertest.js",
      "filePath": "__tests__/supertest.js",
      "summary": "Shared supertest harness wiring the Express app with seed helpers for e2e test suites.",
      "tags": [
        "test",
        "fixture",
        "utility"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/app.ts",
      "type": "file",
      "name": "app.ts",
      "filePath": "server/app.ts",
      "summary": "Express application entry point that registers global middleware, mounts all versioned resource routers, and sets the global error handler.",
      "tags": [
        "entry-point",
        "middleware",
        "api-handler",
        "tested"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/TreeRepository.ts",
      "type": "file",
      "name": "TreeRepository.ts",
      "filePath": "server/infra/database/TreeRepository.ts",
      "summary": "Knex/pg repository implementing tree queries by id, UUID, organization, date range, tag, wallet, and geometry with pagination support.",
      "tags": [
        "service",
        "data-model",
        "database"
      ],
      "complexity": "complex",
      "languageNotes": "Extends a BaseRepository and uses knex query builder with PostGIS geometry filtering."
    },
    {
      "id": "file:server/models/Bounds.ts",
      "type": "file",
      "name": "Bounds.ts",
      "filePath": "server/models/Bounds.ts",
      "summary": "Business model computing map bounding boxes by filter, delegating to the bounds repository.",
      "tags": [
        "data-model",
        "service"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Capture.ts",
      "type": "file",
      "name": "Capture.ts",
      "filePath": "server/models/Capture.ts",
      "summary": "Business model exposing capture query and count operations delegating to the capture repository.",
      "tags": [
        "data-model",
        "service"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Contract.ts",
      "type": "file",
      "name": "Contract.ts",
      "filePath": "server/models/Contract.ts",
      "summary": "Business model exposing contract query and count operations delegating to the contract repository.",
      "tags": [
        "data-model",
        "service"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/RawCapture.ts",
      "type": "file",
      "name": "RawCapture.ts",
      "filePath": "server/models/RawCapture.ts",
      "summary": "Business model exposing raw-capture query and count operations delegating to the raw-capture repository.",
      "tags": [
        "data-model",
        "service"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Tree.ts",
      "type": "file",
      "name": "Tree.ts",
      "filePath": "server/models/Tree.ts",
      "summary": "Business model orchestrating tree queries and counts across organization, date, tag, wallet, and geometry filters via the tree repository.",
      "tags": [
        "data-model",
        "service",
        "factory"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routers/boundsRouter.ts",
      "type": "file",
      "name": "boundsRouter.ts",
      "filePath": "server/routers/boundsRouter.ts",
      "summary": "Express router exposing GET /bounds, validating query params with Joi and delegating to the Bounds model.",
      "tags": [
        "api-handler",
        "validation",
        "middleware"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/capturesRouter.ts",
      "type": "file",
      "name": "capturesRouter.ts",
      "filePath": "server/routers/capturesRouter.ts",
      "summary": "Express router exposing capture endpoints with Joi validation and delegation to the Capture model.",
      "tags": [
        "api-handler",
        "validation",
        "middleware"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routers/contractsRouter.ts",
      "type": "file",
      "name": "contractsRouter.ts",
      "filePath": "server/routers/contractsRouter.ts",
      "summary": "Express router exposing contract endpoints with Joi validation and delegation to the Contract model.",
      "tags": [
        "api-handler",
        "validation",
        "middleware"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routers/gisRouter.ts",
      "type": "file",
      "name": "gisRouter.ts",
      "filePath": "server/routers/gisRouter.ts",
      "summary": "Express router exposing GIS endpoints combining Bounds and Gis models for spatial queries.",
      "tags": [
        "api-handler",
        "middleware"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/rawCapturesRouter.ts",
      "type": "file",
      "name": "rawCapturesRouter.ts",
      "filePath": "server/routers/rawCapturesRouter.ts",
      "summary": "Express router exposing raw-capture endpoints with Joi validation and delegation to the RawCapture model.",
      "tags": [
        "api-handler",
        "validation",
        "middleware"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routers/transactionsRouter.ts",
      "type": "file",
      "name": "transactionsRouter.ts",
      "filePath": "server/routers/transactionsRouter.ts",
      "summary": "Express router exposing transaction endpoints, querying via a database Session.",
      "tags": [
        "api-handler",
        "middleware"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/treesRouter.ts",
      "type": "file",
      "name": "treesRouter.ts",
      "filePath": "server/routers/treesRouter.ts",
      "summary": "Express router exposing tree endpoints for filtered queries, counts, and featured trees, wiring the Tree model and repository.",
      "tags": [
        "api-handler",
        "validation",
        "middleware"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routers/utils.ts",
      "type": "file",
      "name": "utils.ts",
      "filePath": "server/routers/utils.ts",
      "summary": "Shared router utilities: async handler wrapper, global error handler mapping errors to HTTP responses, and a query formatter.",
      "tags": [
        "utility",
        "middleware",
        "validation"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/utils/HttpError.ts",
      "type": "file",
      "name": "HttpError.ts",
      "filePath": "server/utils/HttpError.ts",
      "summary": "Custom HttpError class carrying an HTTP status code and rollback flag for structured error handling.",
      "tags": [
        "utility",
        "error-handling",
        "serialization"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/infra/database/TreeRepository.ts:TreeRepository",
      "type": "class",
      "name": "TreeRepository",
      "filePath": "server/infra/database/TreeRepository.ts",
      "lineRange": [
        13,
        357
      ],
      "summary": "Repository class encapsulating all knex/pg queries for trees, including id/UUID lookups, organization, date-range, tag, wallet, and geometry filters with counts.",
      "tags": [
        "data-model",
        "database",
        "service"
      ],
      "complexity": "complex"
    },
    {
      "id": "function:server/models/Bounds.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/Bounds.ts",
      "lineRange": [
        11,
        38
      ],
      "summary": "Returns a filter function that computes map bounding boxes from the bounds repository.",
      "tags": [
        "data-model",
        "factory"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/models/Tree.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/Tree.ts",
      "lineRange": [
        20,
        62
      ],
      "summary": "Higher-order function returning a tree query resolver that dispatches to the correct repository method based on the active filter.",
      "tags": [
        "data-model",
        "factory",
        "validation"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:server/models/Tree.ts:countByFilter",
      "type": "function",
      "name": "countByFilter",
      "filePath": "server/models/Tree.ts",
      "lineRange": [
        64,
        113
      ],
      "summary": "Higher-order function returning a tree count resolver that dispatches to the correct repository count method per filter.",
      "tags": [
        "data-model",
        "factory"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:server/models/Tree.ts:getFeaturedTreeDepricated",
      "type": "function",
      "name": "getFeaturedTreeDepricated",
      "filePath": "server/models/Tree.ts",
      "lineRange": [
        119,
        137
      ],
      "summary": "Deprecated helper returning a hardcoded set of featured trees fetched by id from the repository.",
      "tags": [
        "data-model",
        "deprecated"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/routers/utils.ts:handlerWrapper",
      "type": "function",
      "name": "handlerWrapper",
      "filePath": "server/routers/utils.ts",
      "lineRange": [
        23,
        30
      ],
      "summary": "Wraps an async Express handler so thrown errors are caught and forwarded to the next middleware.",
      "tags": [
        "middleware",
        "utility",
        "error-handling"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/routers/utils.ts:errorHandler",
      "type": "function",
      "name": "errorHandler",
      "filePath": "server/routers/utils.ts",
      "lineRange": [
        32,
        54
      ],
      "summary": "Global Express error handler mapping HttpError, Joi ValidationError, and unknown errors to appropriate HTTP status responses.",
      "tags": [
        "middleware",
        "error-handling",
        "api-handler"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/routers/utils.ts:queryFormatter",
      "type": "function",
      "name": "queryFormatter",
      "filePath": "server/routers/utils.ts",
      "lineRange": [
        56,
        80
      ],
      "summary": "Parses and normalizes request query parameters, JSON-decoding where/in clauses and coercing numeric filters.",
      "tags": [
        "utility",
        "validation",
        "serialization"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/utils/HttpError.ts:HttpError",
      "type": "class",
      "name": "HttpError",
      "filePath": "server/utils/HttpError.ts",
      "lineRange": [
        8,
        25
      ],
      "summary": "Error subclass carrying an HTTP status code and shouldRollback flag for structured API error responses.",
      "tags": [
        "utility",
        "error-handling"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/database/BaseRepository.spec.ts",
      "type": "file",
      "name": "BaseRepository.spec.ts",
      "filePath": "server/infra/database/BaseRepository.spec.ts",
      "summary": "Unit test suite for BaseRepository covering getById, filtering, counting, update and create against a mocked knex session.",
      "tags": [
        "test",
        "repository",
        "database",
        "unit-test"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/infra/database/BaseRepository.ts",
      "type": "file",
      "name": "BaseRepository.ts",
      "filePath": "server/infra/database/BaseRepository.ts",
      "summary": "Generic base repository providing shared knex-backed CRUD operations (getById, getByFilter, count, update, create) reused by all concrete repositories.",
      "tags": [
        "repository",
        "database",
        "data-access",
        "base-class",
        "tested"
      ],
      "complexity": "moderate",
      "languageNotes": "Generic base class parameterized over the entity type; subclassed by every concrete repository."
    },
    {
      "id": "file:server/infra/database/BoundsRepository.ts",
      "type": "file",
      "name": "BoundsRepository.ts",
      "filePath": "server/infra/database/BoundsRepository.ts",
      "summary": "Repository computing geographic bounds for planters, wallets and organisations from tree capture coordinates.",
      "tags": [
        "repository",
        "database",
        "geospatial",
        "data-access"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/CaptureRepository.ts",
      "type": "file",
      "name": "CaptureRepository.ts",
      "filePath": "server/infra/database/CaptureRepository.ts",
      "summary": "Repository querying tree captures with dynamic filter building, pagination and counting over the knex session.",
      "tags": [
        "repository",
        "database",
        "data-access",
        "query-builder"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/infra/database/ContractRepository.ts",
      "type": "file",
      "name": "ContractRepository.ts",
      "filePath": "server/infra/database/ContractRepository.ts",
      "summary": "Repository querying contract records with dynamic where-clause building, filtering and counting.",
      "tags": [
        "repository",
        "database",
        "data-access",
        "query-builder"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/CountryRepositoryV2.ts",
      "type": "file",
      "name": "CountryRepositoryV2.ts",
      "filePath": "server/infra/database/CountryRepositoryV2.ts",
      "summary": "V2 country repository providing lookup by id, filtered queries and a planting leaderboard aggregation.",
      "tags": [
        "repository",
        "database",
        "data-access",
        "aggregation"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/RawCaptureRepository.ts",
      "type": "file",
      "name": "RawCaptureRepository.ts",
      "filePath": "server/infra/database/RawCaptureRepository.ts",
      "summary": "Repository querying raw (unprocessed) tree captures with dynamic filter building, pagination and counting.",
      "tags": [
        "repository",
        "database",
        "data-access",
        "query-builder"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/infra/database/Session.ts",
      "type": "file",
      "name": "Session.ts",
      "filePath": "server/infra/database/Session.ts",
      "summary": "Database session wrapper around a knex connection managing transaction begin, commit and rollback state.",
      "tags": [
        "database",
        "session",
        "transaction",
        "data-access"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/database/SpeciesRepository.ts",
      "type": "file",
      "name": "SpeciesRepository.ts",
      "filePath": "server/infra/database/SpeciesRepository.ts",
      "summary": "Repository fetching tree species grouped by organization, planter or wallet with counting support.",
      "tags": [
        "repository",
        "database",
        "data-access",
        "species"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/StakeholderRepositoryV2.spec.ts",
      "type": "file",
      "name": "StakeholderRepositoryV2.spec.ts",
      "filePath": "server/infra/database/StakeholderRepositoryV2.spec.ts",
      "summary": "Minimal unit test for StakeholderRepositoryV2 getById behaviour against a mocked session.",
      "tags": [
        "test",
        "repository",
        "database",
        "unit-test"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/database/StakeholderRepositoryV2.ts",
      "type": "file",
      "name": "StakeholderRepositoryV2.ts",
      "filePath": "server/infra/database/StakeholderRepositoryV2.ts",
      "summary": "Thin V2 stakeholder repository extending BaseRepository with a getById lookup.",
      "tags": [
        "repository",
        "database",
        "data-access",
        "stakeholder",
        "tested"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/database/TokensRepository.ts",
      "type": "file",
      "name": "TokensRepository.ts",
      "filePath": "server/infra/database/TokensRepository.ts",
      "summary": "Repository querying issued tokens by id and filter with count support over the knex session.",
      "tags": [
        "repository",
        "database",
        "data-access",
        "tokens"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/TransactionRepository.ts",
      "type": "file",
      "name": "TransactionRepository.ts",
      "filePath": "server/infra/database/TransactionRepository.ts",
      "summary": "Repository querying transaction records via filtered lookups extending BaseRepository.",
      "tags": [
        "repository",
        "database",
        "data-access",
        "transaction"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/database/knex.ts",
      "type": "file",
      "name": "knex.ts",
      "filePath": "server/infra/database/knex.ts",
      "summary": "Knex/pg client factory configuring the PostgreSQL connection pool from environment settings.",
      "tags": [
        "database",
        "configuration",
        "knex",
        "connection"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Species.ts",
      "type": "file",
      "name": "Species.ts",
      "filePath": "server/models/Species.ts",
      "summary": "Species business-model module delegating filtered and count queries to the species repository.",
      "tags": [
        "data-model",
        "business-logic",
        "species",
        "delegation"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/models/StakeholderV2.ts",
      "type": "file",
      "name": "StakeholderV2.ts",
      "filePath": "server/models/StakeholderV2.ts",
      "summary": "Stakeholder V2 business-model module wiring the repository through the delegate helper.",
      "tags": [
        "data-model",
        "business-logic",
        "stakeholder",
        "delegation"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/speciesRouter.ts",
      "type": "file",
      "name": "speciesRouter.ts",
      "filePath": "server/routers/speciesRouter.ts",
      "summary": "Express router exposing species endpoints filtered by organization, planter and wallet.",
      "tags": [
        "api-handler",
        "router",
        "express",
        "species"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routers/stakeholderRouterV2.ts",
      "type": "file",
      "name": "stakeholderRouterV2.ts",
      "filePath": "server/routers/stakeholderRouterV2.ts",
      "summary": "Express V2 router exposing a stakeholder lookup endpoint.",
      "tags": [
        "api-handler",
        "router",
        "express",
        "stakeholder"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/tokensRouter.ts",
      "type": "file",
      "name": "tokensRouter.ts",
      "filePath": "server/routers/tokensRouter.ts",
      "summary": "Express router exposing token query endpoints with filtering and pagination.",
      "tags": [
        "api-handler",
        "router",
        "express",
        "tokens"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "class",
      "name": "BaseRepository",
      "filePath": "server/infra/database/BaseRepository.ts",
      "lineRange": [
        13,
        128
      ],
      "summary": "Generic base repository implementing shared CRUD (getById, getByFilter, countByFilter, update, create) over a knex session.",
      "tags": [
        "repository",
        "base-class",
        "data-access",
        "crud"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/BoundsRepository.ts:BoundsRepository",
      "type": "class",
      "name": "BoundsRepository",
      "filePath": "server/infra/database/BoundsRepository.ts",
      "lineRange": [
        5,
        85
      ],
      "summary": "Repository computing geographic bounds by planter, wallet or organisation and converting bound strings.",
      "tags": [
        "repository",
        "geospatial",
        "data-access"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/CaptureRepository.ts:CaptureRepository",
      "type": "class",
      "name": "CaptureRepository",
      "filePath": "server/infra/database/CaptureRepository.ts",
      "lineRange": [
        8,
        295
      ],
      "summary": "Capture repository with filterWhereBuilder, getByFilter, getCount and getById for tree capture queries.",
      "tags": [
        "repository",
        "query-builder",
        "data-access"
      ],
      "complexity": "complex"
    },
    {
      "id": "class:server/infra/database/ContractRepository.ts:ContractRepository",
      "type": "class",
      "name": "ContractRepository",
      "filePath": "server/infra/database/ContractRepository.ts",
      "lineRange": [
        8,
        193
      ],
      "summary": "Contract repository with dynamic where-clause building, filtered queries and counting.",
      "tags": [
        "repository",
        "query-builder",
        "data-access"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/CountryRepositoryV2.ts:CountryRepositoryV2",
      "type": "class",
      "name": "CountryRepositoryV2",
      "filePath": "server/infra/database/CountryRepositoryV2.ts",
      "lineRange": [
        8,
        84
      ],
      "summary": "V2 country repository with getById, getByFilter and getLeaderBoard aggregation.",
      "tags": [
        "repository",
        "aggregation",
        "data-access"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/RawCaptureRepository.ts:RawCaptureRepository",
      "type": "class",
      "name": "RawCaptureRepository",
      "filePath": "server/infra/database/RawCaptureRepository.ts",
      "lineRange": [
        8,
        299
      ],
      "summary": "Raw capture repository with filterWhereBuilder, getByFilter, getCount and getById.",
      "tags": [
        "repository",
        "query-builder",
        "data-access"
      ],
      "complexity": "complex"
    },
    {
      "id": "class:server/infra/database/Session.ts:Session",
      "type": "class",
      "name": "Session",
      "filePath": "server/infra/database/Session.ts",
      "lineRange": [
        4,
        44
      ],
      "summary": "Knex session wrapper managing the DB handle and transaction lifecycle (begin, commit, rollback).",
      "tags": [
        "session",
        "transaction",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/infra/database/SpeciesRepository.ts:SpeciesRepository",
      "type": "class",
      "name": "SpeciesRepository",
      "filePath": "server/infra/database/SpeciesRepository.ts",
      "lineRange": [
        6,
        120
      ],
      "summary": "Species repository fetching species by organization, planter or wallet with counting.",
      "tags": [
        "repository",
        "data-access",
        "species"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/StakeholderRepositoryV2.ts:StakeholderRepositoryV2",
      "type": "class",
      "name": "StakeholderRepositoryV2",
      "filePath": "server/infra/database/StakeholderRepositoryV2.ts",
      "lineRange": [
        6,
        24
      ],
      "summary": "Thin V2 stakeholder repository extending BaseRepository with getById.",
      "tags": [
        "repository",
        "data-access",
        "stakeholder"
      ],
      "complexity": "simple"
    },
    {
      "id": "class:server/infra/database/TokensRepository.ts:TokensRepository",
      "type": "class",
      "name": "TokensRepository",
      "filePath": "server/infra/database/TokensRepository.ts",
      "lineRange": [
        12,
        101
      ],
      "summary": "Tokens repository with getById, getByFilter and getCountByFilter queries.",
      "tags": [
        "repository",
        "data-access",
        "tokens"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/TransactionRepository.ts:TransactionRepository",
      "type": "class",
      "name": "TransactionRepository",
      "filePath": "server/infra/database/TransactionRepository.ts",
      "lineRange": [
        6,
        52
      ],
      "summary": "Transaction repository providing filtered lookups extending BaseRepository.",
      "tags": [
        "repository",
        "data-access",
        "transaction"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/models/Species.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/Species.ts",
      "lineRange": [
        13,
        46
      ],
      "summary": "Delegates a filtered species query to the species repository and returns the results.",
      "tags": [
        "business-logic",
        "delegation",
        "species"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/models/Species.ts:countByFilter",
      "type": "function",
      "name": "countByFilter",
      "filePath": "server/models/Species.ts",
      "lineRange": [
        48,
        62
      ],
      "summary": "Delegates a species count query to the species repository.",
      "tags": [
        "business-logic",
        "delegation",
        "species"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/DbModel.ts",
      "type": "file",
      "name": "DbModel.ts",
      "filePath": "server/interfaces/DbModel.ts",
      "summary": "Base TypeScript interface with an index signature that all domain model interfaces extend, allowing arbitrary dynamic keys from database rows.",
      "tags": [
        "type-definition",
        "data-model",
        "base-interface"
      ],
      "complexity": "simple",
      "languageNotes": "Uses a string index signature ([key: string]: any) to model loosely-typed knex/pg row objects."
    },
    {
      "id": "file:server/interfaces/Capture.ts",
      "type": "file",
      "name": "Capture.ts",
      "filePath": "server/interfaces/Capture.ts",
      "summary": "Type definition for a tree capture record, exposing id, geolocation, and creation timestamp fields.",
      "tags": [
        "type-definition",
        "data-model",
        "capture"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/CaptureFilter.ts",
      "type": "file",
      "name": "CaptureFilter.ts",
      "filePath": "server/interfaces/CaptureFilter.ts",
      "summary": "Query filter interface describing the optional criteria (organization, tree, species, wallet, dates, sort) used when listing captures.",
      "tags": [
        "type-definition",
        "filter",
        "query",
        "capture"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Contract.ts",
      "type": "file",
      "name": "Contract.ts",
      "filePath": "server/interfaces/Contract.ts",
      "summary": "Type definition for a contract record with agreement, worker, status, and lifecycle timestamp fields.",
      "tags": [
        "type-definition",
        "data-model",
        "contract"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/ContractFilter.ts",
      "type": "file",
      "name": "ContractFilter.ts",
      "filePath": "server/interfaces/ContractFilter.ts",
      "summary": "Query filter interface listing the optional criteria used when searching contract records.",
      "tags": [
        "type-definition",
        "filter",
        "query",
        "contract"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Country.ts",
      "type": "file",
      "name": "Country.ts",
      "filePath": "server/interfaces/Country.ts",
      "summary": "Type definition for a country record with name, code, and geolocation coordinates.",
      "tags": [
        "type-definition",
        "data-model",
        "country"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/GrowerAccount.ts",
      "type": "file",
      "name": "GrowerAccount.ts",
      "filePath": "server/interfaces/GrowerAccount.ts",
      "summary": "Type definition for a grower account with identity fields and HATEOAS links to featured trees, organizations, and species.",
      "tags": [
        "type-definition",
        "data-model",
        "grower"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Organization.ts",
      "type": "file",
      "name": "Organization.ts",
      "filePath": "server/interfaces/Organization.ts",
      "summary": "Type definition for an organization with identity fields and HATEOAS links to featured trees, associated planters, and species.",
      "tags": [
        "type-definition",
        "data-model",
        "organization"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Planter.ts",
      "type": "file",
      "name": "Planter.ts",
      "filePath": "server/interfaces/Planter.ts",
      "summary": "Type definition for a planter with identity fields and HATEOAS links to featured trees, organizations, and species.",
      "tags": [
        "type-definition",
        "data-model",
        "planter"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/RawCapture.ts",
      "type": "file",
      "name": "RawCapture.ts",
      "filePath": "server/interfaces/RawCapture.ts",
      "summary": "Type definition for a raw (unprocessed) capture record exposing id, geolocation, and creation timestamp fields.",
      "tags": [
        "type-definition",
        "data-model",
        "capture"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/RawCaptureFilter.ts",
      "type": "file",
      "name": "RawCaptureFilter.ts",
      "filePath": "server/interfaces/RawCaptureFilter.ts",
      "summary": "Query filter interface describing the optional criteria used when listing raw capture records.",
      "tags": [
        "type-definition",
        "filter",
        "query",
        "capture"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Species.ts",
      "type": "file",
      "name": "Species.ts",
      "filePath": "server/interfaces/Species.ts",
      "summary": "Type definition for a species record with id and name fields.",
      "tags": [
        "type-definition",
        "data-model",
        "species"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/SpeciesFilter.ts",
      "type": "file",
      "name": "SpeciesFilter.ts",
      "filePath": "server/interfaces/SpeciesFilter.ts",
      "summary": "Query filter interface listing optional criteria (keyword, morphology, range, pagination) used when searching species.",
      "tags": [
        "type-definition",
        "filter",
        "query",
        "species"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Stakeholder.ts",
      "type": "file",
      "name": "Stakeholder.ts",
      "filePath": "server/interfaces/Stakeholder.ts",
      "summary": "Type definition for a stakeholder record covering organization and individual contact details.",
      "tags": [
        "type-definition",
        "data-model",
        "stakeholder"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Tokens.ts",
      "type": "file",
      "name": "Tokens.ts",
      "filePath": "server/interfaces/Tokens.ts",
      "summary": "Type definition for a token record linking captures to wallets and tracking transfer and claim state.",
      "tags": [
        "type-definition",
        "data-model",
        "token"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Transaction.ts",
      "type": "file",
      "name": "Transaction.ts",
      "filePath": "server/interfaces/Transaction.ts",
      "summary": "Type definition for a token transaction recording source and destination wallets and processing metadata.",
      "tags": [
        "type-definition",
        "data-model",
        "transaction"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Tree.ts",
      "type": "file",
      "name": "Tree.ts",
      "filePath": "server/interfaces/Tree.ts",
      "summary": "Type definition for a tree record exposing id, geolocation, and creation timestamp fields.",
      "tags": [
        "type-definition",
        "data-model",
        "tree"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Wallets.ts",
      "type": "file",
      "name": "Wallets.ts",
      "filePath": "server/interfaces/Wallets.ts",
      "summary": "Type definition for a wallet record with credentials, logo, and creation timestamp fields.",
      "tags": [
        "type-definition",
        "data-model",
        "wallet"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/database/CountryRepository.ts",
      "type": "file",
      "name": "CountryRepository.ts",
      "filePath": "server/infra/database/CountryRepository.ts",
      "summary": "Knex/pg repository for the country table, exposing lookups by id and spatial filter plus a planting leaderboard query with GeoJSON centroid output.",
      "tags": [
        "repository",
        "data-model",
        "database",
        "geospatial"
      ],
      "complexity": "moderate",
      "languageNotes": "Uses knex raw SQL with PostGIS St_asgeojson for centroid serialization."
    },
    {
      "id": "class:server/infra/database/CountryRepository.ts:CountryRepository",
      "type": "class",
      "name": "CountryRepository",
      "filePath": "server/infra/database/CountryRepository.ts",
      "lineRange": [
        9,
        184
      ],
      "summary": "Repository class extending BaseRepository that runs country queries: getById, getByFilter and getLeaderBoard against the database session.",
      "tags": [
        "repository",
        "database",
        "geospatial"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/GisRepository.ts",
      "type": "file",
      "name": "GisRepository.ts",
      "filePath": "server/infra/database/GisRepository.ts",
      "summary": "GIS repository resolving the nearest feature to a lat/lon point using raw PostGIS spatial queries.",
      "tags": [
        "repository",
        "database",
        "geospatial"
      ],
      "complexity": "moderate",
      "languageNotes": "Parses numeric params and runs raw PostGIS distance queries, then JSON-parses the result."
    },
    {
      "id": "class:server/infra/database/GisRepository.ts:GisRepository",
      "type": "class",
      "name": "GisRepository",
      "filePath": "server/infra/database/GisRepository.ts",
      "lineRange": [
        5,
        96
      ],
      "summary": "Repository class with a getNearest method that validates coordinates and queries the nearest GIS feature via PostGIS.",
      "tags": [
        "repository",
        "database",
        "geospatial"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/delegateRepository.ts",
      "type": "file",
      "name": "delegateRepository.ts",
      "filePath": "server/infra/database/delegateRepository.ts",
      "summary": "Generic factory helper that returns a function delegating a named model method call to a repository instance.",
      "tags": [
        "utility",
        "factory",
        "repository"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/infra/database/delegateRepository.ts:delegateRepository",
      "type": "function",
      "name": "delegateRepository",
      "filePath": "server/infra/database/delegateRepository.ts",
      "lineRange": [
        5,
        14
      ],
      "summary": "Generic function that binds a repository and dispatches the given method name, used by model layers to delegate to repositories.",
      "tags": [
        "utility",
        "factory",
        "generics"
      ],
      "complexity": "simple",
      "languageNotes": "TypeScript generic helper parameterized over repository and result types."
    },
    {
      "id": "file:server/models/Countries.spec.ts",
      "type": "file",
      "name": "Countries.spec.ts",
      "filePath": "server/models/Countries.spec.ts",
      "summary": "Unit test suite verifying the Country model getCountries behavior against a mocked repository.",
      "tags": [
        "test",
        "data-model"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Country.ts",
      "type": "file",
      "name": "Country.ts",
      "filePath": "server/models/Country.ts",
      "summary": "Country business model exposing getCountries plus repository-delegated getById, getByFilter and getLeaderBoard operations.",
      "tags": [
        "data-model",
        "service",
        "barrel",
        "tested"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/CountryV2.ts",
      "type": "file",
      "name": "CountryV2.ts",
      "filePath": "server/models/CountryV2.ts",
      "summary": "Version 2 country business model that composes repository-delegated country operations for the v2 API surface.",
      "tags": [
        "data-model",
        "service",
        "versioning"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Gis.ts",
      "type": "file",
      "name": "Gis.ts",
      "filePath": "server/models/Gis.ts",
      "summary": "GIS business model that delegates nearest-feature lookups to the GIS repository.",
      "tags": [
        "data-model",
        "service",
        "geospatial"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Tokens.spec.ts",
      "type": "file",
      "name": "Tokens.spec.ts",
      "filePath": "server/models/Tokens.spec.ts",
      "summary": "Unit test suite verifying the Tokens model filter and count operations against a mocked repository.",
      "tags": [
        "test",
        "data-model"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Tokens.ts",
      "type": "file",
      "name": "Tokens.ts",
      "filePath": "server/models/Tokens.ts",
      "summary": "Tokens business model providing getByFilter and getCountByFilter operations that call the tokens repository.",
      "tags": [
        "data-model",
        "service",
        "tested"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/countriesRouter.ts",
      "type": "file",
      "name": "countriesRouter.ts",
      "filePath": "server/routers/countriesRouter.ts",
      "summary": "Express router exposing v1 and v2 country endpoints (leaderboard, by id, filtered list) with Joi validation and LRU caching.",
      "tags": [
        "api-handler",
        "middleware",
        "validation",
        "routing"
      ],
      "complexity": "moderate",
      "languageNotes": "Uses express-lru caching gated by CACHE_ENABLED env var and Joi.assert for request validation."
    },
    {
      "id": "file:server/infra/database/OrganizationRepository.ts",
      "type": "file",
      "name": "OrganizationRepository.ts",
      "filePath": "server/infra/database/OrganizationRepository.ts",
      "summary": "Knex/pg repository providing SQL access to organization records, including lookups by planter, id, map name, and featured organizations.",
      "tags": [
        "repository",
        "data-model",
        "database",
        "service"
      ],
      "complexity": "moderate",
      "languageNotes": "Extends a shared BaseRepository and uses raw knex queries against the organization view."
    },
    {
      "id": "file:server/infra/database/OrganizationRepositoryV2.ts",
      "type": "file",
      "name": "OrganizationRepositoryV2.ts",
      "filePath": "server/infra/database/OrganizationRepositoryV2.ts",
      "summary": "Version 2 organization repository adding grower-based lookups alongside the original planter, id, map name, and featured queries.",
      "tags": [
        "repository",
        "data-model",
        "database",
        "service",
        "versioned"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/PlanterRepository.ts",
      "type": "file",
      "name": "PlanterRepository.ts",
      "filePath": "server/infra/database/PlanterRepository.ts",
      "summary": "Knex/pg repository for planter records supporting id, organization, filter, and name lookups plus counts and featured planters.",
      "tags": [
        "repository",
        "data-model",
        "database",
        "service"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/patch.ts",
      "type": "file",
      "name": "patch.ts",
      "filePath": "server/infra/database/patch.ts",
      "summary": "Utility that patches domain objects with additional related data resolved through a database session.",
      "tags": [
        "utility",
        "database",
        "serialization"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/models/Organization.ts",
      "type": "file",
      "name": "Organization.ts",
      "filePath": "server/models/Organization.ts",
      "summary": "Business model layer for organizations, filtering records via the repository and building HATEOAS-style resource links.",
      "tags": [
        "data-model",
        "business-logic",
        "service"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/models/OrganizationV2.ts",
      "type": "file",
      "name": "OrganizationV2.ts",
      "filePath": "server/models/OrganizationV2.ts",
      "summary": "Version 2 organization business model applying repository filtering and generating organization resource links.",
      "tags": [
        "data-model",
        "business-logic",
        "service",
        "versioned"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/models/Planter.ts",
      "type": "file",
      "name": "Planter.ts",
      "filePath": "server/models/Planter.ts",
      "summary": "Business model layer for planters exposing filter, count, name lookup, featured, and link-building operations over the planter repository.",
      "tags": [
        "data-model",
        "business-logic",
        "service"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routers/organizationsRouter.ts",
      "type": "file",
      "name": "organizationsRouter.ts",
      "filePath": "server/routers/organizationsRouter.ts",
      "summary": "Express router exposing organization REST endpoints, wiring HTTP requests to the Organization model and repository.",
      "tags": [
        "api-handler",
        "router",
        "middleware",
        "entry-point"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routers/organizationsRouterV2.ts",
      "type": "file",
      "name": "organizationsRouterV2.ts",
      "filePath": "server/routers/organizationsRouterV2.ts",
      "summary": "Version 2 Express router for organization REST endpoints backed by the V2 model and repository.",
      "tags": [
        "api-handler",
        "router",
        "middleware",
        "versioned"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/routers/plantersRouter.ts",
      "type": "file",
      "name": "plantersRouter.ts",
      "filePath": "server/routers/plantersRouter.ts",
      "summary": "Express router exposing planter REST endpoints, connecting HTTP requests to the Planter model and repository.",
      "tags": [
        "api-handler",
        "router",
        "middleware",
        "entry-point"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/OrganizationRepository.ts:OrganizationRepository",
      "type": "class",
      "name": "OrganizationRepository",
      "filePath": "server/infra/database/OrganizationRepository.ts",
      "lineRange": [
        8,
        124
      ],
      "summary": "Repository class with query methods for retrieving organizations by planter, id, map name, ids, and featured selection.",
      "tags": [
        "repository",
        "database",
        "data-model"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/OrganizationRepositoryV2.ts:OrganizationRepositoryV2",
      "type": "class",
      "name": "OrganizationRepositoryV2",
      "filePath": "server/infra/database/OrganizationRepositoryV2.ts",
      "lineRange": [
        8,
        159
      ],
      "summary": "Version 2 repository class adding getByGrower alongside planter, id, ids, map name, and featured organization queries.",
      "tags": [
        "repository",
        "database",
        "data-model",
        "versioned"
      ],
      "complexity": "moderate"
    },
    {
      "id": "class:server/infra/database/PlanterRepository.ts:PlanterRepository",
      "type": "class",
      "name": "PlanterRepository",
      "filePath": "server/infra/database/PlanterRepository.ts",
      "lineRange": [
        11,
        186
      ],
      "summary": "Repository class providing planter queries by id, organization, filter, and name plus counts and featured planters.",
      "tags": [
        "repository",
        "database",
        "data-model"
      ],
      "complexity": "complex"
    },
    {
      "id": "function:server/infra/database/patch.ts:patch",
      "type": "function",
      "name": "patch",
      "filePath": "server/infra/database/patch.ts",
      "lineRange": [
        11,
        72
      ],
      "summary": "Enriches a domain object with related data resolved through the session based on the requested patch type.",
      "tags": [
        "utility",
        "database",
        "serialization"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:server/models/Organization.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/Organization.ts",
      "lineRange": [
        13,
        33
      ],
      "summary": "Returns organizations matching a filter by delegating to the organization repository and mapping results.",
      "tags": [
        "business-logic",
        "query",
        "data-model"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/models/OrganizationV2.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/OrganizationV2.ts",
      "lineRange": [
        14,
        42
      ],
      "summary": "Version 2 filter query returning organizations via the repository with updated field mapping.",
      "tags": [
        "business-logic",
        "query",
        "data-model",
        "versioned"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:server/models/Planter.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/Planter.ts",
      "lineRange": [
        9,
        24
      ],
      "summary": "Returns planters matching a filter by delegating to the planter repository.",
      "tags": [
        "business-logic",
        "query",
        "data-model"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/models/Planter.ts:countByFilter",
      "type": "function",
      "name": "countByFilter",
      "filePath": "server/models/Planter.ts",
      "lineRange": [
        26,
        40
      ],
      "summary": "Returns the count of planters matching a filter through the planter repository.",
      "tags": [
        "business-logic",
        "query",
        "data-model"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/database/WalletsRepository.spec.ts",
      "type": "file",
      "name": "WalletsRepository.spec.ts",
      "filePath": "server/infra/database/WalletsRepository.spec.ts",
      "summary": "Unit tests for WalletsRepository verifying SQL query construction and result handling against a mocked database Session.",
      "tags": [
        "test",
        "repository",
        "database",
        "wallets"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/WalletsRepository.ts",
      "type": "file",
      "name": "WalletsRepository.ts",
      "filePath": "server/infra/database/WalletsRepository.ts",
      "summary": "Knex/pg repository exposing wallet data access: lookup by id or name, token continent counts, filtered lists, featured wallets, and counts.",
      "tags": [
        "repository",
        "database",
        "wallets",
        "data-access",
        "knex",
        "tested"
      ],
      "complexity": "moderate",
      "languageNotes": "Extends a shared BaseRepository and issues raw SQL via the injected Session's knex instance."
    },
    {
      "id": "class:server/infra/database/WalletsRepository.ts:WalletsRepository",
      "type": "class",
      "name": "WalletsRepository",
      "filePath": "server/infra/database/WalletsRepository.ts",
      "lineRange": [
        9,
        158
      ],
      "summary": "Repository class wrapping wallet SQL queries, delegating connection handling to a Session and normalizing rows with patch.",
      "tags": [
        "repository",
        "database",
        "wallets",
        "data-access"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/models/Wallets.spec.ts",
      "type": "file",
      "name": "Wallets.spec.ts",
      "filePath": "server/models/Wallets.spec.ts",
      "summary": "Unit tests for the Wallets business model verifying delegation to the wallet repository.",
      "tags": [
        "test",
        "model",
        "wallets"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Wallets.ts",
      "type": "file",
      "name": "Wallets.ts",
      "filePath": "server/models/Wallets.ts",
      "summary": "Wallet business model that composes repository methods, choosing name-based or generic filtering and delegating simple lookups via delegateRepository.",
      "tags": [
        "model",
        "wallets",
        "business-logic",
        "factory",
        "tested"
      ],
      "complexity": "simple",
      "languageNotes": "Uses higher-order functions returning repository-bound async executors, a currying pattern shared across models."
    },
    {
      "id": "function:server/models/Wallets.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/Wallets.ts",
      "lineRange": [
        9,
        21
      ],
      "summary": "Returns a repository-bound executor that selects wallets by name when a name filter is present, otherwise applies the generic filter query.",
      "tags": [
        "model",
        "wallets",
        "filtering",
        "business-logic"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/walletsRouter.ts",
      "type": "file",
      "name": "walletsRouter.ts",
      "filePath": "server/routers/walletsRouter.ts",
      "summary": "Express router exposing wallet HTTP endpoints for featured wallets, token region counts, single wallet lookup, and paginated filtered lists.",
      "tags": [
        "api-handler",
        "router",
        "wallets",
        "express",
        "endpoint"
      ],
      "complexity": "moderate",
      "languageNotes": "Validates request params and query with Joi and wraps handlers in handlerWrapper for centralized error handling."
    },
    {
      "id": "file:server/infra/database/GrowerAccountRepository.ts",
      "type": "file",
      "name": "GrowerAccountRepository.ts",
      "filePath": "server/infra/database/GrowerAccountRepository.ts",
      "summary": "Knex/pg repository for grower accounts. Builds filtered SQL queries for counts, lookups by id/name/organization, selfies, featured growers, and wallet aggregations.",
      "tags": [
        "repository",
        "data-access",
        "database",
        "service",
        "query-builder"
      ],
      "complexity": "complex",
      "languageNotes": "Uses a shared filterWhereBuilder to translate GrowerAccountFilter into knex where clauses, including whereNulls/whereNotNulls/whereIns arrays."
    },
    {
      "id": "class:server/infra/database/GrowerAccountRepository.ts:GrowerAccountRepository",
      "type": "class",
      "name": "GrowerAccountRepository",
      "filePath": "server/infra/database/GrowerAccountRepository.ts",
      "lineRange": [
        8,
        405
      ],
      "summary": "Default-exported repository class extending BaseRepository. Exposes filtered read methods for grower accounts, selfies, featured lists, and wallet counts backed by a knex Session.",
      "tags": [
        "repository",
        "data-access",
        "database",
        "class"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/interfaces/GrowerAccountFilter.ts",
      "type": "file",
      "name": "GrowerAccountFilter.ts",
      "filePath": "server/interfaces/GrowerAccountFilter.ts",
      "summary": "Type definition describing the filter shape used to query grower accounts (ids, names, organization, wallet, capture-amount bounds, and generic where clauses).",
      "tags": [
        "type-definition",
        "interface",
        "filter",
        "data-model"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/GrowerAccount.ts",
      "type": "file",
      "name": "GrowerAccount.ts",
      "filePath": "server/models/GrowerAccount.ts",
      "summary": "Business model layer for grower accounts. Curries a repository into use-case functions (count, filter, name search, selfies, featured, wallets) and builds HATEOAS links.",
      "tags": [
        "data-model",
        "service",
        "business-logic",
        "factory"
      ],
      "complexity": "moderate",
      "languageNotes": "Each use case is a curried function taking a repository then filter args, delegating to delegateRepository for execution."
    },
    {
      "id": "function:server/models/GrowerAccount.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/GrowerAccount.ts",
      "lineRange": [
        17,
        27
      ],
      "summary": "Returns a curried function that fetches grower accounts matching a filter with limit/offset pagination via the repository.",
      "tags": [
        "business-logic",
        "query",
        "pagination"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/models/GrowerAccount.ts:getByName",
      "type": "function",
      "name": "getByName",
      "filePath": "server/models/GrowerAccount.ts",
      "lineRange": [
        39,
        50
      ],
      "summary": "Returns a curried function that searches grower accounts by keyword/name with pagination.",
      "tags": [
        "business-logic",
        "search",
        "query"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/models/GrowerAccount.ts:getFeaturedGrowers",
      "type": "function",
      "name": "getFeaturedGrowers",
      "filePath": "server/models/GrowerAccount.ts",
      "lineRange": [
        61,
        70
      ],
      "summary": "Returns a curried function that fetches a limited list of featured grower accounts from the repository.",
      "tags": [
        "business-logic",
        "query",
        "featured"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/models/GrowerAccount.ts:getWalletsByFilter",
      "type": "function",
      "name": "getWalletsByFilter",
      "filePath": "server/models/GrowerAccount.ts",
      "lineRange": [
        81,
        94
      ],
      "summary": "Returns a curried function that fetches wallet records for grower accounts matching a filter with pagination.",
      "tags": [
        "business-logic",
        "query",
        "wallet",
        "pagination"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/growerAccountsRouter.ts",
      "type": "file",
      "name": "growerAccountsRouter.ts",
      "filePath": "server/routers/growerAccountsRouter.ts",
      "summary": "Express router exposing grower-account endpoints (count, featured, wallets, selfies, by id, list). Validates query params with Joi and delegates to the GrowerAccount model.",
      "tags": [
        "api-handler",
        "router",
        "express",
        "validation",
        "entry-point"
      ],
      "complexity": "moderate",
      "languageNotes": "Handlers wrapped in handlerWrapper; Joi.assert validates query/params before instantiating a repository per request."
    },
    {
      "id": "file:server/infra/database/TreeRepositoryV2.spec.ts",
      "type": "file",
      "name": "TreeRepositoryV2.spec.ts",
      "filePath": "server/infra/database/TreeRepositoryV2.spec.ts",
      "summary": "Unit test spec for TreeRepositoryV2, exercising the repository against a database Session.",
      "tags": [
        "test",
        "repository",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/infra/database/TreeRepositoryV2.ts",
      "type": "file",
      "name": "TreeRepositoryV2.ts",
      "filePath": "server/infra/database/TreeRepositoryV2.ts",
      "summary": "Knex/pg repository providing V2 tree queries by id, organization, date range, tag, wallet and featured selection.",
      "tags": [
        "repository",
        "database",
        "data-model",
        "knex",
        "tested"
      ],
      "complexity": "complex",
      "languageNotes": "Uses raw SQL via knex .raw() alongside the query builder for count and filtered fetches."
    },
    {
      "id": "class:server/infra/database/TreeRepositoryV2.ts:TreeRepositoryV2",
      "type": "class",
      "name": "TreeRepositoryV2",
      "filePath": "server/infra/database/TreeRepositoryV2.ts",
      "lineRange": [
        7,
        221
      ],
      "summary": "Repository class extending BaseRepository that resolves V2 tree data through knex queries and raw SQL.",
      "tags": [
        "repository",
        "database",
        "data-access"
      ],
      "complexity": "complex"
    },
    {
      "id": "file:server/models/TreeV2.ts",
      "type": "file",
      "name": "TreeV2.ts",
      "filePath": "server/models/TreeV2.ts",
      "summary": "Business model layer for V2 trees, mapping filter options to the appropriate repository query and count operations.",
      "tags": [
        "data-model",
        "service",
        "business-logic"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:server/models/TreeV2.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/TreeV2.ts",
      "lineRange": [
        14,
        48
      ],
      "summary": "Higher-order function that dispatches a tree filter (organization, date range, tag, wallet) to the matching repository query.",
      "tags": [
        "business-logic",
        "filter",
        "dispatch"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:server/models/TreeV2.ts:countByFilter",
      "type": "function",
      "name": "countByFilter",
      "filePath": "server/models/TreeV2.ts",
      "lineRange": [
        50,
        90
      ],
      "summary": "Higher-order function that returns the total count for a given tree filter by delegating to the matching repository query.",
      "tags": [
        "business-logic",
        "filter",
        "count"
      ],
      "complexity": "moderate"
    },
    {
      "id": "function:server/models/TreeV2.ts:getFeaturedTreeDepricated",
      "type": "function",
      "name": "getFeaturedTreeDepricated",
      "filePath": "server/models/TreeV2.ts",
      "lineRange": [
        96,
        114
      ],
      "summary": "Deprecated helper that fetches featured trees one by one from the repository by id.",
      "tags": [
        "business-logic",
        "deprecated",
        "featured"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/treesRouterV2.ts",
      "type": "file",
      "name": "treesRouterV2.ts",
      "filePath": "server/routers/treesRouterV2.ts",
      "summary": "Express router exposing V2 tree endpoints for featured trees, single tree by id, and filtered/paginated listing with Joi validation.",
      "tags": [
        "api-handler",
        "router",
        "express",
        "validation"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/infra/database/SpeciesRepositoryV2.ts",
      "type": "file",
      "name": "SpeciesRepositoryV2.ts",
      "filePath": "server/infra/database/SpeciesRepositoryV2.ts",
      "summary": "Knex/pg repository for the species V2 entity that extends BaseRepository and builds dynamic WHERE clauses from filter criteria.",
      "tags": [
        "service",
        "data-model",
        "repository",
        "database",
        "query-builder"
      ],
      "complexity": "moderate",
      "languageNotes": "filterWhereBuilder composes knex where/whereIn/whereNull chains to translate a filter object into SQL predicates."
    },
    {
      "id": "class:server/infra/database/SpeciesRepositoryV2.ts:SpeciesRepositoryV2",
      "type": "class",
      "name": "SpeciesRepositoryV2",
      "filePath": "server/infra/database/SpeciesRepositoryV2.ts",
      "lineRange": [
        6,
        104
      ],
      "summary": "Repository class extending BaseRepository; overrides filterWhereBuilder to map species filter fields into knex query conditions.",
      "tags": [
        "repository",
        "database",
        "query-builder",
        "data-access"
      ],
      "complexity": "moderate"
    },
    {
      "id": "file:server/models/SpeciesV2.ts",
      "type": "file",
      "name": "SpeciesV2.ts",
      "filePath": "server/models/SpeciesV2.ts",
      "summary": "Business model layer for species V2 that delegates repository methods and exposes a getByFilter query function.",
      "tags": [
        "data-model",
        "service",
        "delegation",
        "business-logic"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/routers/speciesRouterV2.ts",
      "type": "file",
      "name": "speciesRouterV2.ts",
      "filePath": "server/routers/speciesRouterV2.ts",
      "summary": "Express router exposing species V2 GET endpoints (by id and filtered list) with Joi validation, wiring the repository and model together.",
      "tags": [
        "api-handler",
        "router",
        "endpoint",
        "validation",
        "express"
      ],
      "complexity": "moderate"
    },
    {
      "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 pre-built dist output via npm start.",
      "tags": [
        "containerization",
        "infrastructure",
        "deployment",
        "docker"
      ],
      "complexity": "simple",
      "languageNotes": "Copies package.json and package-lock.json before install to leverage Docker layer caching, then copies the compiled dist directory."
    },
    {
      "id": "config:.dockerignore",
      "type": "config",
      "name": ".dockerignore",
      "filePath": ".dockerignore",
      "summary": "Docker build context ignore file that excludes files from the image build; currently empty.",
      "tags": [
        "configuration",
        "infrastructure",
        "docker",
        "build-system"
      ],
      "complexity": "simple"
    },
    {
      "id": "pipeline:.github/workflows/deploy-prod-env.yml",
      "type": "pipeline",
      "name": "deploy-prod-env.yml",
      "filePath": ".github/workflows/deploy-prod-env.yml",
      "summary": "Manually dispatched GitHub Actions workflow that deploys a tagged release to the production Kubernetes cluster on DigitalOcean using kustomize overlays. Requires approval and pins the image to the npm package version.",
      "tags": [
        "ci-cd",
        "deployment",
        "infrastructure",
        "kubernetes",
        "production"
      ],
      "complexity": "simple",
      "languageNotes": "Uses workflow_dispatch with a required git-tag input and doctl/kustomize to apply the prod overlay."
    },
    {
      "id": "pipeline:.github/workflows/deploy-test-env.yml",
      "type": "pipeline",
      "name": "deploy-test-env.yml",
      "filePath": ".github/workflows/deploy-test-env.yml",
      "summary": "Manually dispatched GitHub Actions workflow that deploys a tagged release to the test Kubernetes cluster on DigitalOcean using the test kustomize overlay. Mirrors the prod workflow with test-scoped secrets.",
      "tags": [
        "ci-cd",
        "deployment",
        "infrastructure",
        "kubernetes",
        "testing"
      ],
      "complexity": "simple",
      "languageNotes": "Identical structure to the prod deploy workflow, targeting deployment/overlays/test and TEST_ secrets."
    },
    {
      "id": "pipeline:.github/workflows/pull-request-ci.yml",
      "type": "pipeline",
      "name": "pull-request-ci.yml",
      "filePath": ".github/workflows/pull-request-ci.yml",
      "summary": "Pull request CI workflow that runs a clean npm install, TypeScript build, ESLint, and the full test and repository test suites on Node.js 20.x against the main branch.",
      "tags": [
        "ci-cd",
        "testing",
        "build-system",
        "lint",
        "infrastructure"
      ],
      "complexity": "simple",
      "languageNotes": "Triggered on pull_request to main; injects DATABASE_URL from secrets for repository tests."
    },
    {
      "id": "pipeline:.github/workflows/treetracker-query-api-build-deploy-dev.yml",
      "type": "pipeline",
      "name": "treetracker-query-api-build-deploy-dev.yml",
      "filePath": ".github/workflows/treetracker-query-api-build-deploy-dev.yml",
      "summary": "Full CI/CD pipeline triggered on push to main that runs semantic-release, builds and pushes a Docker image to DockerHub, then deploys the new version to the dev Kubernetes cluster via kustomize.",
      "tags": [
        "ci-cd",
        "deployment",
        "containerization",
        "kubernetes",
        "infrastructure"
      ],
      "complexity": "moderate",
      "languageNotes": "Two-job pipeline (release then deploy) using semantic-release for versioning and docker/build-push-action for image publishing; deploy job consumes the bumped_version output."
    },
    {
      "id": "step:.github/workflows/deploy-prod-env.yml:deploy",
      "type": "pipeline",
      "name": "deploy",
      "filePath": ".github/workflows/deploy-prod-env.yml",
      "summary": "Production deploy job that checks out the tag, resolves the npm version, installs kustomize and doctl, and applies the prod overlay to the production cluster.",
      "tags": [
        "ci-cd",
        "deployment",
        "kubernetes",
        "production"
      ],
      "complexity": "simple"
    },
    {
      "id": "step:.github/workflows/deploy-test-env.yml:deploy",
      "type": "pipeline",
      "name": "deploy",
      "filePath": ".github/workflows/deploy-test-env.yml",
      "summary": "Test deploy job that checks out the tag, resolves the npm version, installs kustomize and doctl, and applies the test overlay to the test cluster.",
      "tags": [
        "ci-cd",
        "deployment",
        "kubernetes",
        "testing"
      ],
      "complexity": "simple"
    },
    {
      "id": "step:.github/workflows/pull-request-ci.yml:test",
      "type": "pipeline",
      "name": "test",
      "filePath": ".github/workflows/pull-request-ci.yml",
      "summary": "CI test job that installs dependencies, compiles TypeScript, runs ESLint, and executes the unit and repository test suites on Node.js 20.x.",
      "tags": [
        "ci-cd",
        "testing",
        "lint",
        "build-system"
      ],
      "complexity": "simple"
    },
    {
      "id": "step:.github/workflows/treetracker-query-api-build-deploy-dev.yml:release",
      "type": "pipeline",
      "name": "release",
      "filePath": ".github/workflows/treetracker-query-api-build-deploy-dev.yml",
      "summary": "Release job that runs semantic-release for versioning, builds the app, and builds and pushes the versioned Docker image to DockerHub, exporting the bumped version as an output.",
      "tags": [
        "ci-cd",
        "release",
        "containerization",
        "build-system"
      ],
      "complexity": "moderate"
    },
    {
      "id": "step:.github/workflows/treetracker-query-api-build-deploy-dev.yml:deploy",
      "type": "pipeline",
      "name": "deploy",
      "filePath": ".github/workflows/treetracker-query-api-build-deploy-dev.yml",
      "summary": "Dev deploy job that runs after release, installs kustomize and doctl, sets the image to the bumped version, and applies the development overlay to the dev cluster.",
      "tags": [
        "ci-cd",
        "deployment",
        "kubernetes",
        "development"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:.env.example",
      "type": "config",
      "name": ".env.example",
      "filePath": ".env.example",
      "summary": "Template listing the runtime environment variables the API needs: database connection URL, database schema, and log level.",
      "tags": [
        "configuration",
        "environment",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:.prettierrc.json",
      "type": "config",
      "name": ".prettierrc.json",
      "filePath": ".prettierrc.json",
      "summary": "Prettier code formatter configuration enforcing consistent style across the source tree.",
      "tags": [
        "configuration",
        "formatting",
        "build-system"
      ],
      "complexity": "simple"
    },
    {
      "id": "document:CHANGELOG.md",
      "type": "document",
      "name": "CHANGELOG.md",
      "filePath": "CHANGELOG.md",
      "summary": "Auto-generated release history following Conventional Commits, recording every version's features and fixes across 300+ entries.",
      "tags": [
        "documentation",
        "changelog",
        "release-notes"
      ],
      "complexity": "complex",
      "languageNotes": "Generated by semantic-release from Conventional Commits history."
    },
    {
      "id": "document:CONTRIBUTING.md",
      "type": "document",
      "name": "CONTRIBUTING.md",
      "filePath": "CONTRIBUTING.md",
      "summary": "Brief contributor guidance pointing developers to the project's contribution workflow.",
      "tags": [
        "documentation",
        "development",
        "contributing"
      ],
      "complexity": "simple"
    },
    {
      "id": "document:README.md",
      "type": "document",
      "name": "README.md",
      "filePath": "README.md",
      "summary": "Project overview and getting-started guide describing the RESTful treetracker query API, its development toolkit, and setup steps.",
      "tags": [
        "documentation",
        "entry-point",
        "overview"
      ],
      "complexity": "moderate"
    },
    {
      "id": "config:package.json",
      "type": "config",
      "name": "package.json",
      "filePath": "package.json",
      "summary": "npm manifest declaring the treetracker-query-api dependencies and build, lint, test, and start scripts; main entry is server/server.js.",
      "tags": [
        "configuration",
        "build-system",
        "npm",
        "dependencies"
      ],
      "complexity": "moderate"
    },
    {
      "id": "config:tsconfig.base.json",
      "type": "config",
      "name": "tsconfig.base.json",
      "filePath": "tsconfig.base.json",
      "summary": "Base TypeScript compiler configuration with shared strict-mode options, extended by the build and IDE tsconfig files.",
      "tags": [
        "configuration",
        "typescript",
        "build-system"
      ],
      "complexity": "moderate"
    },
    {
      "id": "config:tsconfig.build.json",
      "type": "config",
      "name": "tsconfig.build.json",
      "filePath": "tsconfig.build.json",
      "summary": "Production build TypeScript config extending the base, compiling server/server.ts while excluding test and spec files.",
      "tags": [
        "configuration",
        "typescript",
        "build-system"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:tsconfig.json",
      "type": "config",
      "name": "tsconfig.json",
      "filePath": "tsconfig.json",
      "summary": "IDE and test TypeScript config extending the base and including server, test, and typings source files for the language service.",
      "tags": [
        "configuration",
        "typescript",
        "build-system"
      ],
      "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": "Bitnami SealedSecret holding the encrypted database connection string (DATABASE_URL) consumed by the query-api deployment in the webmap namespace.",
      "tags": [
        "configuration",
        "security",
        "kubernetes",
        "secret",
        "database"
      ],
      "complexity": "simple",
      "languageNotes": "SealedSecret encrypts the db key so the manifest is safe to commit; the controller decrypts it into a native Secret at runtime."
    },
    {
      "id": "config:deployment/base/deployment.yaml",
      "type": "config",
      "name": "deployment.yaml",
      "filePath": "deployment/base/deployment.yaml",
      "summary": "Kubernetes Deployment for the treetracker-query-api container, pinning it to the DigitalOcean microservices node pool and injecting DATABASE_URL from the sealed secret.",
      "tags": [
        "configuration",
        "deployment",
        "kubernetes",
        "infrastructure",
        "orchestration"
      ],
      "complexity": "simple",
      "languageNotes": "Uses nodeAffinity to constrain scheduling to a specific DOKS node pool; image tag is templated as TAG for CI substitution."
    },
    {
      "id": "config:deployment/base/kustomization.yaml",
      "type": "config",
      "name": "kustomization.yaml",
      "filePath": "deployment/base/kustomization.yaml",
      "summary": "Kustomize base that aggregates the deployment, mapping, service, and sealed-secret manifests into a single deployable resource set.",
      "tags": [
        "configuration",
        "kubernetes",
        "kustomize",
        "build-system",
        "orchestration"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/base/mapping.yaml",
      "type": "config",
      "name": "mapping.yaml",
      "filePath": "deployment/base/mapping.yaml",
      "summary": "Ambassador Mapping that routes external /query/ traffic to the treetracker-query-api service, rewriting the path to root with no timeout.",
      "tags": [
        "configuration",
        "kubernetes",
        "routing",
        "api-gateway",
        "infrastructure"
      ],
      "complexity": "simple",
      "languageNotes": "getambassador.io/v2 Mapping acts as an ingress/API-gateway rule with prefix rewrite."
    },
    {
      "id": "config:deployment/base/namespace.yaml",
      "type": "config",
      "name": "namespace.yaml",
      "filePath": "deployment/base/namespace.yaml",
      "summary": "Declares the webmap Kubernetes namespace that hosts all treetracker-query-api resources.",
      "tags": [
        "configuration",
        "kubernetes",
        "namespace",
        "infrastructure"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/base/service.yaml",
      "type": "config",
      "name": "service.yaml",
      "filePath": "deployment/base/service.yaml",
      "summary": "Kubernetes Service exposing the treetracker-query-api pods on port 80 and forwarding to container targetPort 3006.",
      "tags": [
        "configuration",
        "kubernetes",
        "service",
        "networking",
        "infrastructure"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/prod/database-connection-sealed-secret.yaml",
      "type": "config",
      "name": "database-connection-sealed-secret.yaml",
      "filePath": "deployment/overlays/prod/database-connection-sealed-secret.yaml",
      "summary": "Bitnami SealedSecret holding the encrypted production database connection string for the query-api in the webmap namespace.",
      "tags": [
        "configuration",
        "kubernetes",
        "security",
        "database",
        "deployment"
      ],
      "complexity": "simple",
      "languageNotes": "SealedSecret encrypts secret data so it can be committed to git; the controller decrypts it into a native Secret in-cluster."
    },
    {
      "id": "config:deployment/overlays/prod/deployment.yaml",
      "type": "config",
      "name": "deployment.yaml",
      "filePath": "deployment/overlays/prod/deployment.yaml",
      "summary": "Production Kubernetes Deployment patch for treetracker-query-api, setting node affinity, the DATABASE_URL secret reference, and connection pool size.",
      "tags": [
        "configuration",
        "kubernetes",
        "deployment",
        "infrastructure",
        "database"
      ],
      "complexity": "simple",
      "languageNotes": "Strategic-merge patch overlay; node affinity pins pods to the DigitalOcean microservices node pool."
    },
    {
      "id": "config:deployment/overlays/prod/kustomization.yaml",
      "type": "config",
      "name": "kustomization.yaml",
      "filePath": "deployment/overlays/prod/kustomization.yaml",
      "summary": "Kustomize overlay for the prod environment that references the base and applies strategic-merge patches for the deployment and Ambassador mapping.",
      "tags": [
        "configuration",
        "kubernetes",
        "kustomize",
        "orchestration",
        "deployment"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/prod/treetracker-webmap-api-mapping.yaml",
      "type": "config",
      "name": "treetracker-webmap-api-mapping.yaml",
      "filePath": "deployment/overlays/prod/treetracker-webmap-api-mapping.yaml",
      "summary": "Ambassador Mapping that routes external traffic to the query-api service and defines the production CORS allow-list of Treetracker and Forestmatic origins.",
      "tags": [
        "configuration",
        "kubernetes",
        "routing",
        "api-gateway",
        "security"
      ],
      "complexity": "simple",
      "languageNotes": "getambassador.io/v2 Mapping configures edge routing and CORS at the API gateway layer."
    },
    {
      "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 for the test overlay holding the encrypted database connection string mounted as query-api-database-connection in the webmap namespace.",
      "tags": [
        "configuration",
        "kubernetes",
        "security",
        "database",
        "deployment"
      ],
      "complexity": "simple",
      "languageNotes": "SealedSecret encrypts secret data so it is safe to store in git; the controller decrypts it into a native Secret in-cluster."
    },
    {
      "id": "config:deployment/overlays/test/kustomization.yaml",
      "type": "config",
      "name": "kustomization.yaml",
      "filePath": "deployment/overlays/test/kustomization.yaml",
      "summary": "Kustomize overlay for the test environment that references the base manifests and applies the sealed-secret strategic merge patch.",
      "tags": [
        "configuration",
        "kubernetes",
        "kustomize",
        "deployment",
        "orchestration"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/test/mapping.yaml",
      "type": "config",
      "name": "mapping.yaml",
      "filePath": "deployment/overlays/test/mapping.yaml",
      "summary": "Ambassador Mapping routing external traffic to the treetracker-query-api service with permissive CORS origins, headers, and methods.",
      "tags": [
        "configuration",
        "kubernetes",
        "routing",
        "api-schema",
        "deployment"
      ],
      "complexity": "simple",
      "languageNotes": "getambassador.io/v2 Mapping resource configures the Ambassador API gateway ingress and CORS policy."
    },
    {
      "id": "config:docs/api/spec/examples/countries/6632357.json",
      "type": "config",
      "name": "6632357.json",
      "filePath": "docs/api/spec/examples/countries/6632357.json",
      "summary": "API response example for the United States country resource, giving id, name, and centroid coordinates.",
      "tags": [
        "configuration",
        "api-schema",
        "example",
        "fixture",
        "geo"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/countries/6632375.json",
      "type": "config",
      "name": "6632375.json",
      "filePath": "docs/api/spec/examples/countries/6632375.json",
      "summary": "API response example for the Uganda country resource, giving id, name, and centroid coordinates.",
      "tags": [
        "configuration",
        "api-schema",
        "example",
        "fixture",
        "geo"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/countries/6632386.json",
      "type": "config",
      "name": "6632386.json",
      "filePath": "docs/api/spec/examples/countries/6632386.json",
      "summary": "API response example for the Tanzania country resource, giving id, name, and centroid coordinates.",
      "tags": [
        "configuration",
        "api-schema",
        "example",
        "fixture",
        "geo"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/countries/6632544.json",
      "type": "config",
      "name": "6632544.json",
      "filePath": "docs/api/spec/examples/countries/6632544.json",
      "summary": "API response example for the China country resource, giving id, name, and centroid coordinates.",
      "tags": [
        "configuration",
        "api-schema",
        "example",
        "fixture",
        "geo"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/countries/leader.json",
      "type": "config",
      "name": "leader.json",
      "filePath": "docs/api/spec/examples/countries/leader.json",
      "summary": "API response example for the country leaderboard endpoint, listing countries ranked by number of trees planted.",
      "tags": [
        "configuration",
        "api-schema",
        "example",
        "fixture",
        "leaderboard"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/tokens/1.json",
      "type": "config",
      "name": "1.json",
      "filePath": "docs/api/spec/examples/tokens/1.json",
      "summary": "Example token API response fixture showing a token object with wallet, capture, and planter attribution fields including photo URLs and created_at timestamp.",
      "tags": [
        "configuration",
        "api-schema",
        "fixture",
        "example",
        "token"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/tokens/2.json",
      "type": "config",
      "name": "2.json",
      "filePath": "docs/api/spec/examples/tokens/2.json",
      "summary": "Example token API response fixture for a token linked to a capture and planter without wallet assignment.",
      "tags": [
        "configuration",
        "api-schema",
        "fixture",
        "example",
        "token"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/tokens/3.json",
      "type": "config",
      "name": "3.json",
      "filePath": "docs/api/spec/examples/tokens/3.json",
      "summary": "Example token API response fixture representing an unassigned token with capture and planter attribution.",
      "tags": [
        "configuration",
        "api-schema",
        "fixture",
        "example",
        "token"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/tokens/4.json",
      "type": "config",
      "name": "4.json",
      "filePath": "docs/api/spec/examples/tokens/4.json",
      "summary": "Example token API response fixture representing an unassigned token with capture and planter attribution.",
      "tags": [
        "configuration",
        "api-schema",
        "fixture",
        "example",
        "token"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/transactions/1.json",
      "type": "config",
      "name": "1.json",
      "filePath": "docs/api/spec/examples/transactions/1.json",
      "summary": "Example transaction payload showing a token transfer from the 'apple' wallet to the 'orange' wallet, used as an API spec sample response.",
      "tags": [
        "api-schema",
        "example-data",
        "transaction",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/transactions/2.json",
      "type": "config",
      "name": "2.json",
      "filePath": "docs/api/spec/examples/transactions/2.json",
      "summary": "Example transaction payload representing a reverse token transfer from 'orange' to 'apple', used as an API spec sample response.",
      "tags": [
        "api-schema",
        "example-data",
        "transaction",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/transactions/3.json",
      "type": "config",
      "name": "3.json",
      "filePath": "docs/api/spec/examples/transactions/3.json",
      "summary": "Example transaction payload for a token transfer from 'apple' to 'orange' dated later in the year, used as an API spec sample response.",
      "tags": [
        "api-schema",
        "example-data",
        "transaction",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/trees/186734.json",
      "type": "config",
      "name": "186734.json",
      "filePath": "docs/api/spec/examples/trees/186734.json",
      "summary": "API response example fixture for tree 186734, holding a full tree record with capture, planter, location, species, and token fields used to document the trees endpoint schema.",
      "tags": [
        "api-schema",
        "example-data",
        "documentation",
        "data-model",
        "trees"
      ],
      "complexity": "moderate",
      "languageNotes": "Flat tree object mirroring the treetracker tree/capture schema (id, lat/lon, planter_id, species, token fields)."
    },
    {
      "id": "config:docs/api/spec/examples/trees/186735.json",
      "type": "config",
      "name": "186735.json",
      "filePath": "docs/api/spec/examples/trees/186735.json",
      "summary": "API response example fixture for tree 186735, documenting the trees endpoint payload with capture, planter, location, species, and token fields.",
      "tags": [
        "api-schema",
        "example-data",
        "documentation",
        "data-model",
        "trees"
      ],
      "complexity": "moderate",
      "languageNotes": "Flat tree object mirroring the treetracker tree/capture schema."
    },
    {
      "id": "config:docs/api/spec/examples/trees/186736.json",
      "type": "config",
      "name": "186736.json",
      "filePath": "docs/api/spec/examples/trees/186736.json",
      "summary": "API response example fixture for tree 186736, documenting the trees endpoint payload with capture, planter, location, species, and token fields.",
      "tags": [
        "api-schema",
        "example-data",
        "documentation",
        "data-model",
        "trees"
      ],
      "complexity": "moderate",
      "languageNotes": "Flat tree object mirroring the treetracker tree/capture schema."
    },
    {
      "id": "config:docs/api/spec/examples/trees/186737.json",
      "type": "config",
      "name": "186737.json",
      "filePath": "docs/api/spec/examples/trees/186737.json",
      "summary": "API response example fixture for tree 186737, documenting the trees endpoint payload with capture, planter, location, species, and token fields.",
      "tags": [
        "api-schema",
        "example-data",
        "documentation",
        "data-model",
        "trees"
      ],
      "complexity": "moderate",
      "languageNotes": "Flat tree object mirroring the treetracker tree/capture schema."
    },
    {
      "id": "file:.eslintignore",
      "type": "file",
      "name": ".eslintignore",
      "filePath": ".eslintignore",
      "summary": "Lists files and directories excluded from ESLint linting.",
      "tags": [
        "configuration",
        "linting",
        "tooling"
      ],
      "complexity": "simple"
    },
    {
      "id": "document:.github/ISSUE_TEMPLATE/basic-issue.md",
      "type": "document",
      "name": "basic-issue.md",
      "filePath": ".github/ISSUE_TEMPLATE/basic-issue.md",
      "summary": "GitHub issue template providing a basic structure for reporting general issues.",
      "tags": [
        "documentation",
        "github",
        "issue-template"
      ],
      "complexity": "simple"
    },
    {
      "id": "document:.github/ISSUE_TEMPLATE/implement-api.md",
      "type": "document",
      "name": "implement-api.md",
      "filePath": ".github/ISSUE_TEMPLATE/implement-api.md",
      "summary": "GitHub issue template guiding contributors when proposing a new API endpoint implementation.",
      "tags": [
        "documentation",
        "github",
        "issue-template"
      ],
      "complexity": "simple"
    },
    {
      "id": "pipeline:.github/workflows/.gitkeep",
      "type": "pipeline",
      "name": ".gitkeep",
      "filePath": ".github/workflows/.gitkeep",
      "summary": "Placeholder file keeping the empty GitHub Actions workflows directory tracked in git.",
      "tags": [
        "ci-cd",
        "placeholder",
        "github"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:.husky/commit-msg",
      "type": "file",
      "name": "commit-msg",
      "filePath": ".husky/commit-msg",
      "summary": "Husky git hook validating commit messages against the Conventional Commits specification via commitlint.",
      "tags": [
        "git-hook",
        "tooling",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:.husky/pre-commit",
      "type": "file",
      "name": "pre-commit",
      "filePath": ".husky/pre-commit",
      "summary": "Husky git hook running lint-staged before each commit.",
      "tags": [
        "git-hook",
        "tooling",
        "linting"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:.jest/globalSetup.ts",
      "type": "file",
      "name": "globalSetup.ts",
      "filePath": ".jest/globalSetup.ts",
      "summary": "Jest global setup module executed once before the test suite runs.",
      "tags": [
        "test",
        "configuration",
        "jest"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:.jest/setupFile.ts",
      "type": "file",
      "name": "setupFile.ts",
      "filePath": ".jest/setupFile.ts",
      "summary": "Jest per-test setup file configuring the test environment before each test file.",
      "tags": [
        "test",
        "configuration",
        "jest"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:.lintstagedrc.js",
      "type": "file",
      "name": ".lintstagedrc.js",
      "filePath": ".lintstagedrc.js",
      "summary": "lint-staged configuration defining lint and format commands run against staged files.",
      "tags": [
        "configuration",
        "linting",
        "tooling"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:.npmrc",
      "type": "file",
      "name": ".npmrc",
      "filePath": ".npmrc",
      "summary": "npm configuration file setting registry or install behavior for the project.",
      "tags": [
        "configuration",
        "npm",
        "tooling"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:.prettierignore",
      "type": "file",
      "name": ".prettierignore",
      "filePath": ".prettierignore",
      "summary": "Lists files and directories excluded from Prettier formatting.",
      "tags": [
        "configuration",
        "formatting",
        "tooling"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:.prettierrc.js",
      "type": "file",
      "name": ".prettierrc.js",
      "filePath": ".prettierrc.js",
      "summary": "Prettier configuration defining code formatting rules for the project.",
      "tags": [
        "configuration",
        "formatting",
        "tooling"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:.releaserc",
      "type": "file",
      "name": ".releaserc",
      "filePath": ".releaserc",
      "summary": "semantic-release configuration defining the release branches and plugin pipeline for automated versioning and publishing.",
      "tags": [
        "configuration",
        "release",
        "ci-cd"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:CODEOWNERS",
      "type": "file",
      "name": "CODEOWNERS",
      "filePath": "CODEOWNERS",
      "summary": "Defines default code owners and reviewers for paths across the repository.",
      "tags": [
        "configuration",
        "github",
        "governance"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:__tests__/seed.spec.js",
      "type": "file",
      "name": "seed.spec.js",
      "filePath": "__tests__/seed.spec.js",
      "summary": "Test seed script populating the database with example capture data using knex, following the wallet microservice pattern.",
      "tags": [
        "test",
        "database",
        "seed"
      ],
      "complexity": "moderate",
      "languageNotes": "Uses knex query builder against a pg client for seeding test fixtures."
    },
    {
      "id": "file:commitlint.config.js",
      "type": "file",
      "name": "commitlint.config.js",
      "filePath": "commitlint.config.js",
      "summary": "commitlint configuration extending the conventional commit ruleset.",
      "tags": [
        "configuration",
        "tooling",
        "validation"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:config/config.js",
      "type": "file",
      "name": "config.js",
      "filePath": "config/config.js",
      "summary": "Central runtime configuration exposing database connection strings and Sentry DSN from environment variables.",
      "tags": [
        "configuration",
        "environment",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/database.json.example",
      "type": "file",
      "name": "database.json.example",
      "filePath": "database/database.json.example",
      "summary": "Example database connection configuration template for local setup.",
      "tags": [
        "configuration",
        "database",
        "example"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:database/migrations/.gitkeep",
      "type": "file",
      "name": ".gitkeep",
      "filePath": "database/migrations/.gitkeep",
      "summary": "Placeholder file keeping the empty database migrations directory tracked in git.",
      "tags": [
        "placeholder",
        "database",
        "migration"
      ],
      "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 referencing the base configuration and applying a strategic merge patch.",
      "tags": [
        "configuration",
        "kubernetes",
        "deployment"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:deployment/overlays/development/mapping.yaml",
      "type": "config",
      "name": "mapping.yaml",
      "filePath": "deployment/overlays/development/mapping.yaml",
      "summary": "Ambassador Mapping defining CORS policy and routing for the treetracker-query-api service in development.",
      "tags": [
        "configuration",
        "kubernetes",
        "networking"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/organizations/1.json",
      "type": "config",
      "name": "1.json",
      "filePath": "docs/api/spec/examples/organizations/1.json",
      "summary": "Example API response payload for a single organization used in API documentation.",
      "tags": [
        "api-schema",
        "example",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/planters/940.json",
      "type": "config",
      "name": "940.json",
      "filePath": "docs/api/spec/examples/planters/940.json",
      "summary": "Example API response payload for a single planter used in API documentation.",
      "tags": [
        "api-schema",
        "example",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/planters/940/organizations.json",
      "type": "config",
      "name": "organizations.json",
      "filePath": "docs/api/spec/examples/planters/940/organizations.json",
      "summary": "Empty example payload for the organizations of planter 940 in the API documentation.",
      "tags": [
        "api-schema",
        "example",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:__tests__/seed.spec.js:seed",
      "type": "function",
      "name": "seed",
      "filePath": "__tests__/seed.spec.js",
      "lineRange": [
        61,
        83
      ],
      "summary": "Inserts example capture and related records into the test database using knex.",
      "tags": [
        "test",
        "database",
        "seed"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/planters/940/trees.json",
      "type": "config",
      "name": "trees.json",
      "filePath": "docs/api/spec/examples/planters/940/trees.json",
      "summary": "Example API response fixture for the planter 940 trees endpoint, showing a summary count and a trees array.",
      "tags": [
        "api-schema",
        "fixture",
        "example",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/species/1.json",
      "type": "config",
      "name": "1.json",
      "filePath": "docs/api/spec/examples/species/1.json",
      "summary": "Example API response fixture for a single species, with id, name and count fields.",
      "tags": [
        "api-schema",
        "fixture",
        "example",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/species/2.json",
      "type": "config",
      "name": "2.json",
      "filePath": "docs/api/spec/examples/species/2.json",
      "summary": "Example API response fixture for a second species record, with id, name and count fields.",
      "tags": [
        "api-schema",
        "fixture",
        "example",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/examples/wallets/180Earth.json",
      "type": "config",
      "name": "180Earth.json",
      "filePath": "docs/api/spec/examples/wallets/180Earth.json",
      "summary": "Example API response fixture for the 180Earth wallet, including token count and photo URL.",
      "tags": [
        "api-schema",
        "fixture",
        "example",
        "documentation"
      ],
      "complexity": "simple"
    },
    {
      "id": "config:docs/api/spec/query-api.yaml",
      "type": "config",
      "name": "query-api.yaml",
      "filePath": "docs/api/spec/query-api.yaml",
      "summary": "OpenAPI specification for the treetracker query API, defining all paths, operations and component schemas across captures, planters, species and wallets.",
      "tags": [
        "api-schema",
        "openapi",
        "documentation",
        "schema-definition"
      ],
      "complexity": "complex",
      "languageNotes": "Large OpenAPI 3 document (1740 lines) with a paths section and a shared components/schemas section."
    },
    {
      "id": "file:jest.config.js",
      "type": "config",
      "name": "jest.config.js",
      "filePath": "jest.config.js",
      "summary": "Jest test runner configuration using @swc/jest transforms, module path aliases, and global setup files for the server test suite.",
      "tags": [
        "configuration",
        "test",
        "build-system",
        "jest"
      ],
      "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": "Developer setup script that pulls managed database user passwords via doctl and populates local .env and database.json files from example templates.",
      "tags": [
        "script",
        "configuration",
        "database",
        "deployment"
      ],
      "complexity": "simple",
      "languageNotes": "Uses DigitalOcean doctl to fetch service, migration and integration passwords, then sed-substitutes them into env templates."
    },
    {
      "id": "file:scripts/vars.sh",
      "type": "file",
      "name": "vars.sh",
      "filePath": "scripts/vars.sh",
      "summary": "Shared shell variable definition setting the database SCHEMA used by the setup scripts.",
      "tags": [
        "script",
        "configuration",
        "database"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/app.spec.ts",
      "type": "file",
      "name": "app.spec.ts",
      "filePath": "server/app.spec.ts",
      "summary": "Integration test verifying the Express app returns 200 on GET / and rejects non-JSON POST with 415 via supertest.",
      "tags": [
        "test",
        "integration-test",
        "api-handler"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/Bounds.ts",
      "type": "file",
      "name": "Bounds.ts",
      "filePath": "server/interfaces/Bounds.ts",
      "summary": "Type definition for a geographic bounding box with north-east and south-east lat/lon corner tuples.",
      "tags": [
        "type-definition",
        "data-model",
        "geospatial"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/interfaces/FilterOptions.ts",
      "type": "file",
      "name": "FilterOptions.ts",
      "filePath": "server/interfaces/FilterOptions.ts",
      "summary": "Type definition for query filter options including limit, offset and orderBy used across repository queries.",
      "tags": [
        "type-definition",
        "data-model",
        "query"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/loglevel-setup.ts",
      "type": "file",
      "name": "loglevel-setup.ts",
      "filePath": "server/loglevel-setup.ts",
      "summary": "Initializes the loglevel logger default level from the NODE_LOG_LEVEL environment variable, falling back to info.",
      "tags": [
        "utility",
        "logging",
        "configuration"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/.gitkeep",
      "type": "file",
      "name": ".gitkeep",
      "filePath": "server/models/.gitkeep",
      "summary": "Empty placeholder file that keeps the server/models directory tracked in git.",
      "tags": [
        "placeholder",
        "scaffolding"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/models/Transaction.ts",
      "type": "file",
      "name": "Transaction.ts",
      "filePath": "server/models/Transaction.ts",
      "summary": "Transaction business model exposing a curried getByFilter factory that delegates filtered token transaction queries to the repository layer.",
      "tags": [
        "data-model",
        "service",
        "factory",
        "business-logic"
      ],
      "complexity": "simple",
      "languageNotes": "Uses a higher-order function pattern injecting the repository dependency and returning the query closure."
    },
    {
      "id": "file:server/server.ts",
      "type": "file",
      "name": "server.ts",
      "filePath": "server/server.ts",
      "summary": "Application entry point that loads env config, starts the Express app listening on NODE_PORT, and cleanly destroys knex on SIGINT.",
      "tags": [
        "entry-point",
        "bootstrap",
        "server"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/parseCentroid.spec.ts",
      "type": "file",
      "name": "parseCentroid.spec.ts",
      "filePath": "server/services/parseCentroid.spec.ts",
      "summary": "Unit test verifying parseCentroid maps a GeoJSON Point into a typed lat/lon object.",
      "tags": [
        "test",
        "unit-test",
        "geospatial"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/services/parseCentroid.ts",
      "type": "file",
      "name": "parseCentroid.ts",
      "filePath": "server/services/parseCentroid.ts",
      "summary": "Service helper that converts a GeoJSON Point into an object with type, lat and lon fields.",
      "tags": [
        "utility",
        "service",
        "geospatial",
        "serialization",
        "tested"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:server/setup.ts",
      "type": "file",
      "name": "setup.ts",
      "filePath": "server/setup.ts",
      "summary": "Startup side-effect module that sets the loglevel default level from NODE_LOG_LEVEL, defaulting to info.",
      "tags": [
        "configuration",
        "logging",
        "bootstrap"
      ],
      "complexity": "simple"
    },
    {
      "id": "file:typings-custom/express-lru.d.ts",
      "type": "file",
      "name": "express-lru.d.ts",
      "filePath": "typings-custom/express-lru.d.ts",
      "summary": "Ambient module declaration providing a minimal type stub for the untyped express-lru package.",
      "tags": [
        "type-definition",
        "declaration",
        "typescript"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/loglevel-setup.ts:initLogLevel",
      "type": "function",
      "name": "initLogLevel",
      "filePath": "server/loglevel-setup.ts",
      "lineRange": [
        3,
        9
      ],
      "summary": "Sets the loglevel default level from NODE_LOG_LEVEL, falling back to info when unset.",
      "tags": [
        "utility",
        "logging",
        "configuration"
      ],
      "complexity": "simple"
    },
    {
      "id": "function:server/models/Transaction.ts:getByFilter",
      "type": "function",
      "name": "getByFilter",
      "filePath": "server/models/Transaction.ts",
      "lineRange": [
        5,
        21
      ],
      "summary": "Factory that injects a TransactionRepository and returns an async query function fetching transactions by token/wallet filter and options.",
      "tags": [
        "factory",
        "business-logic",
        "query",
        "data-model"
      ],
      "complexity": "simple"
    }
  ],
  "edges": [
    {
      "source": "file:__tests__/e2e/bounds.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/captures.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/countries.spec.ts",
      "target": "file:__tests__/seed.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/countries.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/organizations.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/planters.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/species.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/tokens.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/transactions.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/trees.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/e2e/wallets.spec.ts",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/supertest.js",
      "target": "file:__tests__/seed.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/supertest.js",
      "target": "file:server/app.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/boundsRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/capturesRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/contractsRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/countriesRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/gisRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/growerAccountsRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/organizationsRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/plantersRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/rawCapturesRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/speciesRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/speciesRouterV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/stakeholderRouterV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/tokensRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/transactionsRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/treesRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/treesRouterV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/routers/walletsRouter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/utils/HttpError.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TreeRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TreeRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Tree.ts",
      "target": "file:server/infra/database/TreeRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Tree.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/boundsRouter.ts",
      "target": "file:server/models/Bounds.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/boundsRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/capturesRouter.ts",
      "target": "file:server/models/Capture.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/capturesRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/contractsRouter.ts",
      "target": "file:server/models/Contract.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/contractsRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/gisRouter.ts",
      "target": "file:server/models/Bounds.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/gisRouter.ts",
      "target": "file:server/models/Gis.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/gisRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/rawCapturesRouter.ts",
      "target": "file:server/models/RawCapture.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/rawCapturesRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/transactionsRouter.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/transactionsRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/treesRouter.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/treesRouter.ts",
      "target": "file:server/infra/database/TreeRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/treesRouter.ts",
      "target": "file:server/models/Tree.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/treesRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/treesRouter.ts",
      "target": "file:server/utils/HttpError.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/utils.ts",
      "target": "file:server/utils/HttpError.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TreeRepository.ts",
      "target": "class:server/infra/database/TreeRepository.ts:TreeRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/TreeRepository.ts",
      "target": "class:server/infra/database/TreeRepository.ts:TreeRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/Bounds.ts",
      "target": "function:server/models/Bounds.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/Bounds.ts",
      "target": "function:server/models/Bounds.ts:getByFilter",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/Tree.ts",
      "target": "function:server/models/Tree.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/Tree.ts",
      "target": "function:server/models/Tree.ts:getByFilter",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/Tree.ts",
      "target": "function:server/models/Tree.ts:countByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/Tree.ts",
      "target": "function:server/models/Tree.ts:countByFilter",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/Tree.ts",
      "target": "function:server/models/Tree.ts:getFeaturedTreeDepricated",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/routers/utils.ts",
      "target": "function:server/routers/utils.ts:handlerWrapper",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/routers/utils.ts",
      "target": "function:server/routers/utils.ts:handlerWrapper",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/routers/utils.ts",
      "target": "function:server/routers/utils.ts:errorHandler",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/routers/utils.ts",
      "target": "function:server/routers/utils.ts:errorHandler",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/routers/utils.ts",
      "target": "function:server/routers/utils.ts:queryFormatter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/routers/utils.ts",
      "target": "function:server/routers/utils.ts:queryFormatter",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/utils/HttpError.ts",
      "target": "class:server/utils/HttpError.ts:HttpError",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/utils/HttpError.ts",
      "target": "class:server/utils/HttpError.ts:HttpError",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/bounds.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/captures.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/countries.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/organizations.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/planters.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/species.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/tokens.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/transactions.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/trees.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/app.ts",
      "target": "file:__tests__/e2e/wallets.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/infra/database/BaseRepository.ts",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/BaseRepository.ts",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/BoundsRepository.ts",
      "target": "class:server/infra/database/BoundsRepository.ts:BoundsRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/BoundsRepository.ts",
      "target": "class:server/infra/database/BoundsRepository.ts:BoundsRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/CaptureRepository.ts",
      "target": "class:server/infra/database/CaptureRepository.ts:CaptureRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/CaptureRepository.ts",
      "target": "class:server/infra/database/CaptureRepository.ts:CaptureRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/ContractRepository.ts",
      "target": "class:server/infra/database/ContractRepository.ts:ContractRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/ContractRepository.ts",
      "target": "class:server/infra/database/ContractRepository.ts:ContractRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/CountryRepositoryV2.ts",
      "target": "class:server/infra/database/CountryRepositoryV2.ts:CountryRepositoryV2",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/CountryRepositoryV2.ts",
      "target": "class:server/infra/database/CountryRepositoryV2.ts:CountryRepositoryV2",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/RawCaptureRepository.ts",
      "target": "class:server/infra/database/RawCaptureRepository.ts:RawCaptureRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/RawCaptureRepository.ts",
      "target": "class:server/infra/database/RawCaptureRepository.ts:RawCaptureRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/Session.ts",
      "target": "class:server/infra/database/Session.ts:Session",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/Session.ts",
      "target": "class:server/infra/database/Session.ts:Session",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/SpeciesRepository.ts",
      "target": "class:server/infra/database/SpeciesRepository.ts:SpeciesRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/SpeciesRepository.ts",
      "target": "class:server/infra/database/SpeciesRepository.ts:SpeciesRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/StakeholderRepositoryV2.ts",
      "target": "class:server/infra/database/StakeholderRepositoryV2.ts:StakeholderRepositoryV2",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/StakeholderRepositoryV2.ts",
      "target": "class:server/infra/database/StakeholderRepositoryV2.ts:StakeholderRepositoryV2",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/TokensRepository.ts",
      "target": "class:server/infra/database/TokensRepository.ts:TokensRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/TokensRepository.ts",
      "target": "class:server/infra/database/TokensRepository.ts:TokensRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/TransactionRepository.ts",
      "target": "class:server/infra/database/TransactionRepository.ts:TransactionRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/TransactionRepository.ts",
      "target": "class:server/infra/database/TransactionRepository.ts:TransactionRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/Species.ts",
      "target": "function:server/models/Species.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/Species.ts",
      "target": "function:server/models/Species.ts:countByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/BaseRepository.spec.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/BaseRepository.spec.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/BaseRepository.spec.ts",
      "target": "file:server/infra/database/knex.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/BaseRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/BoundsRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/CaptureRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/CaptureRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/ContractRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/ContractRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/CountryRepositoryV2.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/CountryRepositoryV2.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/RawCaptureRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/RawCaptureRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/Session.ts",
      "target": "file:server/infra/database/knex.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/SpeciesRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/SpeciesRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/StakeholderRepositoryV2.spec.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/StakeholderRepositoryV2.spec.ts",
      "target": "file:server/infra/database/StakeholderRepositoryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/StakeholderRepositoryV2.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/StakeholderRepositoryV2.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TokensRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TokensRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TransactionRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TransactionRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Species.ts",
      "target": "file:server/infra/database/SpeciesRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Species.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/StakeholderV2.ts",
      "target": "file:server/infra/database/StakeholderRepositoryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/StakeholderV2.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/speciesRouter.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/speciesRouter.ts",
      "target": "file:server/infra/database/SpeciesRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/speciesRouter.ts",
      "target": "file:server/models/Species.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/speciesRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/stakeholderRouterV2.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/stakeholderRouterV2.ts",
      "target": "file:server/infra/database/StakeholderRepositoryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/stakeholderRouterV2.ts",
      "target": "file:server/models/StakeholderV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/stakeholderRouterV2.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/tokensRouter.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/tokensRouter.ts",
      "target": "file:server/infra/database/TokensRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/tokensRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "class:server/infra/database/CountryRepositoryV2.ts:CountryRepositoryV2",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "class:server/infra/database/SpeciesRepository.ts:SpeciesRepository",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "class:server/infra/database/CaptureRepository.ts:CaptureRepository",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "class:server/infra/database/StakeholderRepositoryV2.ts:StakeholderRepositoryV2",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "class:server/infra/database/TransactionRepository.ts:TransactionRepository",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "class:server/infra/database/TokensRepository.ts:TokensRepository",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "class:server/infra/database/RawCaptureRepository.ts:RawCaptureRepository",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "class:server/infra/database/ContractRepository.ts:ContractRepository",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/infra/database/BaseRepository.ts",
      "target": "file:server/infra/database/BaseRepository.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/infra/database/StakeholderRepositoryV2.ts",
      "target": "file:server/infra/database/StakeholderRepositoryV2.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/interfaces/Capture.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/CaptureFilter.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Contract.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/ContractFilter.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Country.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/GrowerAccount.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Organization.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Planter.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/RawCapture.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/RawCaptureFilter.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Species.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/SpeciesFilter.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Stakeholder.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Tokens.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Transaction.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Tree.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/Wallets.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/CountryRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/CountryRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/CountryRepository.ts",
      "target": "class:server/infra/database/CountryRepository.ts:CountryRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/CountryRepository.ts",
      "target": "class:server/infra/database/CountryRepository.ts:CountryRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/GisRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/GisRepository.ts",
      "target": "class:server/infra/database/GisRepository.ts:GisRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/GisRepository.ts",
      "target": "class:server/infra/database/GisRepository.ts:GisRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/delegateRepository.ts",
      "target": "function:server/infra/database/delegateRepository.ts:delegateRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/delegateRepository.ts",
      "target": "function:server/infra/database/delegateRepository.ts:delegateRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/Countries.spec.ts",
      "target": "file:server/models/Country.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Country.ts",
      "target": "file:server/infra/database/CountryRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Country.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/CountryV2.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Gis.ts",
      "target": "file:server/infra/database/GisRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Gis.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Tokens.spec.ts",
      "target": "file:server/models/Tokens.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Tokens.ts",
      "target": "file:server/infra/database/TokensRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Tokens.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/countriesRouter.ts",
      "target": "file:server/infra/database/CountryRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/countriesRouter.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/countriesRouter.ts",
      "target": "file:server/models/Country.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/countriesRouter.ts",
      "target": "file:server/models/CountryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/countriesRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Country.ts",
      "target": "file:server/models/Countries.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/models/Tokens.ts",
      "target": "file:server/models/Tokens.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/infra/database/OrganizationRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/OrganizationRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/OrganizationRepository.ts",
      "target": "file:server/infra/database/patch.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/OrganizationRepositoryV2.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/OrganizationRepositoryV2.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/OrganizationRepositoryV2.ts",
      "target": "file:server/infra/database/patch.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/PlanterRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/PlanterRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/PlanterRepository.ts",
      "target": "file:server/infra/database/patch.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/patch.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Organization.ts",
      "target": "file:server/infra/database/OrganizationRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Organization.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/OrganizationV2.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Planter.ts",
      "target": "file:server/infra/database/PlanterRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Planter.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/organizationsRouter.ts",
      "target": "file:server/infra/database/OrganizationRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/organizationsRouter.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/organizationsRouter.ts",
      "target": "file:server/models/Organization.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/organizationsRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/organizationsRouterV2.ts",
      "target": "file:server/infra/database/OrganizationRepositoryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/organizationsRouterV2.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/organizationsRouterV2.ts",
      "target": "file:server/models/OrganizationV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/organizationsRouterV2.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/plantersRouter.ts",
      "target": "file:server/infra/database/PlanterRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/plantersRouter.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/plantersRouter.ts",
      "target": "file:server/models/Planter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/plantersRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/OrganizationRepository.ts",
      "target": "class:server/infra/database/OrganizationRepository.ts:OrganizationRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/OrganizationRepository.ts",
      "target": "class:server/infra/database/OrganizationRepository.ts:OrganizationRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/OrganizationRepositoryV2.ts",
      "target": "class:server/infra/database/OrganizationRepositoryV2.ts:OrganizationRepositoryV2",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/OrganizationRepositoryV2.ts",
      "target": "class:server/infra/database/OrganizationRepositoryV2.ts:OrganizationRepositoryV2",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/PlanterRepository.ts",
      "target": "class:server/infra/database/PlanterRepository.ts:PlanterRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/PlanterRepository.ts",
      "target": "class:server/infra/database/PlanterRepository.ts:PlanterRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/patch.ts",
      "target": "function:server/infra/database/patch.ts:patch",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/Organization.ts",
      "target": "function:server/models/Organization.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/OrganizationV2.ts",
      "target": "function:server/models/OrganizationV2.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/Planter.ts",
      "target": "function:server/models/Planter.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/Planter.ts",
      "target": "function:server/models/Planter.ts:countByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/WalletsRepository.spec.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/WalletsRepository.spec.ts",
      "target": "file:server/infra/database/WalletsRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/WalletsRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/WalletsRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/WalletsRepository.ts",
      "target": "file:server/infra/database/patch.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/WalletsRepository.ts",
      "target": "file:server/utils/HttpError.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Wallets.spec.ts",
      "target": "file:server/models/Wallets.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Wallets.ts",
      "target": "file:server/infra/database/WalletsRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/Wallets.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/walletsRouter.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/walletsRouter.ts",
      "target": "file:server/infra/database/WalletsRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/walletsRouter.ts",
      "target": "file:server/models/Wallets.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/walletsRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/WalletsRepository.ts",
      "target": "class:server/infra/database/WalletsRepository.ts:WalletsRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/WalletsRepository.ts",
      "target": "class:server/infra/database/WalletsRepository.ts:WalletsRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/Wallets.ts",
      "target": "function:server/models/Wallets.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/WalletsRepository.ts",
      "target": "file:server/infra/database/WalletsRepository.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/models/Wallets.ts",
      "target": "file:server/models/Wallets.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/infra/database/GrowerAccountRepository.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/GrowerAccountRepository.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/GrowerAccountRepository.ts",
      "target": "file:server/interfaces/GrowerAccountFilter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/interfaces/GrowerAccountFilter.ts",
      "target": "file:server/interfaces/DbModel.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/GrowerAccount.ts",
      "target": "file:server/infra/database/GrowerAccountRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/GrowerAccount.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/GrowerAccount.ts",
      "target": "file:server/interfaces/GrowerAccountFilter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/growerAccountsRouter.ts",
      "target": "file:server/infra/database/GrowerAccountRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/growerAccountsRouter.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/growerAccountsRouter.ts",
      "target": "file:server/interfaces/GrowerAccountFilter.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/growerAccountsRouter.ts",
      "target": "file:server/models/GrowerAccount.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/growerAccountsRouter.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/GrowerAccountRepository.ts",
      "target": "class:server/infra/database/GrowerAccountRepository.ts:GrowerAccountRepository",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/GrowerAccountRepository.ts",
      "target": "class:server/infra/database/GrowerAccountRepository.ts:GrowerAccountRepository",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "class:server/infra/database/GrowerAccountRepository.ts:GrowerAccountRepository",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/models/GrowerAccount.ts",
      "target": "function:server/models/GrowerAccount.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/GrowerAccount.ts",
      "target": "function:server/models/GrowerAccount.ts:getByName",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/GrowerAccount.ts",
      "target": "function:server/models/GrowerAccount.ts:getFeaturedGrowers",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/GrowerAccount.ts",
      "target": "function:server/models/GrowerAccount.ts:getWalletsByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/routers/growerAccountsRouter.ts",
      "target": "file:server/models/GrowerAccount.ts",
      "type": "calls",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/GrowerAccount.ts",
      "target": "class:server/infra/database/GrowerAccountRepository.ts:GrowerAccountRepository",
      "type": "calls",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/TreeRepositoryV2.spec.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TreeRepositoryV2.spec.ts",
      "target": "file:server/infra/database/TreeRepositoryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TreeRepositoryV2.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TreeRepositoryV2.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/TreeV2.ts",
      "target": "file:server/infra/database/TreeRepositoryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/TreeV2.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/treesRouterV2.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/treesRouterV2.ts",
      "target": "file:server/infra/database/TreeRepositoryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/treesRouterV2.ts",
      "target": "file:server/models/TreeV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/treesRouterV2.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/TreeRepositoryV2.ts",
      "target": "class:server/infra/database/TreeRepositoryV2.ts:TreeRepositoryV2",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/TreeRepositoryV2.ts",
      "target": "class:server/infra/database/TreeRepositoryV2.ts:TreeRepositoryV2",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/TreeV2.ts",
      "target": "function:server/models/TreeV2.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/TreeV2.ts",
      "target": "function:server/models/TreeV2.ts:countByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/models/TreeV2.ts",
      "target": "function:server/models/TreeV2.ts:getFeaturedTreeDepricated",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "function:server/models/TreeV2.ts:getByFilter",
      "target": "class:server/infra/database/TreeRepositoryV2.ts:TreeRepositoryV2",
      "type": "calls",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "function:server/models/TreeV2.ts:countByFilter",
      "target": "class:server/infra/database/TreeRepositoryV2.ts:TreeRepositoryV2",
      "type": "calls",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "function:server/models/TreeV2.ts:getFeaturedTreeDepricated",
      "target": "class:server/infra/database/TreeRepositoryV2.ts:TreeRepositoryV2",
      "type": "calls",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/TreeRepositoryV2.ts",
      "target": "file:server/infra/database/TreeRepositoryV2.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:server/infra/database/SpeciesRepositoryV2.ts",
      "target": "class:server/infra/database/SpeciesRepositoryV2.ts:SpeciesRepositoryV2",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/infra/database/SpeciesRepositoryV2.ts",
      "target": "class:server/infra/database/SpeciesRepositoryV2.ts:SpeciesRepositoryV2",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/infra/database/SpeciesRepositoryV2.ts",
      "target": "file:server/infra/database/BaseRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/infra/database/SpeciesRepositoryV2.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "class:server/infra/database/SpeciesRepositoryV2.ts:SpeciesRepositoryV2",
      "target": "class:server/infra/database/BaseRepository.ts:BaseRepository",
      "type": "inherits",
      "direction": "forward",
      "weight": 0.9
    },
    {
      "source": "file:server/models/SpeciesV2.ts",
      "target": "file:server/infra/database/SpeciesRepositoryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/models/SpeciesV2.ts",
      "target": "file:server/infra/database/delegateRepository.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/speciesRouterV2.ts",
      "target": "file:server/infra/database/Session.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/speciesRouterV2.ts",
      "target": "file:server/infra/database/SpeciesRepositoryV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/speciesRouterV2.ts",
      "target": "file:server/models/SpeciesV2.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/routers/speciesRouterV2.ts",
      "target": "file:server/routers/utils.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "config:.dockerignore",
      "target": "service:Dockerfile",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "pipeline:.github/workflows/deploy-prod-env.yml",
      "target": "step:.github/workflows/deploy-prod-env.yml:deploy",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/deploy-test-env.yml",
      "target": "step:.github/workflows/deploy-test-env.yml:deploy",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/pull-request-ci.yml",
      "target": "step:.github/workflows/pull-request-ci.yml:test",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/treetracker-query-api-build-deploy-dev.yml",
      "target": "step:.github/workflows/treetracker-query-api-build-deploy-dev.yml:release",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "pipeline:.github/workflows/treetracker-query-api-build-deploy-dev.yml",
      "target": "step:.github/workflows/treetracker-query-api-build-deploy-dev.yml:deploy",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "step:.github/workflows/treetracker-query-api-build-deploy-dev.yml:deploy",
      "target": "step:.github/workflows/treetracker-query-api-build-deploy-dev.yml:release",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:tsconfig.json",
      "target": "config:tsconfig.base.json",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:tsconfig.build.json",
      "target": "config:tsconfig.base.json",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:tsconfig.build.json",
      "target": "file:server/server.ts",
      "type": "configures",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:tsconfig.json",
      "target": "file:server/server.ts",
      "type": "configures",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:package.json",
      "target": "file:server/server.ts",
      "type": "configures",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:.env.example",
      "target": "file:server/server.ts",
      "type": "configures",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "document:README.md",
      "target": "file:server/server.ts",
      "type": "documents",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "document:CHANGELOG.md",
      "target": "document:README.md",
      "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/deployment.yaml",
      "target": "config:deployment/base/database-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/overlays/prod/kustomization.yaml",
      "target": "config:deployment/overlays/prod/deployment.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/prod/kustomization.yaml",
      "target": "config:deployment/overlays/prod/treetracker-webmap-api-mapping.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:deployment/overlays/prod/deployment.yaml",
      "target": "config:deployment/overlays/prod/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-connection-sealed-secret.yaml",
      "type": "depends_on",
      "direction": "forward",
      "weight": 0.6
    },
    {
      "source": "config:docs/api/spec/examples/countries/leader.json",
      "target": "config:docs/api/spec/examples/countries/6632386.json",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:docs/api/spec/examples/countries/leader.json",
      "target": "config:docs/api/spec/examples/countries/6632375.json",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:docs/api/spec/examples/countries/leader.json",
      "target": "config:docs/api/spec/examples/countries/6632544.json",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "config:docs/api/spec/examples/countries/leader.json",
      "target": "config:docs/api/spec/examples/countries/6632357.json",
      "type": "related",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:__tests__/seed.spec.js",
      "target": "file:config/config.js",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:__tests__/seed.spec.js",
      "target": "function:__tests__/seed.spec.js:seed",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/server.ts",
      "target": "file:server/setup.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/services/parseCentroid.spec.ts",
      "target": "file:server/services/parseCentroid.ts",
      "type": "imports",
      "direction": "forward",
      "weight": 0.7
    },
    {
      "source": "file:server/loglevel-setup.ts",
      "target": "function:server/loglevel-setup.ts:initLogLevel",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/loglevel-setup.ts",
      "target": "function:server/loglevel-setup.ts:initLogLevel",
      "type": "exports",
      "direction": "forward",
      "weight": 0.8
    },
    {
      "source": "file:server/models/Transaction.ts",
      "target": "function:server/models/Transaction.ts:getByFilter",
      "type": "contains",
      "direction": "forward",
      "weight": 1
    },
    {
      "source": "file:server/services/parseCentroid.ts",
      "target": "file:server/services/parseCentroid.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5
    },
    {
      "source": "file:__tests__/seed.js",
      "target": "file:__tests__/seed.spec.js",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5,
      "description": "Path-based pairing (deterministic)"
    },
    {
      "source": "file:server/app.ts",
      "target": "file:server/app.spec.ts",
      "type": "tested_by",
      "direction": "forward",
      "weight": 0.5,
      "description": "Path-based pairing (deterministic)"
    }
  ],
  "layers": [
    {
      "id": "layer:api",
      "name": "Protocol & Router Layer",
      "description": "Express application bootstrap, versioned resource routers with Joi validation, HTTP error handling, and request/response wiring that expose the treetracker query endpoints.",
      "nodeIds": [
        "file:server/app.ts",
        "file:server/routers/boundsRouter.ts",
        "file:server/routers/capturesRouter.ts",
        "file:server/routers/contractsRouter.ts",
        "file:server/routers/gisRouter.ts",
        "file:server/routers/rawCapturesRouter.ts",
        "file:server/routers/transactionsRouter.ts",
        "file:server/routers/treesRouter.ts",
        "file:server/routers/utils.ts",
        "file:server/utils/HttpError.ts",
        "file:server/routers/speciesRouter.ts",
        "file:server/routers/stakeholderRouterV2.ts",
        "file:server/routers/tokensRouter.ts",
        "file:server/routers/countriesRouter.ts",
        "file:server/routers/organizationsRouter.ts",
        "file:server/routers/organizationsRouterV2.ts",
        "file:server/routers/plantersRouter.ts",
        "file:server/routers/walletsRouter.ts",
        "file:server/routers/growerAccountsRouter.ts",
        "file:server/routers/treesRouterV2.ts",
        "file:server/routers/speciesRouterV2.ts",
        "file:server/loglevel-setup.ts",
        "file:server/server.ts",
        "file:server/setup.ts"
      ]
    },
    {
      "id": "layer:service",
      "name": "Business Model Layer",
      "description": "Domain business models for trees, captures, planters, organizations, wallets, species and countries that orchestrate queries, build HATEOAS links, and delegate to repositories, plus GeoJSON parsing helpers.",
      "nodeIds": [
        "file:server/models/Bounds.ts",
        "file:server/models/Capture.ts",
        "file:server/models/Contract.ts",
        "file:server/models/RawCapture.ts",
        "file:server/models/Tree.ts",
        "file:server/models/Species.ts",
        "file:server/models/StakeholderV2.ts",
        "file:server/models/Country.ts",
        "file:server/models/CountryV2.ts",
        "file:server/models/Gis.ts",
        "file:server/models/Tokens.ts",
        "file:server/models/Organization.ts",
        "file:server/models/OrganizationV2.ts",
        "file:server/models/Planter.ts",
        "file:server/models/Wallets.ts",
        "file:server/models/GrowerAccount.ts",
        "file:server/models/TreeV2.ts",
        "file:server/models/SpeciesV2.ts",
        "file:server/models/.gitkeep",
        "file:server/models/Transaction.ts",
        "file:server/services/parseCentroid.ts"
      ]
    },
    {
      "id": "layer:data",
      "name": "Repository & Data Access Layer",
      "description": "Knex/pg repositories, the BaseRepository, database Session and connection factory that build and run SQL against the PostgreSQL treetracker database.",
      "nodeIds": [
        "file:server/infra/database/TreeRepository.ts",
        "file:server/infra/database/BaseRepository.ts",
        "file:server/infra/database/BoundsRepository.ts",
        "file:server/infra/database/CaptureRepository.ts",
        "file:server/infra/database/ContractRepository.ts",
        "file:server/infra/database/CountryRepositoryV2.ts",
        "file:server/infra/database/RawCaptureRepository.ts",
        "file:server/infra/database/Session.ts",
        "file:server/infra/database/SpeciesRepository.ts",
        "file:server/infra/database/StakeholderRepositoryV2.ts",
        "file:server/infra/database/TokensRepository.ts",
        "file:server/infra/database/TransactionRepository.ts",
        "file:server/infra/database/knex.ts",
        "file:server/infra/database/CountryRepository.ts",
        "file:server/infra/database/GisRepository.ts",
        "file:server/infra/database/delegateRepository.ts",
        "file:server/infra/database/OrganizationRepository.ts",
        "file:server/infra/database/OrganizationRepositoryV2.ts",
        "file:server/infra/database/PlanterRepository.ts",
        "file:server/infra/database/patch.ts",
        "file:server/infra/database/WalletsRepository.ts",
        "file:server/infra/database/GrowerAccountRepository.ts",
        "file:server/infra/database/TreeRepositoryV2.ts",
        "file:server/infra/database/SpeciesRepositoryV2.ts"
      ]
    },
    {
      "id": "layer:types",
      "name": "Domain Interfaces & Types",
      "description": "TypeScript interface definitions for domain records and query filters, plus ambient module declarations shared across the model and repository layers.",
      "nodeIds": [
        "file:server/interfaces/DbModel.ts",
        "file:server/interfaces/Capture.ts",
        "file:server/interfaces/CaptureFilter.ts",
        "file:server/interfaces/Contract.ts",
        "file:server/interfaces/ContractFilter.ts",
        "file:server/interfaces/Country.ts",
        "file:server/interfaces/GrowerAccount.ts",
        "file:server/interfaces/Organization.ts",
        "file:server/interfaces/Planter.ts",
        "file:server/interfaces/RawCapture.ts",
        "file:server/interfaces/RawCaptureFilter.ts",
        "file:server/interfaces/Species.ts",
        "file:server/interfaces/SpeciesFilter.ts",
        "file:server/interfaces/Stakeholder.ts",
        "file:server/interfaces/Tokens.ts",
        "file:server/interfaces/Transaction.ts",
        "file:server/interfaces/Tree.ts",
        "file:server/interfaces/Wallets.ts",
        "file:server/interfaces/GrowerAccountFilter.ts",
        "file:server/interfaces/Bounds.ts",
        "file:server/interfaces/FilterOptions.ts",
        "file:typings-custom/express-lru.d.ts"
      ]
    },
    {
      "id": "layer:infrastructure",
      "name": "Infrastructure & CI/CD",
      "description": "Dockerfile, Kubernetes/Kustomize deployment manifests with Ambassador mappings and sealed secrets, GitHub Actions build-and-deploy pipelines, and developer setup scripts.",
      "nodeIds": [
        "service:Dockerfile",
        "config:.dockerignore",
        "pipeline:.github/workflows/deploy-prod-env.yml",
        "pipeline:.github/workflows/deploy-test-env.yml",
        "pipeline:.github/workflows/pull-request-ci.yml",
        "pipeline:.github/workflows/treetracker-query-api-build-deploy-dev.yml",
        "config:deployment/base/database-connection-sealed-secret.yaml",
        "config:deployment/base/deployment.yaml",
        "config:deployment/base/kustomization.yaml",
        "config:deployment/base/mapping.yaml",
        "config:deployment/base/namespace.yaml",
        "config:deployment/base/service.yaml",
        "config:deployment/overlays/prod/database-connection-sealed-secret.yaml",
        "config:deployment/overlays/prod/deployment.yaml",
        "config:deployment/overlays/prod/kustomization.yaml",
        "config:deployment/overlays/prod/treetracker-webmap-api-mapping.yaml",
        "config:deployment/overlays/test/database-connection-sealed-secret.yaml",
        "config:deployment/overlays/test/kustomization.yaml",
        "config:deployment/overlays/test/mapping.yaml",
        "pipeline:.github/workflows/.gitkeep",
        "config:deployment/overlays/development/kustomization.yaml",
        "config:deployment/overlays/development/mapping.yaml",
        "file:scripts/setup-dev-database-passwords.sh",
        "file:scripts/vars.sh",
        "step:.github/workflows/deploy-prod-env.yml:deploy",
        "step:.github/workflows/deploy-test-env.yml:deploy",
        "step:.github/workflows/pull-request-ci.yml:test",
        "step:.github/workflows/treetracker-query-api-build-deploy-dev.yml:release",
        "step:.github/workflows/treetracker-query-api-build-deploy-dev.yml:deploy"
      ]
    },
    {
      "id": "layer:config",
      "name": "Configuration & Tooling",
      "description": "Build, lint, format and release configs (TypeScript, Prettier, ESLint, semantic-release), runtime environment and database connection settings, and git hooks.",
      "nodeIds": [
        "config:.env.example",
        "config:.prettierrc.json",
        "config:package.json",
        "config:tsconfig.base.json",
        "config:tsconfig.build.json",
        "config:tsconfig.json",
        "file:.eslintignore",
        "file:.husky/commit-msg",
        "file:.husky/pre-commit",
        "file:.lintstagedrc.js",
        "file:.npmrc",
        "file:.prettierignore",
        "file:.prettierrc.js",
        "file:.releaserc",
        "file:CODEOWNERS",
        "file:commitlint.config.js",
        "file:config/config.js",
        "file:database/database.json.example",
        "file:database/migrations/.gitkeep"
      ]
    },
    {
      "id": "layer:documentation",
      "name": "Documentation & API Spec",
      "description": "Project README, changelog and contributing guides, GitHub issue templates, and the OpenAPI spec with example response fixtures for the query API.",
      "nodeIds": [
        "document:CHANGELOG.md",
        "document:CONTRIBUTING.md",
        "document:README.md",
        "config:docs/api/spec/examples/countries/6632357.json",
        "config:docs/api/spec/examples/countries/6632375.json",
        "config:docs/api/spec/examples/countries/6632386.json",
        "config:docs/api/spec/examples/countries/6632544.json",
        "config:docs/api/spec/examples/countries/leader.json",
        "config:docs/api/spec/examples/tokens/1.json",
        "config:docs/api/spec/examples/tokens/2.json",
        "config:docs/api/spec/examples/tokens/3.json",
        "config:docs/api/spec/examples/tokens/4.json",
        "config:docs/api/spec/examples/transactions/1.json",
        "config:docs/api/spec/examples/transactions/2.json",
        "config:docs/api/spec/examples/transactions/3.json",
        "config:docs/api/spec/examples/trees/186734.json",
        "config:docs/api/spec/examples/trees/186735.json",
        "config:docs/api/spec/examples/trees/186736.json",
        "config:docs/api/spec/examples/trees/186737.json",
        "document:.github/ISSUE_TEMPLATE/basic-issue.md",
        "document:.github/ISSUE_TEMPLATE/implement-api.md",
        "config:docs/api/spec/examples/organizations/1.json",
        "config:docs/api/spec/examples/planters/940.json",
        "config:docs/api/spec/examples/planters/940/organizations.json",
        "config:docs/api/spec/examples/planters/940/trees.json",
        "config:docs/api/spec/examples/species/1.json",
        "config:docs/api/spec/examples/species/2.json",
        "config:docs/api/spec/examples/wallets/180Earth.json",
        "config:docs/api/spec/query-api.yaml"
      ]
    },
    {
      "id": "layer:test",
      "name": "Test Layer",
      "description": "End-to-end endpoint suites, repository and model unit specs, seed and supertest fixtures, and Jest setup/config for the API.",
      "nodeIds": [
        "file:__tests__/e2e/bounds.spec.ts",
        "file:__tests__/e2e/captures.spec.ts",
        "file:__tests__/e2e/countries.spec.ts",
        "file:__tests__/e2e/organizations.spec.ts",
        "file:__tests__/e2e/planters.spec.ts",
        "file:__tests__/e2e/species.spec.ts",
        "file:__tests__/e2e/tokens.spec.ts",
        "file:__tests__/e2e/transactions.spec.ts",
        "file:__tests__/e2e/trees.spec.ts",
        "file:__tests__/e2e/wallets.spec.ts",
        "file:__tests__/seed.js",
        "file:__tests__/supertest.js",
        "file:server/infra/database/BaseRepository.spec.ts",
        "file:server/infra/database/StakeholderRepositoryV2.spec.ts",
        "file:server/models/Countries.spec.ts",
        "file:server/models/Tokens.spec.ts",
        "file:server/infra/database/WalletsRepository.spec.ts",
        "file:server/models/Wallets.spec.ts",
        "file:server/infra/database/TreeRepositoryV2.spec.ts",
        "file:.jest/globalSetup.ts",
        "file:.jest/setupFile.ts",
        "file:__tests__/seed.spec.js",
        "file:jest.config.js",
        "file:server/app.spec.ts",
        "file:server/services/parseCentroid.spec.ts"
      ]
    }
  ],
  "tour": [
    {
      "order": 1,
      "title": "Project Overview",
      "description": "Start with the README to learn what treetracker-query-api is: a RESTful API that exposes Greenstand treetracker data such as captures, growers, organizations, and trees. It describes the project purpose, the development toolkit, and the setup steps, giving you a roadmap before you read any code. Use it to anchor the layered tour that follows: protocol/router, business model, and repository/infrastructure.",
      "nodeIds": [
        "document:README.md"
      ]
    },
    {
      "order": 2,
      "title": "Application Entry Point",
      "description": "server.ts is the runtime entry point. It loads environment configuration, starts the Express app listening on NODE_PORT, and cleanly destroys the knex connection pool on SIGINT. The actual Express application is built in app.ts, which registers global middleware, mounts every versioned resource router, and installs the global error handler. Together these two files define how the process boots and how a request enters the system.",
      "nodeIds": [
        "file:server/server.ts",
        "file:server/app.ts"
      ]
    },
    {
      "order": 3,
      "title": "Runtime Configuration",
      "description": "The app depends on a small set of runtime settings. The package.json manifest declares dependencies plus the build, lint, test, and start scripts, and points main at the compiled server/server.js. The .env.example template lists the environment variables the API expects at startup: the database connection URL, the database schema, and the log level that server.ts reads in Step 2.",
      "nodeIds": [
        "config:package.json",
        "config:.env.example"
      ],
      "languageLesson": "package.json scripts are the canonical entry points for a Node project. 'npm start' runs the compiled dist output, while 'main' tells consumers which file to load."
    },
    {
      "order": 4,
      "title": "Router Layer and Shared Utilities",
      "description": "The router layer is the protocol boundary that app.ts mounts. routers/utils.ts is the most reused piece here: it provides an async handler wrapper, the global error handler that maps thrown errors to HTTP responses, and a shared query formatter. This is the plumbing every concrete router relies on to translate HTTP into model calls and back.",
      "nodeIds": [
        "file:server/routers/utils.ts"
      ],
      "languageLesson": "The async handler wrapper is a common Express pattern: it wraps an async route so rejected promises forward to the error middleware instead of crashing the process."
    },
    {
      "order": 5,
      "title": "Concrete Resource Routers",
      "description": "Building on the shared utilities from Step 4, the resource routers expose the API surface. treesRouter wires tree endpoints for filtered queries, counts, and featured trees. growerAccountsRouter exposes grower-account endpoints (count, featured, wallets, selfies, by id, list) and validates query parameters with Joi before delegating to the model layer. These routers show the repeating pattern used across all resources.",
      "nodeIds": [
        "file:server/routers/treesRouter.ts",
        "file:server/routers/growerAccountsRouter.ts"
      ]
    },
    {
      "order": 6,
      "title": "Business Model Layer",
      "description": "Between the routers and the database sits the business model layer, where domain rules live. Tree.ts orchestrates tree queries and counts across organization, date, tag, wallet, and geometry filters. GrowerAccount.ts curries a repository into use-case functions and builds HATEOAS links for paginated responses. The routers from Step 5 call directly into these models rather than touching the database themselves.",
      "nodeIds": [
        "file:server/models/Tree.ts",
        "file:server/models/GrowerAccount.ts"
      ],
      "languageLesson": "Currying a repository into use-case functions (as GrowerAccount does) is functional dependency injection: the data source is bound once, leaving small single-purpose functions the router can call."
    },
    {
      "order": 7,
      "title": "Domain Model Contract",
      "description": "The model and repository layers share a common typing contract. DbModel.ts is a base TypeScript interface with an index signature that every domain model interface extends, allowing arbitrary dynamic keys read straight from database rows. It is one of the most depended-upon files in the codebase, which is why it is worth understanding before the repositories that produce these rows.",
      "nodeIds": [
        "file:server/interfaces/DbModel.ts"
      ],
      "languageLesson": "A TypeScript index signature ([key: string]: unknown) lets an interface accept arbitrary keys. It is a pragmatic escape hatch for shaping loosely-typed database rows into typed models."
    },
    {
      "order": 8,
      "title": "Repository Foundation",
      "description": "The infrastructure layer talks to Postgres through knex. Session.ts, the single most depended-upon file in the project, wraps a knex connection and manages transaction begin, commit, and rollback state. BaseRepository.ts is the generic base that provides shared CRUD operations (getById, getByFilter, count, update, create) reused by every concrete repository. delegateRepository.ts is a factory helper that returns a function delegating a named model method to a repository instance, wiring models to data access.",
      "nodeIds": [
        "file:server/infra/database/Session.ts",
        "file:server/infra/database/BaseRepository.ts",
        "file:server/infra/database/delegateRepository.ts"
      ],
      "languageLesson": "A generic BaseRepository<T> centralizes CRUD once and specializes per entity through the type parameter, so concrete repositories add only their entity-specific queries."
    },
    {
      "order": 9,
      "title": "Concrete Repository",
      "description": "TreeRepositoryV2.ts shows how the foundation from Step 8 becomes real queries. It provides V2 tree lookups by id, organization, date range, tag, wallet, and featured selection, backing the Tree model from Step 6. This closes the loop: router to model to repository to database, the full path a tree request travels.",
      "nodeIds": [
        "file:server/infra/database/TreeRepositoryV2.ts"
      ]
    },
    {
      "order": 10,
      "title": "Structured Error Handling",
      "description": "Errors flow back up the same stack. HttpError.ts is a custom error class carrying an HTTP status code and a rollback flag. Repositories and models throw it, Session uses the rollback flag to decide transaction cleanup, and the global error handler in routers/utils.ts (Step 4) maps it to an HTTP response. This one small class ties the transaction, model, and protocol layers together.",
      "nodeIds": [
        "file:server/utils/HttpError.ts"
      ]
    },
    {
      "order": 11,
      "title": "Containerization",
      "description": "With the code understood, see how it ships. The Dockerfile is a single-stage build on node:16-alpine that installs dependencies with npm ci and runs the pre-built dist output via npm start, the same start script from Step 3. The tsconfig files drive the TypeScript compilation that produces that dist output before the image is built.",
      "nodeIds": [
        "service:Dockerfile",
        "config:tsconfig.json"
      ],
      "languageLesson": "This Dockerfile builds from pre-compiled dist output rather than compiling inside the image. A multi-stage build could instead compile in a builder stage, but keeping the build external keeps the runtime image minimal."
    },
    {
      "order": 12,
      "title": "Kubernetes Deployment",
      "description": "The container from Step 11 runs on Kubernetes via Kustomize. deployment.yaml defines the Deployment, pinning the container to the DigitalOcean microservices node pool and injecting DATABASE_URL from a sealed secret, satisfying the env config from Step 3. kustomization.yaml is the base that aggregates the deployment, mapping, service, and sealed-secret manifests into one deployable resource set that overlays customize per environment.",
      "nodeIds": [
        "config:deployment/base/deployment.yaml",
        "config:deployment/base/kustomization.yaml"
      ],
      "languageLesson": "Kustomize layers a base set of manifests with per-environment overlays, so prod and test share one base and change only what differs, avoiding manifest duplication."
    },
    {
      "order": 13,
      "title": "CI/CD Pipelines",
      "description": "The capstone is automation. pull-request-ci.yml runs a clean install, TypeScript build, ESLint, and the full test and repository test suites on Node 20 for every pull request against main. deploy-prod-env.yml is a manually dispatched, approval-gated workflow that deploys a tagged release to the production Kubernetes cluster using the Kustomize overlays from Step 12, pinning the image to the npm package version. Together they show how code moves from a pull request to production.",
      "nodeIds": [
        "pipeline:.github/workflows/pull-request-ci.yml",
        "pipeline:.github/workflows/deploy-prod-env.yml"
      ],
      "languageLesson": "GitHub Actions use 'on' triggers to run jobs. CI runs automatically on pull_request, while production deploy uses workflow_dispatch plus an approval environment so releases stay manual and audited."
    }
  ]
}