Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
This file provides guidance to agentic coding tools when working with code in this repository.

## Design principle: delight

The UI must be delightful, with FigJam as the bar: considered typography, micro-interactions, and lots of small details (how a card lifts when picked up, how a live update lands, how a push confirms). Treat polish as a feature, not a follow-up. Respect `prefers-reduced-motion`, and keep interactions at 60fps.

## Repository Structure

Tack: a GitHub-native collaborative whiteboard for open source planning, built as a Cloudflare Worker with Vite+ and the Cloudflare Vite plugin.

- `src/index.ts` — the Worker entrypoint
- `src/index.ts` — the Worker entrypoint: webhook route, partyserver routing, DO exports
- `src/server/board.ts` — `Board` Durable Object (one per board): Yjs document via y-partyserver, live card relay via custom messages
- `src/server/repo.ts` — `Repo` Durable Object (one per repository): card cache, board subscriptions, webhook log and fan-out
- `src/server/forges/` — forge adapters (GitHub, plus a synthetic `fake.tack` forge for tests and stress boards): fetching items, verifying and normalising webhooks, capabilities. Everything outside this folder is forge-neutral
- `src/server/webhooks.ts` — `POST /webhooks/:forge` routing
- `src/shared/` — forge-neutral item keys (`{host}/{repo}{#|!}{n}`, see `refs.ts`), card types and the Yjs shape schema, used by both server and client
- `src/client/` — React + React Flow canvas (own `tsconfig.json` with DOM types); `index.html` at the repo root is its entry
- `src/client/play/` — dev-only UI workbench, left out of production builds: `/play` runs a board entirely in the browser with simulated people (own Y.Doc + Awareness each) and simulated forge events, plus slow-motion and reduced-motion toggles; `/play/cards` is a gallery of every card state. Use these to iterate on interaction details
- `src/client/styles.css` — design tokens, including motion: every duration is scaled by `--motion`, so slow motion and reduced motion apply everywhere. Use the spring easings (`--ease-spring`, `--ease-settle`) rather than ad hoc curves
- `scripts/send-webhook.ts` — send a signed webhook to a local dev server (reads `GITHUB_WEBHOOK_SECRET` from `.dev.vars`)
- `docs/spike.md` — spike findings: performance, Yjs growth, design decisions
- `test/` — Vitest tests, run inside workerd via `@cloudflare/vitest-plugin`
- `cloudflare.config.ts` — Worker configuration (the experimental `cf`-CLI-native format; there is no wrangler.jsonc)
- `compatibility.ts` — compatibility date/flags, shared between the Worker config and the test runtime
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Matt Kane

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 15 additions & 1 deletion cloudflare.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorker } from "@cloudflare/vite-plugin/experimental-config";
import { bindings, defineWorker, exports } from "@cloudflare/vite-plugin/experimental-config";
import { compatibilityDate, compatibilityFlags } from "./compatibility.ts";
import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };

Expand All @@ -7,6 +7,20 @@ export default defineWorker({
entrypoint,
compatibilityDate,
compatibilityFlags,
assets: {
notFoundHandling: "single-page-application",
runWorkerFirst: ["/parties/*", "/webhooks/*", "/api/*"],
},
env: {
Board: bindings.durableObject({ workerName: "tack", exportName: "Board" }),
Repo: bindings.durableObject({ workerName: "tack", exportName: "Repo" }),
GITHUB_WEBHOOK_SECRET: bindings.secret(),
GITHUB_TOKEN: bindings.secret(),
},
exports: {
Board: exports.durableObject({ storage: "sqlite" }),
Repo: exports.durableObject({ storage: "sqlite" }),
},
observability: {
enabled: true,
},
Expand Down
Loading
Loading