- Core UI lives in
app/;page.tsxdrives the landing flow andpage.module.cssplusglobals.csssupply scoped and global styles. - Shopify detection logic stays in the Edge route
app/api/check/route.ts, the single touchpoint with external services. - Configuration sits in
next.config.ts,tsconfig.json, andeslint.config.mjs. Static assets belong inpublic/;.next/holds build output. - Consult
UI_DESIGN.mdandPROJECT_DESC.mdbefore reshaping UkwX copy or layout.
npm run devlaunches the Next.js dev server (http://localhost:3000) with hot module reload.npm run buildcompiles an optimized production bundle into.next/.npm startserves the production build; runnpm run buildfirst.-npm run lintapplies ESLint (Next Core Web Vitals + TypeScript rules) across the workspace; add-- --fixto auto-resolve safe issues.
- Use TypeScript functional components and hooks; keep route filenames lowercase (
app/<segment>/page.tsx) while exporting components in PascalCase. - Keep variables camelCase, React components PascalCase, and CSS module classes descriptive (
statusRow,infoBlock). - Stick with two-space indentation, trailing commas, and double quotes to match existing formatting. Run
npm run lintbefore committing.
- No automated tests exist yet; introduce Jest + React Testing Library (or similar) along with any new feature.
- Co-locate specs as
*.test.ts(x)or group them in a mirrored__tests__/directory. - Once a test script is added, standardize on
npm run test, run it locally, and mention manual QA in the PR body.
- Favor Conventional Commit prefixes (
feat,fix,chore,docs) with succinct imperatives (feat: add confidence badge tooltip). Include a scope only when it clarifies the affected segment. - In PRs, link issues, add a short change summary, capture UI screenshots when visual changes occur, and outline API impacts.
- Verify
npm run buildandnpm run lintsucceed, then record the results in the PR checklist for reviewers.
- The Edge API route calls
https://dev-api.makemypass.com; guard sensitive diagnostics and preferprocess.envvariables defined in.env.localfor future secrets. - Do not commit
.env*files. Document new configuration keys in the PR and mirror them in README updates.