diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2014a135..9637fbde 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,22 @@ If we later introduce **dual-licensing** options (e.g., commercial licenses for * Follow existing formatting/lint rules. * Update docs and user-facing text when behavior changes. +## Agent PR Conventions + +Automated agents contributing to this repository should follow these rules: +- **Atomic Commits**: Keep changes small and self-contained. +- **Descriptive Titles**: Use clear, semantic titles (e.g., `fix(ui): resolve upload modal overflow`). +- **Reference Issues**: Link to relevant issues in the PR description. +- **Review AGENTS.md**: Always consult `AGENTS.md` for specific architectural guidelines and constraints before starting work. + +## Submitting a Pull Request + +1. Fork the repository and create a new branch from `main`. +2. Make your changes, adding tests if applicable. +3. Run `npm run test:unit` and `npm run lint` to ensure quality. +4. Push your branch and open a Pull Request against the `main` branch. +5. Provide a clear description of the problem and solution. + ## Development Setup To set up the project locally: diff --git a/README.md b/README.md index 38a400f1..c611b803 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,36 @@ To run **bitvid** locally: http://localhost:8000 ``` +### Common Commands + +- **Run unit tests**: `npm run test:unit` +- **Format code**: `npm run format` +- **Lint code**: `npm run lint` + +### Send your first video post + +Use the event builders in `js/nostrEventSchemas.js` to construct valid video notes. + +```javascript +import { buildVideoPostEvent } from './js/nostrEventSchemas.js'; + +const event = buildVideoPostEvent({ + pubkey: "your_pubkey_hex", + created_at: Math.floor(Date.now() / 1000), + dTagValue: "my-first-video", + content: { + version: 3, + title: "My First Video", + videoRootId: "my-first-video", // Logical ID, often matches d-tag + url: "https://example.com/video.mp4", + description: "This is a test video post sent via the SDK.", + // magnet: "magnet:?xt=urn:btih:..." // Optional fallback + } +}); + +console.log("Event to publish:", event); +``` + ### CSS build pipeline Tailwind utilities are generated from `css/tailwind.source.css` and themed via