项目 / datopian/portaljs

datopian/portaljs

行业推荐
语言 TypeScript标签 data-portalckannextjsopen-data-portaldata-meshdatahubopen-dataopenmetadatadataversedkanopendatasoftsocrataaiai-agentsagent-skillsclaude-codemcpskills数据更新 2026-11-20 06:49:16 · 仓库 2026-11-19

一段话介绍

用来搭建数据门户的开源框架,可用一句命令生成首页、目录检索和数据集展示页,并把自有 CSV 或 JSON 加入 `datasets.json` 后自动呈现。需 Node 22 及以上,运行 `npm create portaljs@latest my-portal` 后执行 `npm run dev`,即可在本机 3000 端口查看。源文还提供 Claude Code 技能,用来协助选型、脚手架和加载数据;文档见[portaljs.com/docs](https://www.portaljs.com/docs)。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
🌀 AI-native framework for building data portals. Scaffold a full portal from a brief and load datasets in minutes with agentic skills — any backend (CKAN, GitHub, Frictionless).
2,372累计星
339Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

政务服务事项与公共数据开放

适配系统:公共数据开放平台、政务数据目录 · 得分 3.0

AI 原生数据门户框架。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
PortalJS 用一条 npm 命令即可创建数据门户(需 Node 22+),包含首页、搜索目录和数据集展示三个页面,也提供配套 Claude Code 技能来搭建、加数据和部署。
特点或设计要点
PortalJS 是一个开源技能框架,数据团队可借助它构建数据门户及其底层基础设施:技能既能根据数据用途推荐存储、计算、目录、托管等架构,又能以无锁定的可编辑 Next.js 代码搭建该技术栈。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-10-28 · 语言 TypeScript · 贡献者 —
agent

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 15,480 字节。

<p align="center">
  <img src="assets/portaljs-logo-spin.svg" alt="PortalJS" width="96" height="96" />
  <h1 align="center">PortalJS</h1>
  <p align="center">
    <b>The AI-native framework for building data portals.</b>
    <br />
    Describe the portal you want — your agent helps you choose an architecture, scaffolds it, and loads your data.
    <br />
    <br />
    <a href="https://www.portaljs.com/docs">Docs</a>
    ·
    <a href="https://github.com/datopian/portaljs/discussions">Discussions</a>
    ·
    <a href="https://github.com/datopian/portaljs/issues/new">Report a bug</a>
    <br />
    <br />
    <a href="https://www.npmjs.com/package/create-portaljs"><img src="https://img.shields.io/npm/v/create-portaljs?logo=npm&logoColor=white&label=create-portaljs&color=cb3837" alt="npm version" /></a>
    <a href="https://github.com/datopian/portaljs/stargazers"><img src="https://img.shields.io/github/stars/datopian/portaljs?logo=github&logoColor=white&label=Stars&color=blue" alt="GitHub stars" /></a>
    <a href="https://discord.gg/krmj5HM6He"><img src="https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white" alt="Join our Discord" /></a>
    <a href="license"><img src="https://img.shields.io/badge/License-MIT-blue" alt="MIT License" /></a>
  </p>
</p>

---

## Quickstart

**Create a portal** — one command, nothing to install beyond Node 22+:

```bash
npm create portaljs@latest my-portal
cd my-portal
npm run dev      # → http://localhost:3000
```

You get the three surfaces — Home, a Catalog (`/search`), and a dataset Showcase
(`/@<namespace>/<slug>`) — over sample data. Plain, editable Next.js, no lock-in. Add your
own CSV/JSON to `datasets.json` and it renders automatically.

**Build it with your AI assistant** — PortalJS ships [Claude Code](https://claude.com/claude-code)
skills that do the assembly. Install them once (into `~/.claude/commands`):

```bash
curl -fsSL https://raw.githubusercontent.com/datopian/portaljs/main/scripts/install-portaljs-skills.sh | bash
```

Then, in a Claude Code session from any directory:

```text
/portaljs-architect    not sure what stack you need? start here
/portaljs-new-portal   "Auckland Council open data portal"
/portaljs-add-dataset  ./data/air-quality.csv
```

`/portaljs-new-portal` scaffolds the three surfaces; `/portaljs-add-dataset` (or `/portaljs-add-resource`) loads data;
`/portaljs-connect-ckan` points it at a CKAN backend; `/portaljs-deploy` ships it. ([All skills + install →](.claude/INSTALL.md))

**Prefer the bare template** — plain Next.js, no AI, no lock-in:

```bash
npx tiged datopian/portaljs/examples/portaljs-catalog my-portal
cd my-portal && npm install && npm run dev      # → http://localhost:3000
```

You get Home, a Catalog (`/search`), and a dataset Showcase (`/@<namespace>/<slug>`) over
sample data. Add your own CSV/JSON to `datasets.json` and it renders automatically.

⭐ If it's useful, a star helps others find it.

## Why PortalJS

Building a data portal has always meant more than a website. You have to decide where
the data lives, how it's versioned, how people search it, how it's served, and how it's
governed — and then wire a frontend on top. Teams either over-build on a heavy data
warehouse they don't need, or under-build on a pile of scripts that doesn't scale.

PortalJS is an **open-source, agentic skills framework that helps data teams build,
develop, and ship data portals — and the data infrastructure underneath them.** It isn't
only a frontend. The skills do two jobs:

- **Advise** — given _what you're building_, _what your data is_, and _what it's for_,
  they recommend an architecture: storage, compute, catalog, access, hosting, metadata.
- **Build** — they scaffold that stack as plain, editable Next.js code with no lock-in.

It is **opinionated but open**: the recommended modern path is git + object storage
(Cloudflare R2) + Parquet, queried with [DuckDB](https://duckdb.org/) — an open lakehouse
instead of a classic warehouse. For living, incremental tables you can layer on
[DuckLake](https://ducklake.select/), and a traditional datastore (CKAN, a warehouse)
stays a first-class option when you need it. You always own plain code.

Built and maintained in the open by [Datopian](https://www.datopian.com/) and the
PortalJS community.

## Architecture at a glance

```text
        🧑  you describe what you want to build
        │
        ▼
╭─ 🤖  AGENTIC SKILLS ──────────────────────────────────  decide + build
│   /portaljs-architect · /portaljs-new-portal · /portaljs-add-dataset · /portaljs-add-chart · /portaljs-add-map …
╰─  generates plain, editable Next.js code — no lock-in
        │
        ▼
╭─ 🖥️  SURFACES ────────────────────────────────────────  what users see
│   🏠 Home /      🔎 Catalog /search      📊 Showcase /@ns/slug
╰─  read data through one DataProvider contract
        │
        ▼
╭─ 🔌  PROVIDERS ───────────────────────────────────────  pluggable backends
│   📁 static·git     🐘 CKAN     🔭 OpenMetadata     🗂️ git-LFS + R2
╰─  swap the source without touching a page
        │
        ▼
📦  STORAGE + COMPUTE  —  choose your point on the spectrum:

      flat files  ─▶  Git-LFS + R2  ─▶  Parquet on R2 + 🦆 DuckDB  ─▶  warehouse / CKAN
      simplest                       ⭐ open lakehouse (default)        heaviest
                                     (+ DuckLake for living tables)

☁️  Substrate  —  Cloudflare R2 (storage) · Workers (runtime) · D1 (catalog) · Pages (static)
     object storage stays S3-compatible — R2 is the default, never a lock-in
```

**Three surfaces.** Every data portal is built from three: a **Home** page that explains
it and offers search, a **Catalog** (`/search`) to discover datasets, and a **Showcase**
(`/@<namespace>/<slug>`) to explore one dataset — metadata, preview, download/API, and
charts/maps. ([Core concepts →](https://www.portaljs.com/docs/core-concepts))

**One seam.** The surfaces read data only through a `DataProvider`, so the source — static
files today, a CKAN or lakehouse backend tomorrow — can change without touching a page.

See [`ROADMAP.md`](ROADMAP.md) for the full model and the
[architecture decision framework](https://www.portaljs.com/docs/architecture/decision-framework)
for how `/portaljs-architect` turns your needs into a stack.

## Build a portal with your AI assistant

PortalJS ships [Claude Code](https://claude.com/claude-code) skills that turn a brief into
a working portal.

### Setup

Install the skills once into your personal scope so they're available from **any**
directory:

```bash
curl -fsSL https://raw.githubusercontent.com/datopian/portaljs/main/scripts/install-portaljs-skills.sh | bash
```

Restart Claude Code (or open a new session) and type `/` to see them. See
[`.claude/INSTALL.md`](.claude/INSTALL.md) for other install options (versioned plugin, or
running straight from a clone of this repo).

### Use

If you're not sure how to set up your portal, start with the advisor, then build:

```text
/portaljs-architect    we have ~200 public CSVs, updated quarterly, and must publish DCAT-AP
/portaljs-new-portal   "Auckland Council open data portal"
/portaljs-add-dataset  ./data/air-quality.csv
/portaljs-add-dataset  https://example.com/parks.geojson
```

The skills are **interactive** — if your brief is thin, they interview you in short rounds
rather than erroring. `/portaljs-architect` recommends a stack and hands off; `/portaljs-new-portal`
scaffolds the three surfaces; `/portaljs-add-dataset` appends to the `datasets.json` manifest and
the showcase renders automatically at `/@<namespace>/<slug>`. Run `npm run dev` and you
have a portal.

**Prefer to build by hand?** The skills are a convenience, not a requirement — scaffold the
template directly with the CLI:

```bash
npm create portaljs@latest my-portal
```

(Or grab the bare template with no prompts: `npx tiged datopian/portaljs/examples/portaljs-catalog my-portal`.)

### Available skills

<!-- BEGIN:skills-table -->

| Skill | What it does |
| ----- | ------------ |
| [`/portaljs-architect`](.claude/commands/portaljs-architect.md) | Advisory — turns your needs (data, scale, governance) into a recommended architecture before you build. Start here if you're unsure of the stack. |
| [`/portaljs-new-portal`](.claude/commands/portaljs-new-portal.md) | Scaffold a new portal (Home + Catalog + Showcase) from a brief — copies the template, substitutes your project name and description, installs deps, verifies the build. |
| [`/portaljs-add-dataset`](.claude/commands/portaljs-add-dataset.md) | Add a CSV, TSV, JSON, or GeoJSON dataset — registers it in the catalog and renders its showcase automatically; large local files are pushed to Cloudflare R2 via Git LFS for you. |
| [`/portaljs-add-resource`](.claude/commands/portaljs-add-resource.md) | Attach another file (data dictionary, methodology, extra data) to an existing dataset — it becomes multi-resource and the showcase renders a section per file. |
| [`/portaljs-add-chart`](.claude/commands/portaljs-add-chart.md) | Add a line, bar, area, pie, or scatter chart to a dataset's showcase. |
| [`/portaljs-add-map`](.claude/commands/portaljs-add-map.md) | Render a GeoJSON dataset on an interactive map and register it on the home page. |
| [`/portaljs-add-geo`](.claude/commands/portaljs-add-geo.md) | Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) on your own machine — no server: normalizes CRS to EPSG:4326, derives a PMTiles render tier and a GeoParquet query tier, pushes both plus the original to R2, and registers one dual-tier dataset the showcase maps and queries in place. |
| [`/portaljs-define-schema`](.claude/commands/portaljs-define-schema.md) | Infer a Frictionless Table Schema from a dataset's data, add license/source/keyword metadata, and surface a typed field table on its showcase. |
| [`/portaljs-add-dcat`](.claude/commands/portaljs-add-dcat.md) | Make the portal harvestable — emit standards-compliant DCAT feeds (DCAT 2/3, DCAT-AP, DCAT-US, national profiles) in JSON-LD, Turtle, and RDF/XML so national/EU/US open-data portals can harvest its datasets. |
| [`/portaljs-connect-ckan`](.claude/commands/portaljs-connect-ckan.md) | Wire the portal to a CKAN backend over its API instead of static files. |
| [`/portaljs-check-data-quality`](.claude/commands/portaljs-check-data-quality.md) | Validate a dataset against its schema and flag quality issues (type mismatches, missing values, constraint violations). |
| [`/portaljs-migrate`](.claude/commands/portaljs-migrate.md) | Harvest or migrate a whole catalog into the portal from CKAN, Socrata, OpenDataSoft, ArcGIS, or DCAT-US, over a canonical Frictionless/DCAT model. |
| [`/arcgis-to-portaljs`](.claude/commands/arcgis-to-portaljs.md) | Migrate a whole ArcGIS Hub site into the portal end-to-end — harvest its `/data.json`, export every FeatureService layer via the ArcGIS REST API, convert to the serverless dual tier (PMTiles + GeoParquet), push to R2, and write a source-vs-derived parity report. |
| [`/portaljs-deploy`](.claude/commands/portaljs-deploy.md) | Build a static export and publish it to PortalJS Arc — Datopian-managed hosting on Cloudflare — with a live `<slug>.arc.portaljs.com` URL. |

<!-- END:skills-table -->
<!-- Generated from scripts/skills-manifest.mjs — edit there and run `npm run gen:skills`. -->

Large-data scaling — big files pushed to Cloudflare R2 via Git LFS — already ships in
`/portaljs-add-dataset`. More skill families — metadata schemas (Frictionless/DCAT), more
backends (OpenMetadata), a browser DuckDB query layer, and access control — are on the
[roadmap](ROADMAP.md). Write your own — see [`.claude/AUTHORING.md`](.claude/AUTHORING.md).

## What's in this repo

```text
.claude/commands/    the agentic skills (slash commands)
examples/            portaljs-catalog — the canonical template
packages/
  ckan/              CKAN catalog UI + React          (@portaljs/ckan)
  ckan-api-client-js/ pure CKAN API client            (@portaljs/ckan-api-client-js)
site/                portaljs.com — the marketing site + docs
ROADMAP.md           direction, the four contracts, sequencing
```

The canonical template, [`examples/portaljs-catalog`](examples/portaljs-catalog/), is where
the three surfaces and the `DataProvider` seam live — read it before building.

## What makes it different

- 🌱 **Open source, MIT, no lock-in** — every skill emits plain Next.js you can fork and own.
- 🧭 **Advisory, not just generative** — `/portaljs-architect` helps you _decide_ the infrastructure, not only scaffold a UI.
- 🦆 **Open lakehouse by default** — git + R2 + Parquet queried with DuckDB, over a heavy warehouse; add DuckLake for living/incremental tables. A datastore/warehouse stays a supported choice.
- ☁️ **Cloudflare-first, portable** — R2 / Workers / D1 / Pages as the default substrate, but object storage stays S3-compatible.
- 🧩 **Decoupled, any backend** — one `DataProvider` contract in front of [CKAN](https://ckan.org/), [DKAN](https://getdkan.org/), [OpenMetadata](https://open-metadata.org/), [DataHub](https://datahubproject.io/), GitHub, [Frictionless](https://frictionlessdata.io/), plain files — or your own.
- 🎨 **Bring your own stack** — adopt the template or lift the skills and the three-surface model into an app you already have.

## Examples

The canonical template lives in [`examples/`](examples/); OpenSpending, built on PortalJS, has its own repo:

| Example | What it is |
|---------|------------|
| [`portaljs-catalog`](examples/portaljs-catalog/) | **Canonical template** — Home + Catalog + Showcase over a static manifest. Scaffold it with `npm create portaljs` or `/portaljs-new-portal`. |
| [`openspending.org`](https://github.com/datopian/openspending.org) | Real-world portal behind [OpenSpending](https://www.openspending.org/) — now in its own repo |

The earlier 2023-era examples (`portaljs-template`, `ckan`, `ckan-ssg`,
`github-backed-catalog`, `dataset-frictionless`, `fivethirtyeight`, `turing`, `learn`)
were retired; their source is preserved at
[`59d816c`](https://github.com/datopian/portaljs/tree/59d816c73aa3569733ce26cf6c471d24b155d760/examples).

## Community & support

- 💬 **Discord** — live chat and help: [join the server](https://discord.gg/krmj5HM6He)
- 🗣️ **Discussions** — questions, ideas, show-and-tell: [github.com/datopian/portaljs/discussions](https://github.com/datopian/portaljs/discussions)
- 🐛 **Issues** — bugs and feature requests: [open an issue](https://github.com/datopian/portaljs/issues/new)
- 📖 **Docs** — [portaljs.com/docs](https://www.portaljs.com/docs)

## Contributing

PortalJS is built in the open and we welcome contributions of all sizes — new skills,
examples, docs, and fixes. See [CONTRIBUTING.md](CONTRIBUTING.md) to get started, and read
[ROADMAP.md](ROADMAP.md) and [VISION.md](VISION.md) for where the project is headed.

## License

[MIT](license) © [Datopian](https://www.datopian.com/)
↑