Skip to content

Development

Inboxora docs edited this page Sep 12, 2026 · 4 revisions

Development

This page is for people building, testing or documenting Inboxora. The README is deliberately short; this Wiki is the product and operational knowledge base.

Requirements

  • Node 22 (frontend/.nvmrc pins the version).
  • Docker only if you want to run the full stack.
  • Chromium for browser tests: npx playwright install chromium.

Repository layout

Path Contents
backend/ Express API, IMAP/SMTP sync, conversation engine, CalDAV/CardDAV servers, SQL migrations.
frontend/ React application, shared UI primitives, Playwright specs and visual references.
docs/wiki/ Reviewed source of this Wiki.
docs/CHANGELOG.md Release-level change log.
media/screenshots/ Screenshots of the running application, regenerated by CI.
scripts/ Operational scripts, including Wiki publication and screenshot verification.

Local checks

Run these before pushing; CI runs the same commands.

# frontend
cd frontend
npm ci
npm test          # node:test unit suite
npm run lint
npm run build

# backend
cd backend
npm ci
npm test
npm run lint

Browser tests

Playwright drives the real application. The default run uses mocked API fixtures and is deterministic:

cd frontend
npm run test:e2e

Projects cover desktop (1440×900), tablet (1024×768), phone (390×844 and 412×915) and phone landscape (915×412). Visual references are committed under frontend/e2e/v3-interface.spec.js-snapshots/ and CI only compares them — it never updates them. Regenerate deliberately and review the images in the diff:

npx playwright test e2e/v3-interface.spec.js --update-snapshots

A separate live-backend spec runs with a provisioned PostgreSQL and Redis:

PLAYWRIGHT_REAL_APP=1 PLAYWRIGHT_WEB_SERVER_COMMAND="..." npx playwright test e2e/real-app.spec.js

Browser gates run for pull requests to both dev and main.

Documentation screenshots

The images in the README and this Wiki come from the application itself. The generator is frontend/e2e/docs-screenshots.spec.js plus its demo dataset frontend/e2e/docs-demo.js; it is opt-in and never runs in the regular gate:

cd frontend
npm run build            # the spec drives `vite preview`, which serves dist/
npm run docs:screenshots

It writes *-desktop.png (1440×900) and *-mobile.png (390×844) into media/screenshots/.

Every capture is verified before it is written. assertDocsPresentation fails the run unless the page shows the shared documentation theme, the unified inbox entry point, and real content: a populated message list, a rendered message body, or the module content the capture declares (for example the month grid with a known event). That is what keeps the gallery consistent and stops an empty or unstyled screenshot from being published.

.github/workflows/docs-screenshots.yml owns this set:

  • on a pull request or a push it regenerates the images and fails if the committed ones are stale, so a screenshot can never silently describe an interface that no longer exists;
  • dispatched manually it regenerates and commits the result back to the branch;
  • it uploads the generated set as an artifact either way.

scripts/verify-docs-screenshots.mjs runs after the spec and checks that every image referenced by the README or a Wiki page exists, that no committed image is orphaned, that both viewports are present, and that each file is a real PNG of plausible size.

The Wiki links images through absolute raw.githubusercontent.com URLs pointing at main; scripts/publish-wiki.sh can retarget those URLs when publishing from another branch.

Keeping the branch clean

This branch carries product documentation, not development archaeology. Dated investigation reports, audit notes and one-off regression scripts do not belong in the tree — their findings go into the relevant Wiki page, into docs/CHANGELOG.md, or into the commit message that fixed the issue. Git history keeps the full record.

Documentation policy

  • docs/wiki/ is the reviewed source of the Wiki. Any user-visible behaviour, configuration or troubleshooting change must update the relevant page in the same change set.
  • Pages use relative links such as [Calendar](Calendar). The publication script rewrites them to Wiki page names, so keep internal links relative and free of paths.
  • Cross-check a claim against the behaviour first; the Wiki is documentation, not a wish list. If something is not implemented, say so explicitly (for example: no scheduled send, no automatic spam classifier, no backup/restore).
  • Publish the Wiki with scripts/publish-wiki.sh after a release, once the reviewed pages are on the released branch.

Interface conventions

  • The default interface uses Ink in the light appearance and Dark ink in the dark appearance, with self-hosted DM Sans, Fraunces and JetBrains Mono. Each appearance has its own default theme and the mode can follow the system; a single theme chosen before separate defaults existed is kept as an explicit choice for its tone, so a preference is never silently reset.
  • Shared controls live in ui.jsx / ui.css; Calendar and Contacts have scoped presentation styles; email HTML keeps its own isolated renderer.
  • v3-interface.spec.js checks both behaviour and image references at desktop, tablet and mobile sizes. Fixtures freeze date/time and locale, use synthetic data and wait for self-hosted fonts. See V3 interface for the feature mapping and regression coverage.
  • Keep API responses and file formats compatible: DAV resource names, sync tokens and legacy storage keys are contracts, not implementation details. The retained legacy identifiers are recorded in docs/technical-identifier-audit.md.

Contributing

  • Search the issue tracker first, and discuss larger changes in an issue before implementing them.
  • One concern per pull request; add or update automated tests for behaviour changes.
  • Use concise Conventional Commit subjects, for example fix: handle calendar ETag conflicts.
  • Contributions are accepted under AGPL-3.0-only; see CONTRIBUTING.md.

Clone this wiki locally