Kodeworks.no repository is structured as a monorepo.
Turborepo and npm Workspaces is used to handle monorepo features.
See turbo.json and package.json.
Dependencies are hoisted with single root lockfile package-lock.json.
web workspace is a NextJS app that serves kodeworks.no, see NEXT.js.
studio workspace is a Sanity Studio application and is the CMS behind kodeworks.no, see Sanity Studio.
Web is deployed and hosted with Vercel, while Studio uses Sanity's own deployment and hosting.
See .nvmrc for recommended node version.
Install dependencies (in root directory of the repository):
npm installRun local dev servers of Web and Studio simulatneously from root directory:
npm run devServer starts at http://localhost:3000 for web and http://localhost:3333/ for studio.
Build web:
npm run build:webBuild web and studio:
npm run buildValidate Sanity documents against a specific dataset:
npm run studio:validate:development
npm run studio:validate:productionDeployment is handled automatically by Vercel listening to webhooks from Github.
Commits to feature branch with a Pull Request are deployed to preview environment.
Commits to master are deployed to production environment.
Vercel runtime should use Node.js 24.
Sanity studio currently have to be deployed manually. In the root directory, run:
npm run studio:deploySome images used across the site has been found at https://unsplash.com/.