Marketing website for Romazen, built with React, Vite, and React Router.
- React 19
- Vite 7
- React Router 7
- Framer Motion
- CSS Modules
- ESLint 9 (flat config)
- Vitest + Testing Library + Node test runner
- Node.js 20+
- npm 10+
npm install
npm run devDev server default: http://localhost:5173
npm run dev: start local dev servernpm start: start local dev servernpm run build: production build intodist/npm run preview: preview production buildnpm run lint: run ESLintnpm run test: run UI tests + Node regression checksnpm run test:ui: run Vitest/RTL tests onlynpm run test:checks: run Node regression checks onlynpm run test:watch: run Vitest in watch modenpm run test:coverage: run Vitest with coveragenpm run images:audit: report image payload and oversized filesnpm run images:optimize: generate WebP variants topublic/assets/images/optimized(requires optionalsharp)
Defined in src/App.jsx:
/-> Home page/prices-> In-store candle pricing page/scan-> In-store candle pricing page/shop-> All products collection page/candles-> Candle collection page/soaps-> Soap collection page/fragrances-> Home fragrance collection page/cleaning-> Eco cleaning collection page/about-> Brand story page/sustainability-> Sustainability page/contact-> Contact page/privacy-> Privacy policy page/terms-> Terms of service page*-> Custom 404 page
vercel.jsonrewrites all routes toindex.htmlfor SPA routing.- Security headers are set in
vercel.json(CSP, frame, referrer, permissions, MIME sniffing). - Build output:
dist/ - Crawl assets:
public/robots.txt,public/sitemap.xml
- CI workflow in
.github/workflows/ci.ymlruns lint, tests, build, and image audit on push/PR.
npm run lint✅npm run test✅npm run build✅
-
Resolved (was High): CSP blocked inline JSON-LD structured data
index.htmluses inline schema markup in<script type="application/ld+json">.vercel.jsonnow includes the exactsha256hash for this inline JSON-LD script inscript-src.- Result: structured data remains allowed without enabling broad inline scripts.
- References:
index.html:22,vercel.json:24
-
Resolved (was Medium): Mobile nav remained open after some route changes
Navbarnow closes menu state onlocation.pathnamechanges.- A regression UI test verifies open menu -> route change -> menu closes.
- References:
src/components/Layout/Navbar.jsx,src/App.test.jsx
- No test validates CSP compatibility for inline JSON-LD behavior.
- No dedicated test for browser history back/forward behavior with menu state.
- Resolved:
usePageMetanow has tests coveringcanonical,robots, and Open Graph/Twitter tags.
- Newsletter form UI exists, but no submission backend is wired.