Contributing guide
Thanks for your interest in teemtape — an open-source ticker app for leaving anonymous notes next to stock symbols, built incrementally as a learning project for agentic AI development.
Before you start
Section titled “Before you start”- Read what is teemtape? for status and scope.
- Skim the architecture for the system design and API contract.
- Check the roadmap for what’s planned vs. already built.
- Open an issue to discuss larger changes before a big PR.
Prerequisites
Section titled “Prerequisites”- Node.js 18+ (Node 24 is used in CI).
- npm — this is a workspaces monorepo, so install from the repo root.
- For Worker development:
Wrangler (a dev
dependency in
workers/api).
No Cloudflare account is required for basic local development — the Worker runs locally with in-memory D1/KV, and a dependency-free mock API is available too.
Get the repo running
Section titled “Get the repo running”git clone https://github.com/kiwifellows/teemtape.gitcd teemtapenpm installnpm run buildnpm testSee the local development guide for the two backend options (Worker vs. mock) and how to drive them.
Repository layout
Section titled “Repository layout”teemtape/├── apps/│ ├── web/ # React desktop web app (@teemtape/web)│ └── docs/ # this Astro + Starlight docs site├── packages/│ ├── api-client/ # Shared types + typed HTTP client (@teemtape/api-client)│ ├── cli/ # Commander.js CLI (@teemtape/cli)│ └── mock-server/ # In-memory API mock for local testing├── workers/│ └── api/ # Cloudflare Worker + D1 + KV (@teemtape/api)├── wireframes/ # Phase 1 HTML mockups (no build step)├── skills/ # Agent Skills (teemtape-cli)└── docs/ # source Markdown for these docsWhen you change the API contract, update @teemtape/api-client first, then
the Worker and CLI consumers. Keep all clients on the same contract.
Development commands
Section titled “Development commands”From the repo root:
| Command | Purpose |
|---|---|
npm run build | Build api-client, cli, and web |
npm test | Run tests in all workspaces that define them |
npm run mock | Start the in-memory mock API |
npm run api:dev | Start the Worker via wrangler dev |
npm run web:dev | Start the Vite dev server (apps/web) |
npm run web:build | Production build of the web app |
Per-workspace examples:
npm run build --workspace @teemtape/api-clientnpm run test --workspace @teemtape/apinpm run test --workspace @teemtape/clinpm run dev --workspace @teemtape/cli # watch modenpm run dev --workspace docs # this docs siteMaking changes
Section titled “Making changes”- Worker API (
workers/api) — route handlers insrc/index.ts; D1 queries insrc/repo.ts/src/symbols.ts(parameterized); schema changes add a new file inmigrations/(never edit old ones); add tests undertest/. - Shared client (
packages/api-client) — types andTeemtapeClientare the contract; rebuild after type changes so dependents pick up new.d.tsfiles. - CLI (
packages/cli) — commands undersrc/commands/; config resolution insrc/config.ts; never log watchlist tokens in full. - Wireframes (
wireframes/) — plain HTML/CSS/JS, no build step.
Pull requests
Section titled “Pull requests”- Branch from
mainand keep PRs focused — one logical change per PR. - Run tests first:
npm test(andnpm run buildif you touched TypeScript). - Describe what and why in the PR body; link related issues.
- Update docs when behavior, config, or setup changes.
- No secrets — never commit
.dev.vars, API keys, or tokens.
Merged PR titles become changelog bullets when a release is published, so write clear, user-facing titles (e.g. “Add symbol search to GET /api/symbols” rather than “fix stuff”). See releases.
Database migrations
Section titled “Database migrations”If your change needs a D1 schema update:
- Add
workers/api/migrations/000N_description.sql. - Test locally:
npm run migrate:local --workspace @teemtape/api. - Note the migration in your PR description.
Remote production migrations are applied automatically on merge to main. Don’t
run destructive migrations without discussion.
Code style
Section titled “Code style”- TypeScript across packages and the Worker; ES modules.
- Match existing patterns in the file you’re editing.
- Prefer small, focused diffs over drive-by refactors.
- Comments only where intent isn’t obvious from the code.
Security
Section titled “Security”- Report sensitive issues privately to the maintainers, not in a public issue.
- Don’t commit credentials,
.dev.vars, or real watchlist tokens. - The CLI stores tokens in
~/.config/teemtape/config.jsonwith mode0600— preserve that behavior.
License
Section titled “License”By contributing, you agree that your contributions are licensed under the MIT License, Copyright (c) Benjamin Fellows. See the license page.