Docs menu

Docs Under the hood1.6.0

Packages and rules in full

AGENTS.md at the root holds what an agent or a contributor needs on every task. This page is its long form: where each part of the code lives, and the full text of the six non-negotiables. A check (scripts/repo-checks.test.mjs) keeps the package list complete. The walk through one edit is the Architecture tour; the reference is Architecture.

On this page

The six non-negotiables#

  1. Specs before behavior. Behavior changes start as an OpenSpec change (openspec/changes/<name>/). Use /opsx:propose, /opsx:apply, /opsx:archive. Live specs are in openspec/specs/. Validate with make openspec-validate (the OpenSpec CLI at the exact version pinned in the Makefile). The docs build turns ROADMAP.md's milestone tables and the change folders into docs/roadmap.md: after ticking tasks, archiving a change or editing ROADMAP.md, run make docs (the docs check fails on a stale page).
  2. All data writes go through ops. Membership is never an op; REST writes use ApplyStrict and wake devices with NotifyApplied. Never write task/project rows directly (internal/writepaths, a test-only package, fails on Apply or SQL writes to the synced tables outside internal/sync unless allow-listed with a reason). Server: internal/sync. Client: web/src/lib/ops.ts → mutate().
  3. Op schema is additive. A field is declared once, in internal/sync/ops.go Schema: its kind, its row default (JSON) and Content: true for user-written text, with a comment that becomes its documentation. UPDATE_OP_SCHEMA=1 go test ./internal/sync -run TestGeneratedOpSchema then writes web/src/generated/opSchema.ts (the field types every entity type in web/src/lib/types.ts extends, the row defaults ops.ts uses, checked against those types, and CONTENT_FIELDS), internal/e2ee/contentfields.go and the contract fixture; go test fails while they are stale. Narrow a field's type in types.ts only when the kind is wider than the client needs. Never rename or remove a field without a design doc. Server features that show content use e2ee.Display/IsCiphertext and degrade explicitly.
  4. Auth required by default. Every route is registered through the policy wrapper routes.handle(pattern, policy, handler) in internal/httpapi/policy.go with one declared policy (signedIn, ownerOnly, adminsOnly, or public("reason") only when a spec says so; modifiers .credential(), .recent(), .sensitive(), .sessionOnly(), .fullTokens(), .demoDenied()); never call ServeMux.Handle directly, policy_test.go fails on it. A route package under internal/httpapi/ (speech, maproutes, davroutes) gets an httpx.Router and registers with the same policies from internal/httpapi/httpx (the policy type, the JSON envelope and body helpers, the caller of a request). Routes that could be abused on a public demo instance (outbound requests, credentials, settings, members, bulk writes) get .demoDenied() and a matching entry in the deny list in internal/httpapi/demo.go (the test checks both agree). API tokens have a scope full|read|agent|admin|app (side tables api_token_scopes, api_token_agent, api_token_admin, api_token_app): read tokens are refused on writes and /api/v1/sync; agent tokens write only through the agent content routes and MCP write tools; admin tokens can do what full can plus the credential and administration routes (second factor, passkeys, tokens, app passwords, user administration, SSO and secret-holding settings, encryption key record), which refuse full tokens. Admin tokens are created only from a recently confirmed session. app tokens are the OpenTodo app's access tokens, minted only by the app sign-in exchange (internal/mcpoauth/app.go, internal/httpapi/app_sign_in.go), and act as full.
  5. No telemetry, no third-party network calls by default except maps, no new mandatory env vars. Outbound requests go only to targets the operator or a user configured (webhooks, backup destinations, push services, the OIDC issuer, the SMTP server, the IMAP mailbox, assistant model providers, the speech-to-text service, calendar subscriptions, issue connection hosts), and, while maps are on, to the map provider: OpenStreetMap-based by default (OpenFreeMap tiles, Photon search), changeable or turned off by the owner, always through the server's map proxy (internal/maps) with no account data. Addresses a person typed go through internal/outbound.
  6. Keep it small, use what helps. A dependency is welcome when it makes our code simpler or smaller; no approval is needed first. Hard limits: an AGPL-3.0-compatible licence, no network calls of its own (rule 5), and the web app's first-load gzip budget (web/bundle-budget.json, checked by make bundle-budget and the Web build job): load new code lazily, or raise the budget on purpose and say why. The pull request names the dependency, what it replaces and the bundle / binary size impact; one used in auth, encryption or sync code gets a security read.

