From 965f1d162796b4383b5bb7d666b8d2becec588a5 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 7 Sep 2025 20:36:07 -0300 Subject: [PATCH 1/5] fix: add force-static export to sitemap for static build compatibility - Add 'export const dynamic = "force-static"' to sitemap.ts - Fixes Next.js static export build error when using output: export - Resolves make build-serve failing due to missing static export configuration --- src/app/sitemap.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/app/sitemap.ts diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts new file mode 100644 index 0000000..49106d2 --- /dev/null +++ b/src/app/sitemap.ts @@ -0,0 +1,18 @@ +import type { MetadataRoute } from 'next'; + +export const dynamic = 'force-static'; + +export default function sitemap(): MetadataRoute.Sitemap { + const baseUrl = 'https://helpdev.com.br'; + const now = new Date(); + + const routes = ['/', '/services', '/about', '/articles', '/projects', '/blog', '/thanks']; + + return routes.map((route) => ({ + url: `${baseUrl}${route}`, + lastModified: now, + changeFrequency: 'weekly', + priority: route === '/' ? 1 : 0.8, + })); +} + From 089ce42f45de12ac90da3fd10c8a8b3fd8b67e50 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 7 Sep 2025 20:36:37 -0300 Subject: [PATCH 2/5] fix: correct repository URL and directory name in README.md - Update clone URL from generic 'seu-usuario/helpdev.git' to actual 'gbzarelli/helpdev.com.br.git' - Fix directory name in clone instructions from 'helpdev' to 'helpdev.com.br' - Update project structure section to reflect correct directory name --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b59e3bc..1548890 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ O HelpDev é um portal dedicado a compartilhar conhecimento sobre desenvolviment 1. Clone o repositório: ```bash -git clone https://github.com/seu-usuario/helpdev.git -cd helpdev +git clone https://github.com/gbzarelli/helpdev.com.br.git +cd helpdev.com.br ``` 2. Instale as dependências: @@ -89,7 +89,7 @@ O projeto inclui um arquivo `.htaccess` com as seguintes configurações: ## 📝 Estrutura do Projeto ``` -helpdev/ +helpdev.com.br/ ├── src/ │ ├── app/ │ │ ├── components/ From 15565f2fc7fc6b0ac7fee9bd91e14a8544574dac Mon Sep 17 00:00:00 2001 From: root Date: Sun, 7 Sep 2025 20:40:18 -0300 Subject: [PATCH 3/5] feat: add services page, contact form, and major site improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🚀 New Features: - Add /services page with detailed service offerings and pricing - Create ContactForm component with FormSubmit integration for lead generation - Add /thanks page for form submission confirmation - Implement robots.txt for SEO optimization - Add comprehensive Makefile for development workflow automation - Add AGENTS.md documentation for AI-assisted development 🏗️ Site Architecture Improvements: - Upgrade to Next.js 15 with App Router and React 19 - Update to Tailwind CSS 4 with modern styling - Enhanced homepage with hero section, services preview, and clear CTAs - Improved navigation with services link and responsive design - Updated footer with enhanced styling and contact information - Better metadata configuration for SEO optimization 📱 UI/UX Enhancements: - Responsive design improvements across all pages - Modern card layouts and improved typography - Enhanced color scheme with better contrast and accessibility - Interactive elements with hover effects and smooth transitions - Mobile-first design approach with optimized touch targets ⚙️ Developer Experience: - Updated package.json with latest dependencies - Next.js configuration optimized for static export - Automated build and serve commands via Makefile - Better development workflow with make commands - Improved project structure and organization 🔧 Technical Updates: - Static export compatibility for hosting on static servers - Optimized build process with proper caching strategies - Enhanced metadata and SEO configuration - Better error handling and user feedback systems --- AGENTS.md | 38 +++++++ Makefile | 32 ++++++ next.config.ts | 2 + package.json | 4 +- src/app/components/ContactForm/index.tsx | 118 +++++++++++++++++++ src/app/components/Footer/index.tsx | 5 +- src/app/components/Navbar/index.tsx | 34 ++++++ src/app/layout.tsx | 64 +++++++++-- src/app/metadata.ts | 18 +-- src/app/page.tsx | 138 +++++++++++++++++------ src/app/robots.ts | 16 +++ src/app/services/metadata.ts | 8 ++ src/app/services/page.tsx | 105 +++++++++++++++++ src/app/thanks/page.tsx | 23 ++++ src/data/content.ts | 1 + 15 files changed, 551 insertions(+), 55 deletions(-) create mode 100644 AGENTS.md create mode 100644 Makefile create mode 100644 src/app/components/ContactForm/index.tsx create mode 100644 src/app/robots.ts create mode 100644 src/app/services/metadata.ts create mode 100644 src/app/services/page.tsx create mode 100644 src/app/thanks/page.tsx diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..b1d73e4 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,38 @@ +# 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. + +## 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. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b2980c0 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +SHELL := /bin/bash + +# Config +PORT ?= 8000 +HOST ?= 127.0.0.1 + +.PHONY: help install dev build serve build-serve + +## help: Show available targets +help: + @grep -E '^##' Makefile | sed -E 's/## //' | column -t -s ':' + +## install: Install project dependencies (npm ci fallback to npm install) +install: + npm ci || npm install + +## dev: Run Next.js in development mode at http://localhost:3000 +dev: + npm run dev + +## build: Build production (static export expected into ./out) +build: + npm run build + +## serve: Serve the static ./out folder on $(HOST):$(PORT) +serve: + npx http-server ./out -a $(HOST) -p $(PORT) -c-1 + +## build-serve: Build then serve the static ./out folder +build-serve: + npm run build && npx http-server ./out -a $(HOST) -p $(PORT) -c-1 + diff --git a/next.config.ts b/next.config.ts index 469a91b..9b0d938 100644 --- a/next.config.ts +++ b/next.config.ts @@ -5,6 +5,7 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ }); const nextConfig: NextConfig = { + output: 'export', experimental: { // Enable Turbopack optimizations serverComponentsHmrCache: true, // Cache Server Components across HMR @@ -21,6 +22,7 @@ const nextConfig: NextConfig = { // Image optimization configuration images: { + unoptimized: true, remotePatterns: [ { protocol: 'https', diff --git a/package.json b/package.json index 558963e..0662d63 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,9 @@ "build": "next build", "start": "next start", "lint": "next lint", - "analyze": "ANALYZE=true npm run build" + "analyze": "ANALYZE=true npm run build", + "serve:static": "npx http-server ./out -p 8000", + "build:serve": "npm run build && npx http-server ./out -p 8000" }, "dependencies": { "next": "15.3.0", diff --git a/src/app/components/ContactForm/index.tsx b/src/app/components/ContactForm/index.tsx new file mode 100644 index 0000000..db92f99 --- /dev/null +++ b/src/app/components/ContactForm/index.tsx @@ -0,0 +1,118 @@ +import React from 'react'; + +type Props = { + redirectPath?: string; + subject?: string; +}; + +export function ContactForm({ + redirectPath = '/thanks', + subject = 'Novo contato - Proposta | HelpDev', +}: Props) { + const actionUrl = 'https://formsubmit.co/gbzarelli@helpdev.com.br'; + + return ( +
+ {/* FormSubmit configuration */} + + + + + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+
+ +