From 63073fadbd5df3375839f333b0d0b29a84706405 Mon Sep 17 00:00:00 2001 From: TechTide AI Date: Thu, 21 May 2026 18:28:29 -0400 Subject: [PATCH 1/2] docs: add CONTRIBUTING.md with setup, testing, and submission guide --- CONTRIBUTING.md | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..212e613 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,108 @@ +# Contributing to Anvil + +Thanks for your interest in contributing to Anvil! This guide will help you get set up and explain how we work. + +## Prerequisites + +- [Node.js](https://nodejs.org/) (v20+) +- [pnpm](https://pnpm.io/) (v9+) +- [Rust](https://rustup.rs/) (stable toolchain) +- [Tauri CLI](https://v2.tauri.app/start/prerequisites/) (`cargo install tauri-cli`) + +### macOS + +Xcode Command Line Tools are required: + +```bash +xcode-select --install +``` + +### Linux + +Install system dependencies for Tauri: + +```bash +sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file \ + libssl-dev libayatana-appindicator3-dev librsvg2-dev +``` + +## Getting Started + +```bash +# Clone and install dependencies +git clone https://github.com/zdenham/anvil.git +cd anvil +pnpm install + +# Start development (builds all workspaces + launches Tauri) +pnpm dev +``` + +The `pnpm dev` command starts the agents, SDK, migrations, and sidecar workspaces in watch mode alongside the Tauri development server. + +## Project Structure + +``` +anvil/ + src/ # Frontend (React + TypeScript) + src-tauri/ # Tauri backend (Rust) + core/ # Shared types, adapters, SDK, services + agents/ # Agent workspace package + sidecar/ # Sidecar process + migrations/ # Database migrations + landing/ # Marketing site +``` + +## Running Tests + +```bash +# Unit + integration tests +pnpm test + +# Watch mode +pnpm test:watch + +# UI component tests +pnpm test:ui + +# E2E tests (requires a running dev server) +pnpm test:e2e + +# Critical-path E2E only +pnpm test:e2e:critical +``` + +## Linting + +```bash +pnpm lint # Check for issues +pnpm lint:fix # Auto-fix +``` + +## Submitting Changes + +1. Fork the repository and create a branch from `main` +2. Make your changes in small, focused commits +3. Add tests for new functionality +4. Ensure `pnpm test` and `pnpm lint` pass +5. Open a pull request with a clear description of what changed and why + +## Code Style + +- TypeScript strict mode is enforced +- Use Vitest for unit and integration tests +- Prefer named exports over default exports +- Keep files focused and under 400 lines when practical + +## Reporting Issues + +Open an issue on GitHub with: + +- Steps to reproduce +- Expected vs. actual behavior +- OS and Anvil version +- Relevant logs (from `logs/dev.log` if running in dev mode) + +## License + +By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE). From 5a221f7bc6f655125b6e5eec0f5ab3fd8b03ba5c Mon Sep 17 00:00:00 2001 From: TechTide AI Date: Tue, 23 Jun 2026 01:20:27 -0400 Subject: [PATCH 2/2] docs: correct CONTRIBUTING file-size limit to 250 lines and add server/ + api/ to structure --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 212e613..ed29cf3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,6 +48,8 @@ anvil/ src-tauri/ # Tauri backend (Rust) core/ # Shared types, adapters, SDK, services agents/ # Agent workspace package + server/ # Backend server (gateway, routes, migrations) + api/ # Fastify API server sidecar/ # Sidecar process migrations/ # Database migrations landing/ # Marketing site @@ -92,7 +94,7 @@ pnpm lint:fix # Auto-fix - TypeScript strict mode is enforced - Use Vitest for unit and integration tests - Prefer named exports over default exports -- Keep files focused and under 400 lines when practical +- Keep files focused and under 250 lines (see `docs/agents.md`); break larger files into submodules ## Reporting Issues