Skip to content

nodetec/comet

Repository files navigation

comet

Comet is a local-first notes app built with Tauri, React, TypeScript, and Rust.

  • Local-first note-taking
  • Encrypted sync with Nostr
  • Encrypted blob storage with Blossom
  • Turborepo monorepo with the app in app/

Quick Start

  1. Install just: brew install just or cargo install just
  2. Install dependencies: just install
  3. Start the app: just app-dev

Commands

The full command surface lives in justfile. Use just --list to see everything.

Common commands:

  • just app-dev: run the Comet app in development
  • just docs-dev: run the standalone docs site in development
  • just docs-build: build the standalone docs site
  • just docs-check: run the standalone docs verification suite
  • just app-check: run the main app verification suite
  • just relay-dev: run the relay in development
  • just blossom-dev: run the Blossom server in development
  • just relay-test: run the relay test suite
  • just blossom-test: run the Blossom test suite
  • just format-check: check formatting across the repo

Comet keeps a root app.db plus per-account databases under accounts/<npub>/comet.db. The maintenance scripts and MCP server always resolve the active account through app.db.

Repo Layout

Workspace

  • Root scripts use Turborepo for workspace tasks like build, lint, typecheck, and test
  • The app source, Vite config, and Tauri project live in app
  • The docs source and Starlight content live in docs

Testing Notes

  • just app-test-frontend runs the frontend test suite
  • just app-test-backend runs the Rust test suite
  • just app-test runs both

Relay and Blossom development use Bun. Install Bun if you plan to run commands under relay or blossom. The default app workflows such as just app-build and just app-check do not require Bun.

Relay and Blossom test suites use Postgres. Set TEST_DATABASE_URL or run a local comet_test database before just relay-test or just blossom-test.

Use a disposable local test database only. Relay and Blossom integration tests run migrations and truncate shared tables during setup, so do not point TEST_DATABASE_URL at a real app, staging, or production database.

Local Postgres setup

One working local setup on macOS is:

brew install postgresql@16 brew services start postgresql@16 createdb comet_test export TEST_DATABASE_URL=postgres://$USER@localhost:5432/comet_test

Then run:

just relay-test just blossom-test

If you already have Postgres running, you usually only need:

createdb comet_test export TEST_DATABASE_URL=postgres://$USER@localhost:5432/comet_test

Git hooks

This repo uses Husky + lint-staged for a pre-commit hook on staged files. After just install, the hook is installed automatically via the prepare script.

On commit, staged files run through:

  • eslint --fix and prettier --write for *.ts and *.tsx
  • prettier --write for *.js, *.mjs, *.cjs, *.json, *.md, *.yml, and *.yaml