Skip to content

Latest commit

 

History

History
47 lines (39 loc) · 3.14 KB

AGENTS.md

File metadata and controls

47 lines (39 loc) · 3.14 KB

Repository Guidelines

Project Structure & Module Organization

  • 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 with index.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.

Build, Test, and Development Commands

  • npm run dev: Dev server with Turbopack at http://localhost:3000.
  • npm run build: Production build. If using static hosting, enable output: 'export' in next.config.ts to generate out/.
  • 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.

Coding Style & Naming Conventions

  • 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.ts per route when relevant.

Testing Guidelines

  • No tests configured. Validate via npm run dev. If adding tests: Jest + Testing Library for unit/UI; Playwright for e2e. Place under src/**/__tests__ or as *.test.ts(x).

Commit & Pull Request Guidelines

  • 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/build pass.

Release & Production Deploy

  • Validate site changes with npm run build before merging.
  • Merge the reviewed change into main; deploy tags must point to a commit already merged into main.
  • Before tagging, fetch origin and confirm the intended commit is contained in origin/main.
  • Use the next patch version from the latest v* semantic version tag (for example, v1.3.17 becomes v1.3.18 for a patch release).
  • Create an annotated vX.Y.Z tag on the merged main commit and push it with git push origin vX.Y.Z.
  • Pushing a v* tag starts .github/workflows/deploy.yml, which builds and deploys the static site to production. Check the workflow run succeeds and verify the live page after deployment.
  • Never tag an unmerged feature branch or reuse an existing release tag.

SEO & Content

  • Global SEO in src/app/layout.tsx (Open Graph, Twitter, JSON-LD). Per-page metadata in src/app/**/metadata.ts.
  • Keep a single H1 por página; use descrições objetivas e CTAs claros.
  • Atualize sitemap.xml/robots.txt ao criar rotas novas (ou migre para src/app/sitemap.ts e robots.ts).
  • Prefira imagens OG 1200x630 em public/images/ e referencie em metadata.

Contato (Formulário Estático)

  • ContactForm usa FormSubmit (sem backend). Para trocar e-mail, edite action no componente.
  • Redireciona para /thanks. Honeypot ativado; sem captcha por padrão.