$ show AnmolSaini16/mapcn
mapcn is a React map component library and documentation site, not a data project. The product is a single-file MapLibre GL JS wrapper (`src/registry/map.tsx`) that exposes composable components such as Map, MapMarker, MapPopup, MapRoute, MapArc, MapGeoJSON, MapClusterLayer, and MapControls. It is distributed as a shadcn/ui registry: users run `npx shadcn add @mapcn/...` and receive copy-paste source code. The accompanying Next.js 16 app is a showcase and docs portal, rendering live examples, code samples, installation commands, and generated LLM-oriented content via routes under `/llm` and `/llms.txt`. Architecturally, the repo combines a library (registry JSON + map.tsx) with an application shell (Next.js App Router, Tailwind CSS v4, shadcn UI components). The map components use React contexts, portals, forwardRef/useImperativeHandle, and MapLibre style expressions to manage markers, popups, routes, arcs, GeoJSON layers, clustering, and hover states. Blocks under `src/registry/blocks/` demonstrate realistic use cases (analytics maps, store locators, logistics networks, uptime monitoring) with hardcoded sample data and external data sources like OSRM routing and Natural Earth GeoJSON. These demo blocks are primarily illustrations, not data pipelines. Maintenance is active, but the codebase has risks: the core map library is a ~3000-line monolith, the distributable JSON registry duplicates source files, and the stack is heavily bleeding-edge (Next.js 16, React 19.2.3, Tailwind v4). No automated tests appear in the repository. Overall it is a polished, effectively structured component library with a strong distribution model, but its craftsmanship is constrained by the single-file monolith and build fragility.
The LLM identified 1 files worth highlighting for reuse:
The core single-file library wrapping MapLibre GL JS. It exports Map and sub-components (markers, popups, routes, arcs, GeoJSON layers, clusters, controls) using React context for parent-child coordination, createPortal to mount overlays in map DOM nodes, forwardRef/useImperativeHandle to expose the underlying maplibre instance, and map style expressions for interactive hover states. Because it is self-contained, designed for shadcn registry distribution, and has no dependencies on the documentation site, it can be extracted into a new React project with minimal changes.