# Contributing to Clawith ๐Ÿฆž Thanks for your interest in contributing! Whether it's a bug fix, new feature, translation, or documentation improvement โ€” every contribution matters. ## Quick Start 1. **Fork** this repo and clone your fork 2. Set up the dev environment: ```bash bash setup.sh # Backend + frontend + database bash restart.sh # Start services โ†’ http://localhost:3008 ``` 3. Create a branch: `git checkout -b my-feature` 4. Make your changes 5. Push and open a Pull Request ## What Can I Contribute? | Area | Examples | |------|---------| | ๐Ÿ› Bug fixes | UI glitches, API errors, edge cases | | โœจ Features | New agent skills, tools, UI improvements | | ๐Ÿ”ง MCP Integrations | New MCP server connectors | | ๐ŸŒ Translations | New languages or improving existing ones | | ๐Ÿ“– Documentation | README, guides, code comments | | ๐Ÿงช Tests | Unit tests, integration tests | **New to the project?** Look for issues labeled [`good first issue`](https://github.com/dataelement/Clawith/labels/good%20first%20issue). ## Bug Reports When reporting a bug, please include: - Steps to reproduce - Expected vs actual behavior - Clawith version and deployment method (Docker / Source) - Logs or screenshots if available **Priority guide:** | Type | Priority | |------|----------| | Core functions broken (login, agents, security) | ๐Ÿ”ด Critical | | Non-critical bugs, performance issues | ๐ŸŸก Medium | | Typos, minor UI issues | ๐ŸŸข Low | ## Feature Requests Please describe: - The problem you're trying to solve - Your proposed solution (if any) - Why this would be useful ## Pull Request Process 1. **Link an issue** โ€” Create one first if it doesn't exist 2. **Keep it focused** โ€” One PR per feature/fix 3. **Test your changes** โ€” Make sure nothing is broken 4. **Follow code style:** - Backend: Python โ€” formatted with `ruff` - Frontend: TypeScript โ€” standard React conventions 5. Use `Fixes #` in the PR description ## Project Structure ``` backend/ โ”œโ”€โ”€ app/ โ”‚ โ”œโ”€โ”€ api/ # FastAPI route handlers โ”‚ โ”œโ”€โ”€ models/ # SQLAlchemy models โ”‚ โ”œโ”€โ”€ services/ # Business logic โ”‚ โ””โ”€โ”€ core/ # Auth, events, middleware frontend/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ pages/ # Page components โ”‚ โ”œโ”€โ”€ components/ # Reusable UI components โ”‚ โ”œโ”€โ”€ stores/ # Zustand state management โ”‚ โ””โ”€โ”€ i18n/ # Translations ``` ## Language Policy To ensure all contributors can participate effectively, please use **English** for issues, PRs, and code comments. ไธบไบ†็กฎไฟๆ‰€ๆœ‰่ดก็Œฎ่€…้ƒฝ่ƒฝๆœ‰ๆ•ˆๅ‚ไธŽ๏ผŒ่ฏทไฝฟ็”จ**่‹ฑ่ฏญ**ๆไบค Issueใ€PR ๅ’Œไปฃ็ ๆณจ้‡Šใ€‚ ใ™ในใฆใฎใ‚ณใƒณใƒˆใƒชใƒ“ใƒฅใƒผใ‚ฟใƒผใŒๅŠนๆžœ็š„ใซๅ‚ๅŠ ใงใใ‚‹ใ‚ˆใ†ใ€Issueใ€PRใ€ใ‚ณใƒผใƒ‰ใ‚ณใƒกใƒณใƒˆใฏ**่‹ฑ่ชž**ใงใŠ้ก˜ใ„ใ—ใพใ™ใ€‚ ๋ชจ๋“  ๊ธฐ์—ฌ์ž๊ฐ€ ํšจ๊ณผ์ ์œผ๋กœ ์ฐธ์—ฌํ•  ์ˆ˜ ์žˆ๋„๋ก, Issue, PR, ์ฝ”๋“œ ์ฝ”๋ฉ˜ํŠธ๋Š” **์˜์–ด**๋กœ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”. Para garantizar que todos los contribuidores puedan participar de manera efectiva, utilice **inglรฉs** para issues, PRs y comentarios de cรณdigo. ู„ุถู…ุงู† ู…ุดุงุฑูƒุฉ ุฌู…ูŠุน ุงู„ู…ุณุงู‡ู…ูŠู† ุจูุนุงู„ูŠุฉุŒ ูŠุฑุฌู‰ ุงุณุชุฎุฏุงู… **ุงู„ู„ุบุฉ ุงู„ุฅู†ุฌู„ูŠุฒูŠุฉ** ููŠ ุงู„ู€ Issues ูˆุทู„ุจุงุช ุงู„ุณุญุจ ูˆุชุนู„ูŠู‚ุงุช ุงู„ูƒูˆุฏ. ## Windows Development Clawith is primarily developed on Linux/macOS, but can run on Windows with a few adjustments. ### Prerequisites - **Python 3.11+** โ€” Install from [python.org](https://www.python.org/downloads/) (check "Add to PATH") - **Node.js 18+** โ€” Install from [nodejs.org](https://nodejs.org/) - **Docker Desktop** โ€” For PostgreSQL and Redis (recommended over native installs) ### Database & Redis via Docker ```powershell docker run -d --name clawith-postgres -p 5432:5432 -e POSTGRES_PASSWORD=yourpass -e POSTGRES_DB=clawith postgres:15 docker run -d --name clawith-redis -p 6379:6379 redis:7 ``` ### Backend Setup ```powershell cd backend python -m venv .venv .venv\Scripts\activate pip install -r requirements.txt # Create .env (copy from .env.example and adjust DATABASE_URL / REDIS_URL) # Run database migrations alembic upgrade head # Start the server uvicorn app.main:app --host 0.0.0.0 --port 8000 ``` ### Frontend Setup ```powershell cd frontend npm install npm run dev ``` ### Common Windows Issues | Issue | Solution | |-------|----------| | `UnicodeEncodeError` / GBK encoding | Set `PYTHONUTF8=1` in environment variables, or run `chcp 65001` before starting | | System proxy intercepting LLM API calls | Set `NO_PROXY=*` or unset `HTTP_PROXY` / `HTTPS_PROXY` in your terminal | | `uvicorn --reload` crashes with watchfiles | Remove `--reload` flag, or install `watchfiles`: `pip install watchfiles` | | File path errors with backslashes | Use `pathlib.Path` โ€” the codebase already does this in most places | > **Note**: The recommended deployment method is Docker (`docker compose up -d`), which works identically on Windows, macOS, and Linux. The instructions above are for local development without Docker. ## Getting Help Stuck? Open a [Discussion](https://github.com/dataelement/Clawith/discussions) or ask in the related issue. We're happy to help! ๐Ÿ™Œ