Contributing
Thanks for your interest in improving this project! A few quick guidelines to help you get started.
Development Setup
- Node.js LTS recommended. Install dependencies with
npm install(root). For the web UI:cd web && npm install. - Prebuild native Android once before running:
npx expo prebuild -p android. - Run on Android:
npm run android. Start Metro:npm run start. Web UI:cd web && npm run dev.
Coding Style
- JavaScript, 2-space indent, single quotes, semicolons.
- Naming: camelCase for variables/functions; PascalCase for React components; UPPER_SNAKE_CASE for constants.
- File names: components
PascalCase.jsx/js, utilitiescamelCase.js. - Keep imports ordered: react/expo → third‑party → local.
- Match patterns in
App.js; avoid adding unused deps.
Scope & Structure
- Root app:
App.js(UI + relay logic), bootstrap:index.js. - Native glue:
native/WolServerModule.js. - Android project in
android/is generated by Expo prebuild; do not hand‑edit. - Web UI (Vite + React) in
web/withsrc/andvite.config.js.
Testing
- No harness is configured yet. Recommended:
- Mobile: Jest + React Native Testing Library.
- Web: Jest + @testing-library/react with Vite.
- Place tests beside source as
*.test.js(e.g.,native/wolUtils.test.js).
Commits & PRs
- Prefer Conventional Commits (e.g.,
feat(web): serve Vite UI from assets). - Keep PRs focused and incremental. Include: description, rationale, test plan, and screenshots for UI changes.
- Link related issues.
Security
- Never commit secrets. The WOL relay expects a shared token in requests; use Tailscale ACLs to restrict access.
- See
SECURITY.mdfor reporting guidelines.
Android Notes
- After modifying Android permissions/FGS types, re-run:
npx expo prebuild -p androidthennpm run android. - Avoid manual edits in
android/; prefer Expo config and prebuild.
Code of Conduct
- By participating, you agree to abide by the Code of Conduct in
CODE_OF_CONDUCT.md.