Where things are#

  • Server core: cmd/opentodo entry point (cmd/ot is the CLI, internal/cli: profiles, REST calls, table and --json output); internal/config env (OPENTODO_*, nothing mandatory); internal/store SQLite + embedded migrations (internal/store/migrations/NNNN_*.sql, applied by PRAGMA user_version), one writer connection plus a query-only reader pool (store.OpenReader, installed with sync.Service.SetReader): pure reads may use the reader, anything that reads then writes in one transaction stays on the writer; tests get a migrated database from internal/store/storetest (OpenDir, a copy of one template migrated per test process) instead of migrating a new one, unless they test the migrations; internal/tenant builds one server around one data directory (database and lock, services, notifier, HTTP handler, background jobs); internal/tenant/services is the composition root: services.Build constructs, seeds and wires every service into a services.Set, and httpapi.New(set, web) only registers routes over it (no service is built or seeded while routes register; httpapi tests build their servers through it too); internal/host optionally serves many tenants from one process (registry, host-name routing, lazy open and idle close, one scheduler, per-tenant limits, the operator interface; only built with OPENTODO_HOST_URL); internal/jobs the one model of background work (OpenSpec one-job-model): a job is Job{Name, Next, Run} (when it is next due, what to run), tenant.Jobs builds a tenant's list once and both a self-hosted server (jobs.Runner, only in the process holding the jobs lock) and the host scheduler run it; services report new work through the tenant's jobs.Signal (Wake a job, Changed after every commit), Upkeep is maintenance due only after a change; a new kind of background work is a new entry in internal/tenant/jobs.go, never a goroutine of its own; internal/ratelimit keeps the rate limits and agent limits across restarts (checks in memory; a Store per tenant writes the changed windows to limit_windows through the limits job and on close, keys hashed with a per-database salt; a new limiter in internal/httpapi is s.limit(name, n, window)); internal/sync op log + LWW + materialized reads, sharing scopes (scope.go) and membership (members.go); internal/httpapi router/handlers/middleware (route policies in policy.go, demo deny list in demo.go); internal/web embeds internal/web/dist; internal/ids UUIDs, name-based ids and random secrets; internal/daypart a task's part of the day (day-parts: Evening is the evening flag, Morning and Afternoon day_part; the one reading and the write pairing of REST, CalDAV, the agent tools, the CLI and the vault, like web/src/lib/dayParts.ts); internal/textutil small string helpers (Truncate: a byte limit cut on a character boundary, for every stored name or message); internal/themes the theme document validator (Validate, Migrate; the same accepted and refused documents and codes as web/src/lib/theme/format.ts, shared examples in internal/themes/testdata/; the derivation and applying are client-only in web/src/lib/theme/); internal/iconset the server's copy of the icon catalogue (names.json generated by scripts/icons-sync.mjs from web/src/ui/icons/catalogue.json, checked by a test; Valid is the one icon check of REST and MCP writes, sync accepts unknown names).
  • Accounts and security: internal/auth users/sessions/tokens and their scopes, invitations, TOTP and recovery codes, passkey storage, provider identities, CalDAV app passwords (internal/auth/apppasswords.go); internal/webauthn passkey verification (clientDataJSON, authenticator data, COSE keys; internal/webauthn/testauth is a synthetic authenticator for tests); internal/oidc single sign-on (discovery, PKCE, ID-token verification, OPENTODO_OIDC_* overrides; internal/oidc/oidctest is an in-process provider for tests); internal/audit the closed catalogue of security events (typed constructors, an allow-list for details so task content never reaches the log, NDJSON export, retention); internal/e2ee end-to-end encryption helpers (content field list, ciphertext detection, key-record store; no crypto on the server; client in web/src/lib/crypto.ts, e2ee.ts, e2eeSync.ts; internal/e2ee/crypt is the same format for the ot CLI only, for ot encryption and ot mcp --decrypt, pinned by the shared vectors and never linked into the server); internal/websign the signed web app's file list (app-manifest.json: envelope, ECDSA P-256 verify, fingerprints, version order, the file check; the official keys and the report-only switch in internal/websign/release-keys.json; the worker's side in web/src/lib/appCode.ts, pinned by shared vectors; signing is internal/websign/sign, linked only by cmd/websign (keygen, sign, verify), never by the server; OpenSpec signed-web-app); internal/outbound the policy for every request to an address a user or the owner typed (http(s) only, no private network targets unless the owner allows them, the connection pinned to the checked address; used by webhooks, and through their client by push and the assistant, and by calendar subscriptions and issue connections); internal/demo the public demo instance (OPENTODO_DEMO=true: a hidden owner, a private short-lived sandbox per visitor seeded through the op log, the nightly reset; HTTP side in internal/httpapi/demo.go).
  • Features: internal/settings owner settings, the owner on/off switches (settings.Switch: cached, a default, an optional environment override; every switch's GET/PUT routes and 404 gate come from internal/httpapi/switch.go) and secrets files; internal/backup snapshots, archives, destinations, scheduler, restore; internal/push VAPID keys, RFC 8291 encryption, subscriptions and the reminder scheduler (service worker side in web/public/push-sw.js); internal/notify notification sinks (in-app inbox; new event kinds go through optional sink interfaces such as notify.MentionSink); internal/channels a person's delivery channels (ntfy, Pushover, Gotify, a signed webhook: a notify sink plus a reminder-scheduler hook queue one message per channel and firing, one worker through internal/outbound with the webhooks' retries, owner switch notifications.channels, secrets in <data>/secrets/notification-channels.json; routes in internal/httpapi/channels.go); internal/activity derives activity events from ops and must match web/src/lib/activity.ts (shared fixture internal/activity/testdata/activity_fixture.json); internal/webhook signed outbound notifications for task and project events (derived from committed batches, durable queue in SQLite, one worker with retries, SSRF-safe client); internal/deliveryq the queue machinery webhooks and notification channels share (parallel pass, log pruning, next-due times; each queue keeps its send and its outcome recording, the retry schedule is webhook.Backoff); internal/poll the bounded pass shared by the calendar feed and issue connection pollers; internal/compaction the notes compaction job (superseded notes_doc and thinned description ops older than 30 days via sync.CompactNotes, whose field table sync.CompactFields a new document field joins; incremental vacuum, the one-time conversion of an older database, the report behind GET /api/v1/settings/storage); internal/caldav iCalendar/VTODO mapping and WebDAV XML (the /dav/ endpoint in internal/httpapi/davroutes, app passwords and the switch in internal/httpapi/caldav.go, writes via ApplyStrict with device caldav:<app-password-id>; internal/caldav/capture is a command that turns a client's request log into sanitised fixtures for docs/caldav-verification.md and is never linked into the server); internal/davpush push to calendar apps (WebDAV-Push subscriptions of CalDAV clients in dav_push_subscriptions, never an op; the job that pushes a subscribed calendar's change through push.Service.SendMessage, at most once per subscription every 30 seconds, behind the owner switch caldav.push; the draft's XML in internal/caldav/push.go, registration and the changes it reads in internal/httpapi/davroutes/push.go); internal/calfeed calendar feeds (other people's calendars read into read-only events, the user's tasks written as a calendar); internal/issues issue import (per-user GitHub and GitLab connections behind the owner switch integrations.issues, tokens in <data>/secrets/issues.json, REST clients on internal/outbound without redirects, a poller on the jobs leader that turns open assigned issues into tasks and makes them follow the issue via ApplyStrict with device issues:<connection-id>, never writing back; routes in internal/httpapi/issues*.go); internal/calsync calendar sync (a user's own CalDAV, Google or Microsoft calendar as the target of their dated tasks as events and the source of changes back: per-user connections behind the owner switch calendar_sync.enabled, passwords, refresh tokens and the Google and Microsoft client secrets in <data>/secrets/calendar-sync.json, one transport interface under the cycle: a WebDAV client on internal/outbound with discovery, sync-collection and conditional writes, and a Microsoft Graph client (calendarView/delta cursors in calsync_cursors, an extended property marking OpenTodo's events, If-Match), a cycle on the jobs leader that pulls before it pushes and writes via ApplyStrict with device calsync:<connection-id>, the connected calendars' events stored as managed calendar subscriptions; internal/calsync/calsynctest is an in-process CalDAV server and internal/calsync/graphtest an in-process Microsoft sign-in and Graph for tests; routes in internal/httpapi/calsync*.go); internal/syncscope the part of an account a calendar sync connection or a CalDAV app password covers (all, only or except chosen workspaces, projects and Inboxes; stored in a side table of the connection or the password, never an op; CalDAV hides calendars outside it and calendar sync gets its feed from the same view, davroutes.FeedTasksIn); internal/email email to task (optional IMAP polling of one operator mailbox via OPENTODO_EMAIL_*, stdlib MIME and IMAP, per-user secret sub-addresses, Message-ID receipts; tasks via ApplyStrict with device server); internal/stt speech to text (the owner's OpenAI-compatible transcription service, OPENTODO_STT_*, key in <data>/secrets/stt.json, requests through internal/outbound, audio and text in memory only; routes in the route package internal/httpapi/speech); internal/mail optional outgoing email (owner SMTP configuration with OPENTODO_SMTP_* overrides, stdlib transport with an explicit TLS policy, plain-text templates in eight languages, sending limits; every message goes through Service.Send; internal/mail/smtptest is an in-process SMTP server for tests); internal/digest the opt-in weekly email digest (per-user settings, scheduler on the jobs leader, content from materialized rows); internal/ruleval automation rule values and the condition matcher (a leaf package internal/sync uses; shared vectors web/src/lib/rules/match.vectors.json); internal/rules the automation rules engine (planner sharing web/src/lib/rules/plan.fixture.json, observer, durable queue, worker with limits and loop depth, minute scheduler for time triggers, run log, the automations.enabled switch with OPENTODO_AUTOMATIONS; writes via ApplyStrict with device rule:<rule-id>; routes in internal/httpapi/rules.go); internal/importer own export, CSV and other apps' exports into ops (profiles to rows, planner, background jobs with undo, device import; internal/importer/sanitize is a command that turns a real export into a test fixture and is never linked into the server); internal/blobs attachment bytes as immutable files under <data>/attachments/ (size and SHA-256 checked, streamed, never read whole); internal/location a task's location and a saved location's coordinates (validation for every write path); internal/templatelib the template library on the server (library.json, the same compiled file as web/src/generated/templates.json, both written by make templates; read by a routine's Create a project from a template step); internal/imgfit scaling of the images the server stores (a provider's profile picture, the owner's logo: centre crop, box-filter downscale, padding for maskable icons; standard library only); internal/maps the map proxy (owner switch and OPENTODO_MAPS* overrides, the provider's style rewritten to the server's own routes, tiles, fonts and sprites cached under <data>/cache/maps, Photon search; routes in internal/httpapi/maproutes; client in web/src/lib/locations.ts and web/src/app/locations/, MapLibre GL loaded lazily).
  • AI agents: internal/agenttools the one registry of tools an AI agent can call (definitions, argument validation, planning into change sets, untrusted-text marking, write limits, the write permission gate, agent.write audit, the per-user "Allow AI assistants to make changes" switch in user_agent_access); internal/mcp the MCP server over that registry: read tools and read-only opentodo:// resources behind the owner toggle mcp.enabled, and write tools only when the owner's mcp.writes switch and the user's switch are on and the caller uses an agent token (writes via ApplyStrict with device agent:<token-id>; transport in internal/httpapi/mcp.go); internal/mcpoauth the OAuth 2.1 authorization server that lets an app like Gemini reach that endpoint (registered clients, single-use authorization codes, grants whose refresh token never rotates, the PKCE check, scopes read and agent; endpoints in internal/httpapi/mcp_oauth.go, the access token minted through internal/auth); internal/relay the device relay for encrypted accounts (opt-in devices bound to their session in relay_devices, an in-memory hub that sends sealed decrypt and encrypt requests over each device's own stream and enforces the relay limits; never stores or logs a relayed value; routes in internal/httpapi/relay.go, the agenttools hook in agenttools/relay.go, the device side in web/src/lib/relay.ts); internal/assistant the in-app assistant (owner configuration and provider keys, per-user consent and token usage, the Anthropic SDK and one stdlib Chat Completions adapter, an agent loop that runs read tools and plans write tools but never writes: the browser shows the proposed change set and applies the confirmed part through mutateMany with device assistant:<device-id>).
  • Go ports of web logic, each pinned by shared vectors (all of them, with their fixtures and tests: docs/contracts.md): internal/recurrence (web/src/lib/recurrence.ts; Compatible, like compatibleRule, is the form every writer stores: the one 1.0 reads when it means the same thing; internal/recurrence/recurrence10 is the frozen 1.0.0 rule grammar and Check, test-only like web/src/lib/testdata/check10.ts, which the writers' tests run their rules through), internal/zoned time-zone-fixed due values (web/src/lib/dates.ts) and the one Windows→IANA zone table (windowszones.go, generated from CLDR by scripts/windows-zones.mjs; used by the importers and calendar feeds), internal/inbox Inbox membership: no project and not scheduled (web/src/lib/inbox.ts; used by the agent tools, the MCP views and the CLI), internal/sector time sectors: a task's week, month or quarter, its relative name, carry-over and planning group (web/src/lib/sectors.ts; validates every write path and is used by the agent tools and the CLI), internal/notesearch note search: matching, ranking and snippets over a note's Markdown (web/src/lib/noteSearch.ts; used by the note agent tools and ot notes search), internal/notelinks the internal link grammar of a note's Markdown: [title](?note=<id>), ?task=, ?project=, outside code (web/src/lib/noteLinkGrammar.ts; used by MCP get_note/get_task links and linked_from on plaintext accounts, ot notes links and the perf fixture), internal/reuse reusable lists: title normalization, the matched item and the duplicate losers (web/src/lib/reusable.ts; used by POST /api/v1/tasks with reuse and create_tasks), internal/flow project flows and the one "available task" rule (web/src/lib/flow.ts; used by the method views, Today, the available filter, the agent tools, the digest and the CLI), internal/frames calendar frame occurrences (web/src/lib/frames.ts; used by the frames routes and list_frames), internal/freetime free time: the working day minus calendar events, frames, slots and timed tasks (web/src/lib/freeTime.ts; used by find_free_time, its device twin and the free time block), internal/closedlist Today's closed list: the slot fill of the Today limit (web/src/lib/closedList.ts; used by today_summary and ot today), internal/habits habit numbers: scheduled dates, day states, kept, strength, streaks, at risk and back on track, the views of list_habits, get_habit and the habits route, and the log planner of log_habit (web/src/lib/habits.ts, habitLog.ts; used by the habit tools, the habits route, ot habits and the routine steps), internal/urgency the urgency score of the urgency order (web/src/lib/urgency.ts; used by list_tasks with sort: urgency and ot list --sort urgency), internal/defaultreminder the default reminder a task gets with its first due date (web/src/lib/defaultReminder.ts, applied by mutateMany; on the server by the REST task routes with ?default_reminder=true and the agent write tools, never by CalDAV, imports, sync connectors, rules or email), internal/filter the filter query parser and evaluator (validates saved views; evaluates a routine's Find tasks, web/src/lib/filter/evaluate.ts, vectors evaluate.vectors.json), internal/quickadd the quick-add parser (web/src/lib/nlp; used by the CLI; the importer keeps its own Todoist date reader, whose rules differ), internal/origin a task's origin: validation of task.origin and recognition of issue links (web/src/lib/taskOrigin.ts; used by sync, the CLI, the agent tools, the importers and email), internal/timetrack tracked time: the one-running-entry rule and its repair, minutes, the day an entry belongs to, typed durations and the CSV export (web/src/lib/time.ts, fixtures in internal/timetrack/testdata; used by the time entry routes, the agent tools, the filter parser and the CLI).
  • web/ Vite + React 19 + Tailwind 4 + Dexie. src/lib data layer (db, ops, sync, hlc, api, dates; a module the native app shares (the import graph of sync and ops, scripts/shared-graph.mjs, listed in mobile/app/shared-modules.json) reaches the host only through the platform port src/lib/platform.ts, never a browser global, checked by scripts/shared-boundary.mjs), src/app UI, src/ui shared building blocks (Icon, Button, Field, Switch, Menu items, Combobox, Card, Badge, Avatar, Tabs, patterns; each with stories). Tests: *.test.ts with vitest + fake-indexeddb; interaction tests opt into // @vitest-environment happy-dom and wait for conditions with waitFor from src/ui/test-utils, never a fixed time (eslint test-hygiene/no-fixed-wait).
  • internal/perfseed the 10,000-task account of the performance budgets (performance-budgets, docs/performance.md): cmd/perfseed builds it from a fixed seed through the op log (device perfseed), plain or encrypted, with a summary of counts and ids; a test keeps it out of the server, and its tests are the server's count checks at 10,000 tasks. internal/perf is the server half of the nightly time benchmark (-tags perf; make perf, scripts/perf/run.sh, the browser half in scripts/perf/run.mjs, the limits in scripts/perf/budgets.json, kept equal to docs/performance.md by a repo check). The web app marks ot:list-ready, ot:search-results, ot:sync-idle and ot:remote-applied in the browser's performance timeline only (web/src/lib/perfMarks.ts).
  • internal/vault the Markdown vault behind ot vault (CLI only, like internal/e2ee/crypt; a test keeps it out of the server): the Obsidian Tasks line grammar, the document parser and printer, the state file <dir>/.opentodo/state.json, the three-way merge per field and the sync loop over POST /api/v1/sync with device vault:<id>; fixture vault in internal/vault/testdata/vault/, pinned by docs/vault.md.
  • extension/ browser capture extension (MV3, plain JS: a popup with Capture screen and Quick save modes; api.js is its only network code; make extension builds the Chrome and Firefox packages from manifest.src.json).
  • obsidian/ the Obsidian community plugin (obsidian-plugin: TypeScript, desktop and mobile, no runtime dependency): send a line or a selection as tasks through the push-only sync exchange (device obsidian:<install id>, the per-device outbox, the token in Obsidian's per-device storage), bundling the quick-add parser, web/src/lib/e2eeEnvelope.ts/crypto.ts and hlc.ts with web's i18n replaced by obsidian/src/shims/i18n.ts; src/vault/line.ts is the TypeScript twin of the vault's line grammar (internal/vault/testdata/lines.vectors.json); strings in obsidian/locales/ (checked by make i18n-check); make obsidian (type-check, tests with web's vitest, build with a 250 KB budget), make obsidian-e2e; each release is pushed to OpenTodoApp/obsidian-opentodo (obsidian/scripts/mirror.mjs).
  • mobile/ native shells (native-shells): mobile/android the Android app (Kotlin, one Gradle module, AndroidX only, loads the web app from the configured server and talks to it through the bridge in web/src/lib/shell.ts; make android runs its tests, lint and checks and builds a debug APK; needs a JDK and the Android SDK; mobile/README.md); its store listing is fastlane/metadata/android/ at the root, where F-Droid reads it (fastlane/README.md).
  • internal/codesize a test-only package that keeps functions under 150 lines and files under 1,100 (see Conventions).
  • docs/ architecture, sync protocol, API, self-hosting. ROADMAP.md maps features to change names.

