docs
    re-site-kit: Subpath map
    v0.6.0.md

    Subpath map

    The package has four entry points. The split is what keeps listing pages server-rendered: the root holds nothing that needs the browser, the server-only code can't leak into a client bundle, and the interactive pieces are marked as client components.

    ImportRuns inWhat it holds
    @sonordev/re-site-kitServer or clientTypes, the components that render without client JavaScript, format helpers, JSON-LD, the building registry and the market snapshot
    @sonordev/re-site-kit/serverServer onlyThe data layer, which reads from Sonor with your SONOR_API_KEY
    @sonordev/re-site-kit/clientClient ('use client')The interactive components
    @sonordev/re-site-kit/mcpServer onlyThe MCP tool set for a buyer's AI assistant

    Each entry ships ESM, CommonJS and TypeScript declarations.

    @sonordev/re-site-kit

    Safe to import anywhere, server components included. Nothing here imports server-only code or uses React hooks.

    ExportKindDocs
    ListingCardComponentCards and grids
    ListingGridComponentCards and grids
    ListingDetailComponentListing pages
    ListingSchemaComponentListing pages
    IdxAttributionComponentIDX compliance
    ListingFiltersComponentSearch and filters
    ListingPaginationComponentSearch and filters
    formatPrice, formatSpecs, formatLocation, formatStreetFunctionsFormatting and JSON-LD
    buildListingJsonLd, safeJsonLdStringFunctionsFormatting and JSON-LD
    buildingRegistryFunctionBuildings and the registry
    summarizeListings, monthlyHoaFunctionsMarket snapshot
    RealEstateListing, ListingStatus, ListingType, PropertyType, ListingOpenHouse, ListingBuildingRefTypesTypes
    SearchListingsOptions, GetListingsOptions, ListingSearchResult, ListingPaginationInfoTypesTypes
    GetHotListingsOptions, HotListingEntry, HotListingsResultTypesTypes
    BuildingSummary, BuildingRegistryEntry, ListingStats, ListingJsonLdOptionsTypesTypes
    ListingCardProps, ListingGridProps, ListingDetailProps, ListingSchemaProps, IdxAttributionProps, ListingFiltersProps, ListingPaginationPropsTypesTypes

    @sonordev/re-site-kit/server

    Server components, generateMetadata, generateStaticParams and route handlers only. It imports server-only, so importing it from a client component fails the build rather than leaking the data layer into the browser.

    ExportReturnsDocs
    searchListings(options?, fetchOptions?)Promise<ListingSearchResult>Search and filters
    getListings(options?)Promise<RealEstateListing[]>Search and filters
    getListing(slug, options?, fetchOptions?)Promise<RealEstateListing | null>Listing pages
    getListingParams(options?)Promise<{ slug: string }[]>Listing pages
    listingMetadata(listing, options?)MetadataListing pages
    getHotListings(options?)Promise<HotListingEntry[]>Hot properties
    getBuildingListings(slug, options?, fetchOptions?)Promise<ListingSearchResult>Buildings
    getBuildingSummaries(options?, fetchOptions?)Promise<BuildingSummary[]>Buildings

    Every fetcher goes through site-kit's server fetcher (serverApiFetch from @sonordev/site-kit/server), so there's one key, one retry policy and one caching policy across the site. None of them throws: a failure returns an empty result or null and logs a warning.

    @sonordev/re-site-kit/client

    Client components, marked 'use client'. You can render them straight from a server component; Next handles the boundary.

    ExportDocs
    ListingGallery and ListingGalleryPropsListing pages
    ListingInquiryForm and ListingInquiryFormPropsInquiry forms
    ListingViewTracker and ListingViewTrackerPropsHot properties

    These aren't re-exported from the package root on purpose. If they were, importing anything from the root would pull client code into every page that shows a listing.

    @sonordev/re-site-kit/mcp

    Server only (it imports server-only): the showing request is sent with your server's SONOR_API_KEY, which must never reach a browser.

    ExportDocs
    realEstateMcpTools(options)MCP tools
    realEstateMcpServerInfo(options, overrides?)MCP tools
    RealEstateMcpOptions (type)MCP tools

    Peer dependencies

    PackageRange
    @sonordev/site-kit>=4.3.0 (the MCP tools need 6.4.0 or later)
    next>=14.0.0
    react, react-dom>=18.0.0

    These are the kit's own ranges. site-kit sets its own, narrower Next.js and React requirements, so in practice your site runs whatever versions its site-kit release supports.

    The kit imports from these site-kit entry points: @sonordev/site-kit/server (the data layer and the showing request's config), @sonordev/site-kit/client (analytics events and conversions), @sonordev/site-kit/forms (ManagedForm) and @sonordev/site-kit/mcp (tool types). It never bundles site-kit; your site's own install provides it.