Monorepo for the PEDP public website: a Next.js app (apps/web) and Sanity Studio (apps/studio) for content.
| Path | Description |
|---|---|
apps/web |
Next.js site (App Router) |
apps/studio |
Sanity Content Studio and schema |
Non-technical overview (Studio, live site, draft preview): docs/content-managers.md.
- Install: from the repo root (
website/), runpnpm install. - Run:
pnpm dev— Next.js at http://localhost:3000, Studio at http://localhost:3333. Configure env files first; see Quick start below. - Draft preview on your machine: Draft mode (Sanity preview) in the web app README.
- Node.js — Use the version listed in
.nvmrcat the repo root (pinned Node for this project). Install or switch with nvm (nvm install/nvm use), fnm, or asdf. Supported range is also declared asengines.nodeinpackage.json. See Node.js releases for LTS context. - pnpm — Use the version declared in
package.jsonunderpackageManager(Corepack reads this). Runcorepack enable, thenpnpm installfrom the repo root so your pnpm matches the project. Supported range is underengines.pnpmin the same file. Install pnpm if Corepack is not available.
-
Clone this repository and open a terminal at the repo root (
website/). -
Install dependencies:
pnpm install
-
Environment variables
- Studio: copy
apps/studio/.env.exampletoapps/studio/.envand setSANITY_STUDIO_PROJECT_IDandSANITY_STUDIO_DATASET. - Web (when using Sanity from the app): copy
apps/web/.env.exampletoapps/web/.env.localand fill in values. See the web app README for details. - For access to shared or production values for these variables (tokens, secrets, deployment env), send your request to dev@publicenvirodata.org.
- Studio: copy
-
Start dev servers (Next.js + Studio in parallel):
pnpm dev
- Site: http://localhost:3000
- Studio: http://localhost:3333
Editors can also use the hosted Studio at https://pedp-website.sanity.studio/. See the apps/studio README for more information.
-
Production builds (both apps):
pnpm build
The Next app can show unpublished Sanity content in the browser using Next.js Draft Mode and a secret-gated route. For developers: notes are in the web app README — Draft mode (Sanity preview).
From the repo root, run ESLint and Prettier across apps/*:
| Command | Description |
|---|---|
pnpm lint:all |
ESLint in web + studio |
pnpm lint:fix:all |
ESLint with --fix in both |
pnpm format:all |
Prettier write in both |
pnpm format:check:all |
Prettier check (CI-friendly) |
Per-app commands are in apps/web README and apps/studio README.
See CONTRIBUTING.md for PEDP-wide policies and repo-specific notes (issues, PRs, and tooling).
Copyright (C) 2026 Public Environmental Data Partners (PEDP)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.0.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the LICENSE file for details.