docs
    agency-site-kit: Subpath map
    v0.11.1.md

    Subpath map

    Every entry point the package publishes, where each one can run, and everything it exports. Each entry ships as ESM and CommonJS with type declarations.

    At a glance

    ImportRuns inWhat's there
    @sonordev/agency-site-kitServerEverything: the layout, brand and API utilities, every type, and everything in /portfolio
    @sonordev/agency-site-kit/portfolioAnywhereThe pure rules and the case study types
    @sonordev/agency-site-kit/portfolio/pureAnywhereThe same pure rules, without the types or PORTFOLIO_SECTION_TYPES
    @sonordev/agency-site-kit/portfolio/serverServerThe fetchers, Next.js helpers and errors, plus every pure rule
    @sonordev/agency-site-kit/layoutServerAgencySiteKitLayout and its props type
    @sonordev/agency-site-kit/revalidateRoute handlercreateRevalidateHandler
    @sonordev/agency-site-kit/previewRoute handlercreatePortfolioPreviewHandler

    Anywhere means no React, no network and no server guard: a server component, a client component, a plain module or a test runner can all import it. Server entries pull in @sonordev/site-kit's server-only guard, so importing one from a client component fails the build (on purpose: that's what keeps your API key out of the browser). Route handler entries use next/cache or next/headers, so they belong in app/**/route.ts.

    In a client component, import rules from /portfolio and types with import type from wherever they live.

    @sonordev/agency-site-kit/portfolio

    The rules every renderer shares, and the types.

    GroupExports
    ProofcuratePortfolioProof, curateHeroKpis, curateResultItems, gateMetricsDeltas, headlineKpi, metricCredit, metricNote, formatMetricValue
    Provenance contractMETRIC_SOURCES, isHeadlineMetric, metricSourceLabel, metricSourceProblem, formatAttribution, shortAttribution
    SectionsPORTFOLIO_SECTION_ORDER, PORTFOLIO_SECTION_TYPES, orderedSections, sectionData, projectBrandColor
    DevicesshouldRenderSoloDevice, resolveSoloScreenshot, isSoftwareCategory
    JSON-LDbuildPortfolioJsonLd, jsonLdString
    Images and labelsresolvePortfolioImage, formatCategoryLabel, formatServiceTag, formatIsoDate
    PathssanitizeSiteArchitectureData, humanizeArchPageEntry
    TypesPortfolioItem, PortfolioItemFull, PortfolioListResponse, PortfolioSection, PortfolioSectionType, PortfolioSectionData, PortfolioSectionDataMap, PortfolioKPI, MetricsDelta, MetricsSnapshot, MetricSource, MetricAttribution, every section's data type (PortfolioHeroData through PortfolioCTAData), PortfolioLighthouseScores, ProofRecord, HeadlineKpi, SoloDeviceInput, PortfolioJsonLdOptions, ResolvedPortfolioImage

    Pages: Proof and provenance, Sections and devices, Images, labels and paths, JSON-LD, Types.

    @sonordev/agency-site-kit/portfolio/pure

    The same functions and constants as /portfolio, and the helper types (HeadlineKpi, SoloDeviceInput, PortfolioJsonLdOptions, ResolvedPortfolioImage), without the case study types, MetricSource, MetricAttribution or PORTFOLIO_SECTION_TYPES. It exists for code that already imports it; new code can use /portfolio.

    @sonordev/agency-site-kit/portfolio/server

    GroupExports
    FetchersgetPortfolioItems, getPortfolioItem, getPortfolioCategories, getProofRecords, getPortfolioBrandConfig
    Next.js helpersgeneratePortfolioMetadata, generatePortfolioStaticParams, generatePortfolioCategoryStaticParams, generatePortfolioIndexMetadata, generatePortfolioSitemapEntries, slugifyCategory
    ErrorsPortfolioApiError, PortfolioContractError, assertPortfolioItemShape
    CachePORTFOLIO_CACHE_TAG ('portfolio')
    TypesPortfolioSitemapEntry, and the helper types from /portfolio/pure
    RulesEvery function and constant from /portfolio/pure, so a server component needs one import

    It doesn't export the case study types; take those from /portfolio. See Fetching.

    @sonordev/agency-site-kit

    The root entry. It includes everything in /portfolio, plus:

    GroupExports
    LayoutAgencySiteKitLayout (its props type is in /layout)
    BrandgenerateBrandCSS, mergeBrandConfig, hexToRgb, DEFAULT_BRAND_CONFIG, DEFAULT_DARK_MODE
    APIapiFetch, apiGet, getApiConfig
    TypesBrandConfig, SanityImageRef, PortfolioConfigResponse, and the item-level types inside sections: PortfolioChallengeItem, PortfolioStrategyPhase, PortfolioResultItem, PortfolioTechItem, PortfolioServiceItem, PortfolioGalleryImage, PortfolioTeamMember, PortfolioAnnotation, PortfolioMetricsDataPoint, PortfolioFunnelStage

    It doesn't include the fetchers, the route handlers or PORTFOLIO_CACHE_TAG. See Brand layout and Fetching.

    @sonordev/agency-site-kit/layout

    AgencySiteKitLayout and AgencySiteKitLayoutProps. See Brand layout.

    @sonordev/agency-site-kit/revalidate

    createRevalidateHandler, CreateRevalidateHandlerOptions and PORTFOLIO_CACHE_TAG. See Live updates and preview.

    @sonordev/agency-site-kit/preview

    createPortfolioPreviewHandler and PortfolioPreviewHandlerOptions. See Live updates and preview.

    Also in the package

    PathWhat it is
    agency-site-kit-setup (bin)The setup CLI. See Quickstart.
    templates/The files the CLI copies into a site, laid out the way they land

    Peer dependencies

    PackageVersion
    @sonordev/site-kit>= 6.5.0
    next>= 14.0.0
    react, react-dom>= 18.0.0

    @sonordev/site-kit is never bundled into the kit: your site's one install provides it, so the two always agree.