Thank you for your interest in contributing! This guide will help you get set up and make your first contribution.
- Code of Conduct
- Getting Started
- Development Setup
- Project Architecture
- Code Style
- Commit Conventions
- Testing
- Pull Request Process
- Where to Add Things
- Reporting Issues
Be respectful and constructive. We follow the Contributor Covenant code of conduct.
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/<your-username>/API-Watch.git cd API-Watch
- Create a branch from
main:git checkout -b feature/your-feature-name
| Tool | Version |
|---|---|
| Python | 3.9+ |
| Node.js | 18+ |
| npm | 9+ |
| Git | 2.30+ |
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Copy environment config
cp .env.example .env
# Start the backend (development mode)
ENVIRONMENT=development python -m uvicorn src.api_server:app --host 0.0.0.0 --port 8000 --reloadcd frontend
npm install
npm run devThe frontend dev server runs at http://localhost:5173 and proxies API calls to http://127.0.0.1:8000.
docker compose upsrc/ # Backend — FastAPI
├── api_server.py # App entry, middleware, SPA serving
├── models.py # SQLAlchemy models
├── database.py # Async DB engine
├── config.py # Centralized settings
├── runner.py # HTTP request executor
├── auth.py # Auth handlers
├── jwt_auth.py # JWT authentication
├── rbac.py # Role-based access control
├── cache.py # Redis / in-memory cache
└── routes/ # Route modules (20 files)
frontend/src/ # Frontend — React + TypeScript
├── pages/ # 16 page components
├── components/ # 25 reusable UI components
├── store/ # 8 Zustand state stores
├── lib/ # 10 utility/library modules
└── __tests__/ # Frontend test suites
See ARCHITECTURE.md for detailed diagrams and data flow.
- Follow PEP 8.
- Use type hints for function signatures.
- Use
async deffor all route handlers and database operations. - Keep functions focused — one function, one responsibility.
- Docstrings for all public functions.
- Follow the project ESLint config (run
npm run lint). - Use functional components with hooks.
- Use Zustand for state management (not prop drilling or Context).
- Use Tailwind CSS utility classes — avoid custom CSS files.
- Prefer named exports.
- No hardcoded secrets, URLs, or credentials.
- No
console.login production code (use proper logging). - Keep imports organized: stdlib → third-party → local.
We use Conventional Commits:
<type>(<scope>): <description>
[optional body]
| Type | When to use |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
style |
Formatting, no code change |
refactor |
Code change that neither fixes a bug nor adds a feature |
test |
Adding or updating tests |
chore |
Build process, CI, dependencies |
perf |
Performance improvement |
git commit -m "feat(monitors): add Slack notification channel"
git commit -m "fix(runner): handle timeout for IPv6 addresses"
git commit -m "docs: update API reference in README"
git commit -m "test(collections): add import/export round-trip tests"All PRs must pass the full test suite.
# Run all backend tests
ENVIRONMENT=development pytest tests/ -q
# Run a specific test file
ENVIRONMENT=development pytest tests/test_runner.py -v
# Run with coverage
ENVIRONMENT=development pytest tests/ --cov=src --cov-report=term-missingcd frontend
# Run all tests
npm test
# Watch mode (re-runs on file changes)
npm run test:watch
# Run a specific test file
npx vitest run src/__tests__/scriptEngine.test.ts- All backend tests pass (
pytest tests/) - All frontend tests pass (
npm test) - No lint errors (
cd frontend && npm run lint) - New features have corresponding tests
-
Update your branch with the latest
main:git fetch origin git rebase origin/main
-
Push your branch:
git push origin feature/your-feature-name
-
Open a PR against
mainon GitHub. -
Fill out the PR template — describe what changed and why.
-
Wait for CI — the GitHub Actions pipeline will run tests and build.
-
Address feedback — maintainers may request changes.
-
Merge — once approved and CI passes, a maintainer will merge.
- Keep PRs focused on a single concern.
- Include tests for new functionality.
- Update documentation if you change user-facing behavior.
- Link related issues (
Closes #123).
| I want to... | Where to look |
|---|---|
| Add a new page | frontend/src/pages/ — create component, add route in App.tsx |
| Add a UI component | frontend/src/components/ |
| Add client-side state | frontend/src/store/ — create or extend a Zustand store |
| Add a utility function | frontend/src/lib/ |
| Add a backend route | src/routes/ — create a route module, register in api_server.py |
| Add a database model | src/models.py — add SQLAlchemy model, create Alembic migration |
| Add a backend test | tests/ — follow existing naming: test_<module>.py |
| Add a frontend test | frontend/src/__tests__/ — follow existing naming: <module>.test.ts |
Use the GitHub issue tracker. We have templates for:
- Bug reports — include steps to reproduce, expected vs actual behavior, environment info.
- Feature requests — describe the use case and proposed solution.
Thank you for contributing! 🚀