Conventions#

The working habits AGENTS.md points to, in full.

Commands. make dev runs the API on :8080 and Vite on :5173; make check is what CI runs; go test ./...; cd web && npm test && npm run build. Build the web app before go build or tests that import internal/web (make web); internal/web/dist/.gitkeep keeps the embed compiling on a fresh clone. A manual smoke test: ./bin/opentodo, then open http://localhost:8080; the first visit creates the owner account. The in-app help web/src/generated/help.json is generated and ignored by git: npm run help builds it from docs/ and runs first in npm run build, dev, test, typecheck and the Storybook scripts. Never commit it; after editing docs run make docs (the roadmap and keyboard guides, which stay committed) and make docs-check. The changelog takes one fragment per change, changelog.d/<Section>/<name>.md (Section: Added, Changed, Fixed, Security or Removed; name: the OpenSpec change name or a short slug; content: the entry's bullet in the CHANGELOG style), never an edit of CHANGELOG.md under ## [Unreleased]; make release-prepare assembles and deletes them, and make repo-check refuses a misplaced fragment or an entry under Unreleased (changelog.d/README.md).

Go. Time in internal/httpapi request logic is s.now() and in internal/auth s.clock(), never time.Now(); tests pin or step it with httpapi.WithClock, which also sets the auth and sync clocks (the httpapi test env exposes it as e.now). The stdlib net/http mux with method patterns, the JSON error envelope {error:{code,message}}, slog logging, errors wrapped with context. Functions stay under 150 lines and files under 1,100 (internal/codesize). HTTP handlers live by area in internal/httpapi: router.go registers every route, then middleware.go, auth_handlers.go, collections.go, sync_handlers.go, and so on.

TypeScript. Strict, function components, Tailwind classes, data access only through src/lib. Custom CSS classes live in @layer components so utilities can override them.

Design. Colours, type, radius, elevation and motion come from the tokens in web/src/index.css: no raw palette classes or hex in web/src/ui. Shared UI is built and checked in the Storybook workbench (make storybook, make ui-check). Screens use primitives from web/src/ui, never emoji or glyphs as icons (<Icon>, enforced by make ui-lint), and choose entities (people, labels, projects, tasks) with the Combobox. See the design system.

Docs. Front matter in docs/ is YAML parsed by both GitHub and web/scripts/docs/lib.mjs: double-quote scalar values (such as summary) that contain : or end in : (make docs-check enforces this).

Data. due is a floating {date: "YYYY-MM-DD", time?: "HH:MM"}; timestamps are Unix milliseconds. Priority 1 is the highest and 4 the default and lowest. Deletion is a tombstone (deleted_at): lists filter it out, the export includes it.

Edit this page on GitHub