src/components/houses feature flows such asHome,Editor, and shared UI pieces; keep new features self-contained with companion CSS in the same folder.src/assets/stores theme resources undercss,icons, andimages; usepublic/for static entry files (index.html,manifest.json) and metadata assets.- Application state helpers live in
src/utils/(seeImgContext,constants,unsplashConfig); Tailwind setup is centralized insrc/index.cssandtailwind.config.js.
npm installresolves dependencies using the committedpackage-lock.json; align with the current Node LTS release for compatibility.npm startruns the Create React App dev server athttp://localhost:3000with hot reload.npm run buildemits optimized assets intobuild/;npm testlaunches Jest + React Testing Library in watch mode (npm test -- --watchAll=falsefor CI).
- Prefer functional React components in
PascalCase.js; hooks, utilities, and handlers remaincamelCase. - Follow the CRA ESLint defaults; format with two-space indentation and trailing commas to match existing files.
- Reach for Tailwind utility classes first; fall back to scoped CSS (
CoverImage.css,RandomTheme.css) when patterns need custom styling.
- Co-locate component tests as
ComponentName.test.jsbeside implementation files, exercising flows with React Testing Library. - Prioritize user-facing behavior: verify rendered content, theme toggles, and Unsplash interactions; keep snapshot tests minimal.
- Ensure new features add tests or explain coverage gaps inside the pull request checklist.
- Match the repository鈥檚 conventional prefixes (
feat:,fix:,chore:,doc:) with concise, imperative summaries. - Develop on topic branches like
feature/editor-shortcuts; reference linked issues or discussions in the PR introduction. - PRs should supply a brief changelog, testing notes, and before/after screenshots for UI-facing adjustments.
- Store secrets in
.env.local; Unsplash integration requiresREACT_APP_API_ACCESS_KEY, which CRA exposes at build time. - Keep environment files out of version control and redact keys from recorded demos or screenshots.