Skip to content

Latest commit

 

History

History
80 lines (56 loc) · 3.32 KB

CONTRIBUTING.md

File metadata and controls

80 lines (56 loc) · 3.32 KB

Contributing to stellar-txwatch-web

Thanks for your interest in contributing! This is the web dashboard for the Tx-wats org.

Sister repos

Repo Description
stellar-txwatch-core Rust monitoring engine
stellar-txwatch-contracts Soroban smart contracts
web This repo - Next.js dashboard

Local setup

git clone https://github.com/Tx-wats/web
cd web
npm install
cp .env.example .env.local
npm run dev

Open http://localhost:3000.

Requirements

Note: The project specifies engines.node >= 18.17 in package.json. CI enforces this using Node 20.

Branch naming

feat/<short-description>
fix/<short-description>
chore/<short-description>

Commit style

Follow Conventional Commits:

feat(component): add X
fix(page): correct Y
chore: update deps

Git hooks

After dependencies are installed, Husky runs lint-staged before each commit. It applies ESLint fixes and Prettier to staged JavaScript/TypeScript files, and Prettier to staged JSON, Markdown, CSS/SCSS, and YAML files. Before each push, it runs npm run typecheck.

In an emergency, set HUSKY=0 for the single Git command to bypass hooks, for example HUSKY=0 git commit or HUSKY=0 git push. Use this sparingly and run the skipped checks before opening or updating a pull request.

TypeScript types

All types live in types/index.ts and must stay in sync with the Rust structs in stellar-txwatch-core. Do not add fields here without a matching change in the core engine.

WatchedContract.enabled is an optional boolean (enabled?: boolean). When the field is absent, the contract is treated as enabled (absent = true). Any change to this field must be mirrored in the stellar-txwatch-core type definitions. For browser-persisted data, also update the Browser Storage Schema. Changes to a stored shape need an owning type/read/write update, a versioned migration and test when existing data needs transformation, and an update to the schema reference. Do not store credentials such as webhook signing secrets in localStorage.

Pull requests

  • Keep PRs focused - one feature or fix per PR
  • All pages must be mobile responsive and dark-mode compatible
  • Run npm run format, npm run typecheck, and npm run lint before opening a PR
  • Update documentation if you modify file responsibilities — see ARCHITECTURE.md
  • Include a PR description matching the template in .github/pull_request_template.md

Pre-submission checklist

npm run format      # Auto-format code
npm run format:check # Verify formatting
npm run typecheck   # Check TypeScript types
npm run lint        # Run ESLint
npm run build       # Verify the build