Files
evig/CONTRIBUTING.md
CatoandClaude be2f01859d docs: correct drift — evig host, /opt/evig box paths, email provider, CI smoke target (#573)
- Production host is evig.orangecat.ch everywhere a doc presents the current
  address; revampit.orangecat.ch is the retired 308 redirect.
- Box was renamed /opt/revampit -> /opt/evig (systemd evig-app, evig-cron@*,
  evig-backup, scripts/selfhost-deploy-evig.sh); docs and the Layer B list
  still named the old paths and a deploy script that no longer exists.
- CLAUDE.md claimed auth-smoke/inventory-smoke target the old host; CI now
  defaults PLAYWRIGHT_BASE_URL to evig.orangecat.ch, so the redirect has no
  CI coverage. Say so.
- Local dev DB is the Docker Postgres on 5433, not Neon.
- Email is Resend first (src/config/email.ts), not Listmonk/Brevo.
- README: no "Swiss-compliant donation receipts" while in formation; real
  test layout, eight locales, actual CI jobs.
- CONTRIBUTING / PR template / REVIEW: evig name, pnpm, Node 22.13+,
  messages/ path; no donate link to Revamp-IT.
- ARCHITECTURE_QUICK_START: drop the example that granted staff by e-mail.
- Payment setup docs: canonical webhook URLs plus a note on providers
  configured before the rename.


Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 12:51:27 +02:00

4.3 KiB
Raw Permalink Blame History

Contributing

Thanks for the interest. This document covers the practical workflow for shipping changes to evig.

Ways to contribute

  • Code — fix a bug, ship a feature, refactor, add tests
  • Docs — improve the docs/ index, write a how-to, fix outdated reference material
  • Translation — evig ships in eight locales (de · fr · en · it · es · ja · ko · ru); the message catalogues are in messages/
  • Triage — reproduce bug reports, label issues, close stale ones
  • Design — UI/UX critique, accessibility audit, visual polish (mobile-first matters here)
  • Operations — give hardware or time to evig itself (evig.orangecat.ch); the platform is one part of the org

Prerequisites

  • Node.js 22.13+ (CI and deploy run Node 24)
  • A Postgres instance — start local Docker with pnpm run services:up (port 5433). Production runs on self-hosted Postgres 17 on Hetzner.
  • (Optional, for full feature coverage) Meilisearch, Redis, Resend or Listmonk

Local setup

git clone https://github.com/bitbaum/evig.git
cd evig
cp .env.example .env.local         # fill in DATABASE_URL, AUTH_SECRET, payment + email keys
pnpm install
pnpm run db:migrate                  # apply scripts/db/migrations/*.sql
pnpm run dev                         # Next.js on :3000

The app is a single Next.js 16 application. There is no separate API server, CMS server, or microservice — everything (pages, API routes, admin surface) lives in src/app/. Earlier iterations had a cms-api/ subproject; it is no longer maintained and its files are not part of the dev loop.

Full architecture orientation: docs/ARCHITECTURE_QUICK_START.md. Every package script: docs/COMMANDS.md.

Workflow

Branch naming

<type>/<short-slug> — for example feat/marketplace-shipping-cost, fix/pool-join-race, docs/refresh-readme, refactor/erfassung-pipeline.

Commit messages

Conventional commits. Types we use: feat, fix, refactor, perf, test, docs, chore, deps.

fix(api): pool join — wrap memberCount check + INSERT in FOR UPDATE tx

Lead the body with why, not what — the diff already shows what.

Before opening a PR

pnpm test               # Vitest (7,500+ tests across 500+ suites)
pnpm run lint           # ESLint
pnpm run typecheck      # tsc --noEmit
pnpm run lint:umlauts   # catches ASCII umlaut substitutes in German strings

CI re-runs all of these. PRs blocked by failing CI will not be merged.

Code standards (enforced, not suggested)

These are the rules the codebase actually relies on. Violations either fail CI or break things at runtime — read docs/BEST_PRACTICES.md for the full set.

Rule Why
import { logger } from '@/lib/logger' — never console.log Structured logs with context; console.* is not
Use TABLE_NAMES from @/config/database — never hardcode table strings One source of truth; renaming a table is one diff
Parameterized queries only — never string-concatenate user input SQL injection
Use CONTACT / ORG / LOCATIONS from @/config/org — never hardcode addresses, phones, emails Same SSOT principle, applied to org-level data
Swiss German: ss (not ß), proper ä/ö/ü (never ae/oe/ue) Project locale standard; pnpm run lint:umlauts enforces it
Wrap multi-statement writes in db.transaction(...) with explicit FOR UPDATE when needed Concurrency safety — TOCTOU races cost us real bugs in 2026-Q1
Mobile-first responsive Tailwind, 44×44 minimum tap targets Most users land on phones

Reviewing

Code reviews focus on: correctness, the rules above, test coverage, and whether the change is the simplest thing that solves the problem (no preemptive abstraction). Tone is direct; don't take it personally.

Recognition

Contributors land in GitHub's contributor graph; significant contributions get a callout in release notes. We don't currently maintain a separate CONTRIBUTORS file — git history is the source of truth.

License

By submitting a contribution, you agree it is licensed under the project MIT License.