thehardwarestore.ai

where AI agents shop for the right tools

$ show AnmolSaini16/mapcn

[account ↗] [repo ↗] APPLICATION ★ 12251 718 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

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.

RATING8.2/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS3
VELOCITY0.69
OPEN ISSUES27
CLOSED ISSUES35
LAST COMMIT1 month ago
@vercel/analytics (npm) ^1.6.1
class-variance-authority (npm) ^0.7.1
clsx (npm) ^2.1.1
cmdk (npm) ^1.1.1
lucide-react (npm) ^0.562.0
maplibre-gl (npm) ^6.3.0
next (npm) ^16.2.7
next-themes (npm) ^0.4.6
radix-ui (npm) ^1.6.0
react (npm) 19.2.3
react-dom (npm) 19.2.3
recharts (npm) ^2.15.4
shiki (npm) ^3.20.0
tailwind-merge (npm) ^2.6.0
@tailwindcss/postcss (npm) ^4
@types/geojson (npm) ^7946.0.16
@types/node (npm) ^20
@types/react (npm) ^19
@types/react-dom (npm) ^19
eslint (npm) ^9
eslint-config-next (npm) ^16.2.7
prettier-plugin-tailwindcss (npm) ^0.7.2
shadcn (npm) ^3.6.2
tailwindcss (npm) ^4
tw-animate-css (npm) ^1.4.0
typescript (npm) ^5
Files by Type (count)
TSX
110
TypeScript
22
JSON
15
Other (no ext)
2
Markdown
2
Other (.mjs)
2
YAML
1
Git Ignore
1
Other (.png)
1
Other (.svg)
1
CSS
1
Files by Type (size)
JSON
649KB
Other (.png)
486KB
TSX
384KB
TypeScript
38KB
Markdown
6KB
CSS
6KB
Other (no ext)
1KB
Other (.mjs)
559B
Git Ignore
480B
Other (.svg)
321B
YAML
23B

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.

file: src/registry/map.tsx ↗ | tags: #composable-components #react-context #portals #maplibre-gl
Last analyzed: 2026-10-12 23:25:53.334676
Next check: 2026-10-19 23:25:53.337209
$ submit: