Skip to content

Commit 853404b

Browse files
gbzarelliroot
andauthored
✨ Major Site Enhancement: Services Page, Contact Form & Modern Architecture (#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 * 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 * feat: add services page, contact form, and major site improvements 🚀 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 * feat: add specialized developer mentorship service and rename team training - Add 'Mentoria Especializada para Desenvolvedor' as new service with FaUserGraduate icon - Rename 'Mentoria & Treinamentos' to 'Treinamentos Corporativos' for better differentiation - Update both homepage and services page for consistency - Individual mentorship focuses on 1:1 technical guidance and career development - Corporate training focuses on team workshops and company-wide capacity building --------- Co-authored-by: root <root@gbzarelli-nitro5>
1 parent f12cc40 commit 853404b

File tree

17 files changed

+578
-58
lines changed

17 files changed

+578
-58
lines changed

AGENTS.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `src/app/`: Next.js App Router. Routes: `blog/`, `articles/`, `projects/`, `about/`, `services/`, `thanks/`.
5+
- `src/app/components/`: Reusable UI (e.g., `Navbar/`, `Footer/`, `ArticleCard/`, `ContactForm/`). Use one component per folder with `index.tsx`.
6+
- `src/data/`, `src/utils/`: Static data and helpers (e.g., `content.ts`).
7+
- `public/`: Static assets, `robots.txt`, `sitemap.xml`. Served at site root.
8+
- `out/`: Static export output for deployment (don’t edit manually).
9+
- Config: `next.config.ts`, `tailwind.config.ts`, `eslint.config.mjs`, `.htaccess`.
10+
11+
## Build, Test, and Development Commands
12+
- `npm run dev`: Dev server with Turbopack at `http://localhost:3000`.
13+
- `npm run build`: Production build. If using static hosting, enable `output: 'export'` in `next.config.ts` to generate `out/`.
14+
- `npm start`: Run the production server locally.
15+
- `npm run lint`: ESLint (Next core-web-vitals + TS). Auto-fix: `npm run lint -- --fix`.
16+
- Preview static build: `npx http-server ./out -p 8000`.
17+
18+
## Coding Style & Naming Conventions
19+
- TypeScript; 2-space indent. Components in PascalCase; route segments lowercase (e.g., `src/app/blog/page.tsx`).
20+
- Tailwind CSS in JSX; shared styles in `src/app/globals.css`.
21+
- Keep pages self-contained with `metadata.ts` per route when relevant.
22+
23+
## Testing Guidelines
24+
- 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)`.
25+
26+
## Commit & Pull Request Guidelines
27+
- Conventional Commits (`feat:`, `fix:`, `docs:`, `chore:`, `refactor:`). Example: `feat(services): add static contact form`.
28+
- PRs: clear description, linked issues, screenshots for UI, and confirm `npm run lint`/`build` pass.
29+
30+
## SEO & Content
31+
- Global SEO in `src/app/layout.tsx` (Open Graph, Twitter, JSON-LD). Per-page metadata in `src/app/**/metadata.ts`.
32+
- Keep a single H1 por página; use descrições objetivas e CTAs claros.
33+
- Atualize `sitemap.xml`/`robots.txt` ao criar rotas novas (ou migre para `src/app/sitemap.ts` e `robots.ts`).
34+
- Prefira imagens OG 1200x630 em `public/images/` e referencie em metadata.
35+
36+
## Contato (Formulário Estático)
37+
- `ContactForm` usa FormSubmit (sem backend). Para trocar e-mail, edite `action` no componente.
38+
- Redireciona para `/thanks`. Honeypot ativado; sem captcha por padrão.

Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
SHELL := /bin/bash
2+
3+
# Config
4+
PORT ?= 8000
5+
HOST ?= 127.0.0.1
6+
7+
.PHONY: help install dev build serve build-serve
8+
9+
## help: Show available targets
10+
help:
11+
@grep -E '^##' Makefile | sed -E 's/## //' | column -t -s ':'
12+
13+
## install: Install project dependencies (npm ci fallback to npm install)
14+
install:
15+
npm ci || npm install
16+
17+
## dev: Run Next.js in development mode at http://localhost:3000
18+
dev:
19+
npm run dev
20+
21+
## build: Build production (static export expected into ./out)
22+
build:
23+
npm run build
24+
25+
## serve: Serve the static ./out folder on $(HOST):$(PORT)
26+
serve:
27+
npx http-server ./out -a $(HOST) -p $(PORT) -c-1
28+
29+
## build-serve: Build then serve the static ./out folder
30+
build-serve:
31+
npm run build && npx http-server ./out -a $(HOST) -p $(PORT) -c-1
32+

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ O HelpDev é um portal dedicado a compartilhar conhecimento sobre desenvolviment
3232

3333
1. Clone o repositório:
3434
```bash
35-
git clone https://github.com/seu-usuario/helpdev.git
36-
cd helpdev
35+
git clone https://github.com/gbzarelli/helpdev.com.br.git
36+
cd helpdev.com.br
3737
```
3838

3939
2. Instale as dependências:
@@ -89,7 +89,7 @@ O projeto inclui um arquivo `.htaccess` com as seguintes configurações:
8989
## 📝 Estrutura do Projeto
9090

9191
```
92-
helpdev/
92+
helpdev.com.br/
9393
├── src/
9494
│ ├── app/
9595
│ │ ├── components/

next.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
55
});
66

77
const nextConfig: NextConfig = {
8+
output: 'export',
89
experimental: {
910
// Enable Turbopack optimizations
1011
serverComponentsHmrCache: true, // Cache Server Components across HMR
@@ -21,6 +22,7 @@ const nextConfig: NextConfig = {
2122

2223
// Image optimization configuration
2324
images: {
25+
unoptimized: true,
2426
remotePatterns: [
2527
{
2628
protocol: 'https',

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"build": "next build",
88
"start": "next start",
99
"lint": "next lint",
10-
"analyze": "ANALYZE=true npm run build"
10+
"analyze": "ANALYZE=true npm run build",
11+
"serve:static": "npx http-server ./out -p 8000",
12+
"build:serve": "npm run build && npx http-server ./out -p 8000"
1113
},
1214
"dependencies": {
1315
"next": "15.3.0",
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
import React from 'react';
2+
3+
type Props = {
4+
redirectPath?: string;
5+
subject?: string;
6+
};
7+
8+
export function ContactForm({
9+
redirectPath = '/thanks',
10+
subject = 'Novo contato - Proposta | HelpDev',
11+
}: Props) {
12+
const actionUrl = 'https://formsubmit.co/[email protected]';
13+
14+
return (
15+
<form
16+
action={actionUrl}
17+
method="POST"
18+
className="bg-white text-gray-900 p-6 rounded-xl shadow-md max-w-2xl mx-auto text-left"
19+
>
20+
{/* FormSubmit configuration */}
21+
<input type="hidden" name="_next" value={redirectPath} />
22+
<input type="hidden" name="_subject" value={subject} />
23+
<input type="hidden" name="_captcha" value="false" />
24+
<input type="text" name="_honey" className="hidden" aria-hidden="true" />
25+
26+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
27+
<div>
28+
<label htmlFor="name" className="block text-sm font-medium text-gray-800">Nome</label>
29+
<input
30+
id="name"
31+
name="name"
32+
type="text"
33+
required
34+
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 placeholder-gray-400"
35+
placeholder="Seu nome"
36+
/>
37+
</div>
38+
<div>
39+
<label htmlFor="email" className="block text-sm font-medium text-gray-800">E-mail</label>
40+
<input
41+
id="email"
42+
name="email"
43+
type="email"
44+
required
45+
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 placeholder-gray-400"
46+
placeholder="[email protected]"
47+
/>
48+
</div>
49+
<div>
50+
<label htmlFor="company" className="block text-sm font-medium text-gray-800">Empresa (opcional)</label>
51+
<input
52+
id="company"
53+
name="company"
54+
type="text"
55+
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 placeholder-gray-400"
56+
placeholder="Nome da empresa"
57+
/>
58+
</div>
59+
<div className="grid grid-cols-2 gap-4">
60+
<div>
61+
<label htmlFor="budget" className="block text-sm font-medium text-gray-800">Orçamento</label>
62+
<select
63+
id="budget"
64+
name="budget"
65+
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 bg-white"
66+
defaultValue=""
67+
>
68+
<option value="" disabled>Selecione…</option>
69+
<option value="<10k">Até R$10k</option>
70+
<option value="10-50k">R$10k–R$50k</option>
71+
<option value=">50k">Acima de R$50k</option>
72+
<option value="avaliar">A avaliar</option>
73+
</select>
74+
</div>
75+
<div>
76+
<label htmlFor="timeline" className="block text-sm font-medium text-gray-800">Prazo</label>
77+
<select
78+
id="timeline"
79+
name="timeline"
80+
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 bg-white"
81+
defaultValue=""
82+
>
83+
<option value="" disabled>Selecione…</option>
84+
<option value="urgente">Urgente</option>
85+
<option value="1-3m">1–3 meses</option>
86+
<option value=">3m">Mais de 3 meses</option>
87+
<option value="indefinido">Indefinido</option>
88+
</select>
89+
</div>
90+
</div>
91+
<div className="md:col-span-2">
92+
<label htmlFor="message" className="block text-sm font-medium text-gray-800">Mensagem</label>
93+
<textarea
94+
id="message"
95+
name="message"
96+
required
97+
rows={5}
98+
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 placeholder-gray-400"
99+
placeholder="Conte um pouco sobre o projeto, objetivos e restrições."
100+
/>
101+
</div>
102+
<div className="md:col-span-2 flex items-start">
103+
<input id="consent" name="consent" type="checkbox" required className="mt-1 mr-2" />
104+
<label htmlFor="consent" className="text-sm text-gray-800">Aceito ser contatado por e-mail para tratativas sobre este projeto.</label>
105+
</div>
106+
</div>
107+
<div className="mt-6 flex items-center gap-3">
108+
<button
109+
type="submit"
110+
className="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
111+
>
112+
Enviar proposta
113+
</button>
114+
<a href="mailto:[email protected]" className="text-blue-600 hover:text-blue-800">ou envie um e-mail</a>
115+
</div>
116+
</form>
117+
);
118+
}

src/app/components/Footer/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ export const Footer: React.FC = () => {
1212
<div className="flex flex-col md:flex-row justify-between items-center">
1313
<div className="mb-4 md:mb-0">
1414
<h2 className="text-2xl font-bold">HelpDev</h2>
15-
<p className="text-gray-400 mt-2">Compartilhando conhecimento em desenvolvimento de software desde 2013</p>
15+
<p className="text-gray-400 mt-2">Desenvolvimento de Software e Consultoria Técnica</p>
1616
</div>
1717

1818
<div className="flex flex-col md:flex-row gap-8">
1919
<div>
2020
<h3 className="text-lg font-semibold mb-2">Links</h3>
2121
<ul className="space-y-1">
2222
<li><Link href="/" className="text-gray-400 hover:text-white transition-colors">Home</Link></li>
23+
<li><Link href="/services" className="text-gray-400 hover:text-white transition-colors">Serviços</Link></li>
2324
<li><Link href="/about" className="text-gray-400 hover:text-white transition-colors">Sobre</Link></li>
2425
<li><Link href="/articles" className="text-gray-400 hover:text-white transition-colors">Artigos</Link></li>
2526
<li><Link href="/projects" className="text-gray-400 hover:text-white transition-colors">Projetos</Link></li>
2627
<li><Link href="/blog" className="text-gray-400 hover:text-white transition-colors">Blog</Link></li>
28+
<li><Link href="/#contato" className="text-gray-400 hover:text-white transition-colors">Contato</Link></li>
2729
</ul>
2830
</div>
2931

@@ -47,4 +49,3 @@ export const Footer: React.FC = () => {
4749
};
4850

4951
export default Footer;
50-

src/app/components/Navbar/index.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ export const Navbar = React.memo(() => {
4848
>
4949
Artigos
5050
</Link>
51+
<Link
52+
href="/services"
53+
className={`inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium ${
54+
isActive('/services')
55+
? 'border-blue-500 text-gray-900'
56+
: 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'
57+
}`}
58+
>
59+
Serviços
60+
</Link>
5161
<Link
5262
href="/projects"
5363
className={`inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium ${
@@ -78,6 +88,12 @@ export const Navbar = React.memo(() => {
7888
>
7989
Sobre
8090
</Link>
91+
<Link
92+
href="/#contato"
93+
className={`inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700`}
94+
>
95+
Contato
96+
</Link>
8197
</div>
8298
</div>
8399

@@ -137,6 +153,17 @@ export const Navbar = React.memo(() => {
137153
>
138154
Artigos
139155
</Link>
156+
<Link
157+
href="/services"
158+
className={`block pl-3 pr-4 py-2 border-l-4 text-base font-medium ${
159+
isActive('/services')
160+
? 'border-blue-500 text-blue-700 bg-blue-50'
161+
: 'border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700'
162+
}`}
163+
onClick={closeMenu}
164+
>
165+
Serviços
166+
</Link>
140167
<Link
141168
href="/projects"
142169
className={`block pl-3 pr-4 py-2 border-l-4 text-base font-medium ${
@@ -170,6 +197,13 @@ export const Navbar = React.memo(() => {
170197
>
171198
Sobre
172199
</Link>
200+
<Link
201+
href="/#contato"
202+
className={`block pl-3 pr-4 py-2 border-l-4 text-base font-medium border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700`}
203+
onClick={closeMenu}
204+
>
205+
Contato
206+
</Link>
173207
</div>
174208
</div>
175209
</nav>

0 commit comments

Comments
 (0)