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.
| Import | Runs in | What it holds |
|---|---|---|
@sonordev/re-site-kit | Server or client | Types, the components that render without client JavaScript, format helpers, JSON-LD, the building registry and the market snapshot |
@sonordev/re-site-kit/server | Server only | The data layer, which reads from Sonor with your SONOR_API_KEY |
@sonordev/re-site-kit/client | Client ('use client') | The interactive components |
@sonordev/re-site-kit/mcp | Server only | The 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.
| Export | Kind | Docs |
|---|---|---|
ListingCard | Component | Cards and grids |
ListingGrid | Component | Cards and grids |
ListingDetail | Component | Listing pages |
ListingSchema | Component | Listing pages |
IdxAttribution | Component | IDX compliance |
ListingFilters | Component | Search and filters |
ListingPagination | Component | Search and filters |
formatPrice, formatSpecs, formatLocation, formatStreet | Functions | Formatting and JSON-LD |
buildListingJsonLd, safeJsonLdString | Functions | Formatting and JSON-LD |
buildingRegistry | Function | Buildings and the registry |
summarizeListings, monthlyHoa | Functions | Market snapshot |
RealEstateListing, ListingStatus, ListingType, PropertyType, ListingOpenHouse, ListingBuildingRef | Types | Types |
SearchListingsOptions, GetListingsOptions, ListingSearchResult, ListingPaginationInfo | Types | Types |
GetHotListingsOptions, HotListingEntry, HotListingsResult | Types | Types |
BuildingSummary, BuildingRegistryEntry, ListingStats, ListingJsonLdOptions | Types | Types |
ListingCardProps, ListingGridProps, ListingDetailProps, ListingSchemaProps, IdxAttributionProps, ListingFiltersProps, ListingPaginationProps | Types | Types |
@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.
| Export | Returns | Docs |
|---|---|---|
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?) | Metadata | Listing 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. By default, failures return an empty result or null. searchListings, getBuildingListings and getBuildingSummaries accept RealEstateFetchOptions to opt into thrown inventory failures and forward cache tags. See strict inventory reads.
@sonordev/re-site-kit/client
Client components, marked 'use client'. You can render them straight from a server component; Next handles the boundary.
| Export | Docs |
|---|---|
ListingGallery and ListingGalleryProps | Listing pages |
ListingInquiryForm and ListingInquiryFormProps | Inquiry forms |
ListingViewTracker and ListingViewTrackerProps | Hot 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.
| Export | Docs |
|---|---|
realEstateMcpTools(options) | MCP tools |
realEstateMcpServerInfo(options, overrides?) | MCP tools |
RealEstateMcpOptions (type) | MCP tools |
Peer dependencies
| Package | Range |
|---|---|
@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.