Second half of #75 on top of the section node (2e96173/784f21d):
- Install gate for section_style CSS (plugin-css.ts): every rule must be
scoped under one of the plugin's own .dt-style-<pluginId>-<styleId>
classes (enforced, not rewritten — grouping at-rules checked inside,
@font-face/@keyframes exempt, statement at-rules rejected); positioning
out of the content flow (anything but static/relative) is rejected as an
overlay vector; "</style" is rejected as a breakout vector for inlined
embedding. Hostile fixtures from the acceptance list are pinned in
plugin-css.test.ts.
- Web: usePondPlugins loads the pond's active plugins once per visit;
SectionStyleSheets links each active style plugin's immutable
styles.css; SectionStyleMenu (toolbar) wraps/restyles/unwraps with a
picker fed from the plugins' i18n titles. Sections show a faint dashed
hint while editing so unstyled (plugin-disabled) sections stay findable.
- PDF export: PluginsService.sectionStyleCssForPond inlines the pond's
active section-style CSS into the Gotenberg HTML, so styled sections
survive the network-isolated render; covered in export.service.db.test.
- Reference plugin packages/plugins/section-styles-basic (callout, info,
warning, colored-box; theme-neutral semi-transparent backgrounds), a
workspace package whose tests validate it against the SDK schema and
whose real files run through the api install gate.
- e2e section-styles.spec.ts: install → wrap → computed background in edit
and read mode → unwrap → neutral fallback after disabling the plugin.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwZ4jR4KFAPvpjWevfUGX1
Prisma models per data-model.md: users (status enum, site-admin flag),
user_identities (password provider now, OIDC later — subject is the
stable user id), sessions (hashed ids), auth_tokens (hashed, single-
use), plus rate_limits and mail_outbox for the upcoming M1 stories.
UsersService creates accounts transactionally with Argon2id-hashed
password identities (OWASP parameters, rehash detection) and maps
uniqueness violations to field-level conflicts. Database-backed suites
run when TEST_DATABASE_URL is set — locally against the dev db, in CI
via a new postgres service container; shared auth schemas (username,
password policy incl. common-password blocklist) ship with tests.
Closes#10
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
apps/api gains Prisma (instance_settings as the first model) with the
initial migration applied automatically at startup via prisma migrate
deploy, a lazy-connecting PrismaService, and GET /api/v1/readyz
reporting named checks (database reachable, migrations applied) with
200/503. DATABASE_URL joins the validated environment schema;
MIGRATE_ON_START=false skips deploys for tests and tooling. An
idempotent seed script and a Compose dev overlay with PostgreSQL
(host port 5434 — 5433 is taken locally) complete the loop.
Closes#3
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
apps/api boots a NestJS application with: Zod-validated environment
configuration (schema in @dorfteich/shared, fails fast listing every
invalid variable), structured pino request logging via nestjs-pino
(pretty in development, JSON otherwise, auth headers redacted), a
global exception filter producing the uniform ApiErrorBody shape, and
GET /api/v1/healthz. Vitest runs Nest through SWC for decorator
metadata; supertest covers healthz and the 404 error shape.
Closes#2
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pnpm workspace with apps/web, apps/api, apps/collab, and
packages/shared; strict TypeScript base config, repo-wide ESLint (flat)
+ Prettier, Vitest per package, and root scripts lint/typecheck/test/
build. @dorfteich/shared ships a first health-response helper consumed
by apps/api to prove workspace linking. Existing markdown docs are
reformatted once by the new Prettier setup.
Closes#1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>