src/app/: Next.js App Router. Routes:blog/,articles/,projects/,about/,services/,thanks/.src/app/components/: Reusable UI (e.g.,Navbar/,Footer/,ArticleCard/,ContactForm/). Use one component per folder withindex.tsx.src/data/,src/utils/: Static data and helpers (e.g.,content.ts).public/: Static assets,robots.txt,sitemap.xml. Served at site root.out/: Static export output for deployment (don’t edit manually).- Config:
next.config.ts,tailwind.config.ts,eslint.config.mjs,.htaccess.
npm run dev: Dev server with Turbopack athttp://localhost:3000.npm run build: Production build. If using static hosting, enableoutput: 'export'innext.config.tsto generateout/.npm start: Run the production server locally.npm run lint: ESLint (Next core-web-vitals + TS). Auto-fix:npm run lint -- --fix.- Preview static build:
npx http-server ./out -p 8000.
- TypeScript; 2-space indent. Components in PascalCase; route segments lowercase (e.g.,
src/app/blog/page.tsx). - Tailwind CSS in JSX; shared styles in
src/app/globals.css. - Keep pages self-contained with
metadata.tsper route when relevant.
- No tests configured. Validate via
npm run dev. If adding tests: Jest + Testing Library for unit/UI; Playwright for e2e. Place undersrc/**/__tests__or as*.test.ts(x).
- Conventional Commits (
feat:,fix:,docs:,chore:,refactor:). Example:feat(services): add static contact form. - PRs: clear description, linked issues, screenshots for UI, and confirm
npm run lint/buildpass.
- Global SEO in
src/app/layout.tsx(Open Graph, Twitter, JSON-LD). Per-page metadata insrc/app/**/metadata.ts. - Keep a single H1 por página; use descrições objetivas e CTAs claros.
- Atualize
sitemap.xml/robots.txtao criar rotas novas (ou migre parasrc/app/sitemap.tserobots.ts). - Prefira imagens OG 1200x630 em
public/images/e referencie em metadata.
ContactFormusa FormSubmit (sem backend). Para trocar e-mail, editeactionno componente.- Redireciona para
/thanks. Honeypot ativado; sem captcha por padrão.