This document summarizes how to work effectively inside the Portfolio React application and keeps contributions predictable for every agent.
Application code lives in src/, with feature-specific UI under src/components/ and shared media in src/Assets/. Styling is split between src/App.css, src/index.css, and src/style.css; favor colocating new component styles near the component when possible. Static files that Ship with the build live in public/, while Images/ holds marketing assets outside the React bundle. The production bundle generated by CI lands in build/; never edit it manually.
npm install— install all dependencies defined inpackage.json.npm start— launch the local dev server with fast refresh at http://localhost:3000.npm run build— create the optimized production bundle insidebuild/.npm test— run the Jest + Testing Library suite in watch mode; useCI=true npm test -- --watch=falseinside automation.
Use modern React with functional components, Hooks, and 2-space indentation. Name components and files with PascalCase (e.g., ProfileCard.jsx), helper modules with camelCase (formatDates.js), and assets with lowercase hyphenated names (hero-bg.png). Prefer descriptive prop names, keep JSX readable with inline fragments, and use ES modules exclusively (import/export). ESLint follows the react-app base config; run npx eslint src --max-warnings=0 if you need to lint manually.
Testing relies on React Testing Library inside src/App.test.js and any sibling *.test.js files. Mirror the component directory when adding tests so related specs live next to their implementation. Aim to cover primary user flows (navigation, data fetching states, and CTA interactions) and use accessibility queries (getByRole, findByText) for assertions. Snapshot tests are acceptable for static presentational components, but prefer interaction tests for behavior changes.
Existing history favors short, imperative summaries such as “deployment comment” or “updated npm packages.” Follow that pattern: limit the subject to ~60 characters, describe what changed, and keep additional detail in the body if needed. Pull requests should include a concise description of user-facing impact, references to any tracked issue, before/after screenshots for visual changes, and confirmation of npm test (and, when relevant, npm run build). Keep PRs focused on a single feature or fix to simplify reviews.