Imported from RithwikVaidun/baddyQ (
AGENTS.md). Install upstream withnpx skills add RithwikVaidun/baddyQ. Copyright stays with the author.
Repository Guidelines
Project Structure & Module Organization
src/ contains the React application: the entry point (index.js), root component (App.js), shared styles (App.css, index.css), and assets such as court.jpeg. Keep new features grouped inside src/ by domain, with colocated tests and styles. reportWebVitals.js is optional telemetry; import it only when metrics are required. Static files that must be served verbatim belong in public/.
Build, Test, and Development Commands
npm install prepares dependencies listed in package.json. npm start launches the Create React App dev server on http://localhost:3000, auto-reloading on file saves and surfacing ESLint issues. npm test runs Jest in watch mode with React Testing Library bindings. npm run build outputs an optimized bundle to build/; review the build before deployment. Reserve npm run eject for advanced customization.
Coding Style & Naming Conventions
Use modern ES2015+ syntax and function components with hooks. Indent with two spaces. Name React components with PascalCase (e.g., QueueBoard.js), hooks with camelCase prefixed by use, and utility modules in camelCase. Export a default component per file unless sharing helpers. CRA’s ESLint config runs during npm start and npm test; address all lint warnings. Add comments sparingly for non-obvious logic or domain-specific rules.
Testing Guidelines
Place tests next to their targets as *.test.js. Use descriptive describe and it blocks and prefer user-centric assertions from @testing-library/jest-dom. Validate stateful hooks and queue logic with focused tests. For CI, run npm test -- --watchAll=false to exit after one pass. Share setup in src/setupTests.js instead of duplicating mocks.
Commit & Pull Request Guidelines
Recent history shows concise, present-tense messages (e.g., add queue controls). Keep commits scoped to a single concern and include optional body details when context helps reviewers. Pull requests should state the change summary, testing performed (npm start, npm test), linked issues, and UI screenshots if visuals shift. Request review only after tests pass and note if documentation such as AGENTS.md needs follow-up updates.