A modern, customizable frontend template for building high-performance CKAN-based data portals
Powered by Next.js, React, TypeScript, and Tailwind CSS
PortalJS Frontend Starter is the official frontend template used by PortalJS Cloud and by teams who want to build a decoupled CKAN portal with a modern UI stack.
Use it to:
- build CKAN frontends with Next.js and React
- customize dataset views, branding, and layouts
- support organizations, groups, datasets, resources, and search
- ship a portal experience that is responsive, accessible, and easy to extend
- deploy on Vercel, Netlify, Cloudflare Pages, or your own infrastructure
- Modern UI - clean, responsive design with a branded visual system
- High performance - built on Next.js App Router with server rendering and static generation where appropriate
- CKAN integration - data fetching through the PortalJS CKAN client layer
- Localization - locale-aware routing and navigation with
next-intl - TypeScript - strong typing and better developer experience
- Accessibility - built with accessibility checks and accessible components in mind
- Search and browsing - datasets, organizations, groups, and detail pages
- Resource previews - CSV, PDF, iframe, and rich resource presentation
- Queryless AI ready - optional assistant integration driven by environment variables
- Deploy ready - suited for direct deployment to modern hosting platforms
The starter ships with a branded theme instead of a default boilerplate look.
To change the main color, update src/app/portal-theme.css:
:root {
--brand-accent: #1d83d4;
--brand-accent-foreground: #ffffff;
--brand-logo: var(--brand-accent);
}That single file drives the accent color, logo color, links, button styling, and the subtle surface tints used across the portal.
PortalJS Cloud can create a new repository from this starter and deploy it automatically.
- Sign up at https://cloud.portaljs.com
- Create a portal
- Find the generated repository in your dashboard
- Customize it through pull requests or with support from the PortalJS team
If you want to use this starter on your own infrastructure, clone the repository and configure it locally.
npm install
npm run devOpen http://localhost:3000 in your browser to see the app.
Create a .env file with the values your portal needs:
NEXT_PUBLIC_DMS=https://api.example.com/@your-portal
# Optional Queryless AI assistant integration
NEXT_PUBLIC_QUERYLESS_ENABLED=false
NEXT_PUBLIC_QUERYLESS_API_ROUTE=/api/queryless-chat
# Server-side Queryless API config
QUERYLESS_URL=
QUERYLESS_TOKEN=
QUERYLESS_MODEL=agent:your-agent-idEdit the header and footer branding in:
src/components/layout/Header.tsxsrc/components/layout/Footer.tsx
Update the navigation links in src/components/layout/Footer.tsx.
Update the homepage content in src/app/[locale]/page.tsx.
Adjust the search behavior and facet fields in src/lib/ckan/dataset.ts.
Resource presentation can be extended in:
src/components/package/resource/ResourceDetails.tsxsrc/components/package/resource/ResourceSidebar.tsxsrc/components/package/dataset/VisualizationPreview.tsx
- Framework: Next.js 15 with App Router
- Language: TypeScript
- UI: React, Tailwind CSS, and shared component primitives
- Localization: next-intl
- Data: CKAN API through the PortalJS data layer
- Testing: Cypress and axe-based accessibility checks
npm run dev- start the development servernpm run build- create a production buildnpm run start- run the production servernpm run routes:gen- generate localized routesnpm run cy:run- run Cypress testsnpm run test:e2e- build, start, and run the full E2E suite
This starter can be deployed on any platform that supports Next.js.
- Push the repository to GitHub
- Connect it on vercel.com
- Add the required environment variables
- Deploy
This starter also works on:
- Netlify
- Cloudflare Pages
- Docker-based hosting
- Your own server with
npm run build && npm run start
Contributions are welcome. A good contribution flow is:
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a pull request
This project is licensed under the MIT License.
If you need help with customization, portal design, advanced integrations, or migration from an existing CKAN frontend, contact the PortalJS team.
Built with love by Datopian
Docs • PortalJS Cloud • GitHub