The second version of the E&T-dagen website. This time built with Nuxt 3 instead of Django.
NB! You can find further reading materials in the Repository Wiki if the content in this README is not satisfactory
How the code is structured is in ARCHITECTURE.md. Coding agents follow CLAUDE.md, which AGENTS.md points to. Report security problems privately as described in SECURITY.md.
Look at the Nuxt 3 documentation to learn more.
Clone the repository using SSH:
git clone git@github.com:et-dagen/et-dagen.gitInstall dependencies:
# Navigate to the project root
cd ./et-dagen
# Install dependencies
bun installCreate a .env file in the project root by copying the .env.example file:
cp .env.example .env
cp .env.example .env.developmentMissing environment variables in the .env file will be provided by the project manager.
Start the development server on http://localhost:3000
bun run devLocally preview production build:
bun run previewThe same checks CI runs on every pull request can be run locally:
bun run lint # eslint + prettier --check
bun run typecheck # gating typecheck (see tsconfig.typecheck.json)
bun run test # vitest
bun run build # nuxt buildbun run lintfix fixes most lint and formatting failures in place.
A release moves prod forward to a commit that is already on dev. Digital Ocean App Platform deploys whatever prod points at, so production runs the exact commit CI tested on dev.
- Open Promote to production in the Actions tab and choose Run workflow.
- Leave
refasdevto release the latest commit, or enter a commit SHA fromdevto release an earlier one. - The
verifyjob checks that the commit is ondev, thatprodcan fast-forward to it, and thatlint,typecheck,testandbuildpassed on it. It then opens a Release<commit>issue with the changes being released and the release checklist. - A member of @et-dagen/managers ticks the checklist in that issue, fills in the rollback plan and testing notes, and then approves the
productiondeployment on the workflow run. - The
promotejob fast-forwardsprod, tags the commitrelease-<date>, publishes release notes under Releases, and closes the issue. Digital Ocean then builds and deploys.
Past releases, with their ticked checklists, are the closed issues labelled release. A rejected or failed release closes its issue as not planned.
Follow the deploy in the Digital Ocean control panel.
Rolling back. Redeploy the previous deployment from the Digital Ocean control panel, then fix the problem on dev and release again. Do not push to prod by hand.
If verify says prod cannot fast-forward, prod has a commit that dev lacks, usually from an emergency fix made on prod. Open a pull request from prod into dev and merge it with a merge commit, never a squash, then run the workflow again.
Issues should be created for all new features and bugs. The issue should be assigned to the person who will be working on it. The issue should be labeled with the appropriate label(s).
When deciding to work on a new issue, assign yourself to the issue and move it to the In progress column on the project board.
When opening a branch for the issue, click the Create a branch under Development on the GitHub issue page. Name the branch feature/issue_number-issue-title-in-kebab-case, and select Checkout locally. For example, if the issue number is 42 and the issue title is Add a new page, the branch should be named feature/42-add-a-new-page.
When the issue is completed, create a pull request and assign the pull request to the person who should review it. The issue should be moved to the In review column on the project board.
When the pull request is approved and CI is green, merge it into dev and close the issue.
NB! All branches created working on issues should be branched off of dev.
The project uses a two-branch flow:
dev— the default branch and integration target. All feature work is merged here.prod— production. Only ever moved forward by the Promote to production workflow, which triggers the Digital Ocean deploy.
Both branches are protected: no force-pushes, no deletion, and no merging until CI is green. Nobody pushes to prod directly; only the release workflow can, after a manager approves. A pull request into dev needs one approval, from @et-dagen/managers if it touches .github/workflows/, and a new push dismisses earlier approvals. Feature branches into dev should be squashed.
Branch naming conventions:
feature/issue_number-issue-title-in-kebab-case- A branch for a new feature.docs/...- A branch for documentation.fix/...- A branch for a bug fix.refactor/...- A branch for refactoring.chore/...- A branch for miscellaneous tasks.- More may be added in the future.
Commit messages must follow Conventional Commits. This is enforced, not just recommended — two husky hooks run locally:
pre-commitrunslint-staged, which appliesprettier --writeandeslint --fixto staged files.commit-msgrunscommitlint, which rejects messages that do not parse as Conventional Commits. Allowed types are listed incommitlint.config.mjs.
Because feature branches are squash-merged, the pull request title becomes the commit subject on dev — so it must be conventional too. CI checks this and reports it, without blocking.
- Pull requests should be created for all new features and bugs. The pull request should be assigned to the person who should review it. The pull request should be labeled with the appropriate label(s).
- A pull request cannot be merged until the
lint,typecheck,testandbuildchecks pass.
Write access comes from organisation membership, not from per-person grants on this repository. In practice:
- Organisation members can review and merge into
dev. Every pull request needs one approval from another member. - Members of @et-dagen/managers can additionally approve a release to production, and must approve any pull request that changes
.github/workflows/. - Managers and organisation admins can merge a pull request without the approval, but only explicitly: the "Merge without waiting for requirements" checkbox, or
gh pr merge <n> --admin. Use it when a review is stuck, never on a red build. GitHub logs every bypass under Settings → Rules → Insights. - Everyone else is welcome to fork the repository and open a pull request. Those PRs are automatically labelled
external-contribution, and an approval from an external contributor does not satisfy the branch ruleset.
If you are contributing regularly and keep having to fork, ask an organisation owner to add you to the organisation.
Tests run on Vitest:
bun run test # unit tests, as CI runs them
bun run test:watch # unit tests in watch mode
bun run build && bun run test:api # API tests against the Firebase emulatorsUnit tests cover domain/ and pure server and composable code. Component tests need a Nuxt runtime environment via @nuxt/test-utils, which is not set up yet.
The API tests in tests/api/ send real HTTP requests to the production build, running against the Firebase Auth, Realtime Database and Storage emulators. They pin down what the v1 API does today, so that moving a handler onto the new architecture cannot change its behaviour unnoticed. test:api starts the emulators with a pinned firebase-tools through bunx, which needs Java 21 or newer (brew install --cask temurin@21 on macOS). The emulators use a demo- project, so they never reach a real Firebase project, and the server gets a throwaway key, never the one in your .env. Build first: the tests use whatever is in .output/.
There are two typecheck commands, and the split is deliberate:
bun run typecheckchecks the plain-TypeScript surface (server/,stores/,composables/,middleware/,plugins/, …). It is clean, and CI blocks merges on it.bun run typecheck:fulladditionally checks Vue SFCs withvue-tsc. These carry pre-existing type errors that predate any typechecking in this repo, so it cannot be a plain pass/fail gate yet.
Instead CI runs typecheck:full as a ratchet: it passes while the error count stays at or below the number recorded in .github/typecheck-baseline.txt, and fails only if a change adds errors. When you fix some, lower the baseline to match. When it reaches zero, fold the SFC surface into the gating command and delete the job.