diff --git a/.editorconfig b/.editorconfig new file mode 100755 index 0000000..f15441a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100755 index 0000000..0842af6 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,8 @@ +module.exports = { + extends: ['next/core-web-vitals'], + rules: { + '@next/next/no-img-element': 'off', + 'prefer-const': 'error', + 'no-var': 'error', + }, +}; diff --git a/.gitattributes b/.gitattributes new file mode 100755 index 0000000..20fa36b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +* text=auto eol=lf +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf +*.{js,jsx,ts,tsx,json,css,scss,md} text eol=lf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100755 index 0000000..8ff1623 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,74 @@ +name: CI + +on: + push: + branches: [main, develop] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run linting + run: npm run lint + + - name: Run type checking + run: npm run type-check + + - name: Check formatting + run: npm run format:check + + - name: Build application + run: npm run build + + deploy: + needs: test + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build application + run: npm run build + env: + SITE_URL: ${{ secrets.SITE_URL }} + CONTACT_TO_EMAIL: ${{ secrets.CONTACT_TO_EMAIL }} + + # Add deployment steps here based on your hosting provider + # Example for Vercel: + # - name: Deploy to Vercel + # uses: amondnet/vercel-action@v25 + # with: + # vercel-token: ${{ secrets.VERCEL_TOKEN }} + # vercel-org-id: ${{ secrets.ORG_ID }} + # vercel-project-id: ${{ secrets.PROJECT_ID }} + # vercel-args: '--prod' diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..85d47a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,87 @@ +# Dependencies +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Next.js +.next/ +out/ +build/ +dist/ + +# Environment variables +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# Vercel +.vercel + +# TypeScript +*.tsbuildinfo +next-env.d.ts + +# IDE +.vscode/ +.idea/ +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db + +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Coverage directory used by tools like istanbul +coverage/ + +# Dependency directories +jspm_packages/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..d24fdfc --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx lint-staged diff --git a/.prettierignore b/.prettierignore new file mode 100755 index 0000000..a307f57 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,10 @@ +node_modules +.next +build +dist +public +*.min.js +*.min.css +package-lock.json +yarn.lock +pnpm-lock.yaml diff --git a/.prettierrc b/.prettierrc new file mode 100755 index 0000000..7225824 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "semi": true, + "trailingComma": "es5", + "singleQuote": true, + "printWidth": 80, + "tabWidth": 2, + "useTabs": false +} diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..7ede900 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +# Multi-stage build for production +FROM node:22-alpine AS deps +WORKDIR /app +COPY package*.json ./ +RUN npm ci --only=production + +FROM node:22-alpine AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm ci +COPY . . +RUN npm run build + +FROM node:22-alpine AS runner +WORKDIR /app + +ENV NODE_ENV=production +ENV PORT=3000 + +# Create non-root user +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --uid 1001 nextjs + +# Copy built application +COPY --from=builder /app/public ./public +COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ +COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static + +USER nextjs + +EXPOSE 3000 + +ENV PORT=3000 +ENV HOSTNAME="0.0.0.0" + +# Health check +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD curl -f http://localhost:3000/api/health || exit 1 + +CMD ["node", "server.js"] diff --git a/app/about/page.tsx b/app/about/page.tsx new file mode 100755 index 0000000..16ca308 --- /dev/null +++ b/app/about/page.tsx @@ -0,0 +1,307 @@ +import type { Metadata } from 'next'; +import { CTASection } from '@/components/cta-section'; + +export const metadata: Metadata = { + title: 'About Hampton, Brown & Associates, PC', + description: 'Learn about our team of experienced CPAs and our commitment to helping clients achieve their economic goals through federal tax services and financial planning in Corpus Christi, Texas.', + openGraph: { + title: 'About Hampton, Brown & Associates, PC', + description: 'Learn about our team of experienced CPAs and our commitment to helping clients achieve their economic goals.', + images: ['/images/about-partners.jpg'], + }, +}; + +export default function AboutPage() { + return ( + <> + {/* Hero */} +
+
+

+ About Hampton, Brown & Associates +

+

+ Three decades of trusted CPA services, built on clear communication, ethical practices, and genuine commitment to our clients' financial success. +

+ +
+
+ + {/* Our Story Section */} +
+
+
+
+

+ Our Story +

+
+

+ Founded in 1992 by Jerry Hampton and Cheryl Brown, Hampton, Brown & Associates began with a simple mission: to provide Corpus Christi businesses and individuals with proactive, planning-focused accounting and financial services. +

+

+ Over three decades later, we've built our reputation on clear communication, ethical practices, and a genuine commitment to our clients' financial success. We don't just prepare your taxes—we help you plan for the future. +

+
+
+
+
+
+ + + +
+
+
32+
+
Years of Service
+
Established 1992
+
+
+
+
+ + {/* Our Values Section */} +
+
+
+

+ Our Values +

+

+ These core principles guide everything we do and every relationship we build. +

+
+
+
+
+
+ + + +
+
+

Planning-First Approach

+

+ We believe in proactive planning rather than reactive solutions. Every strategy is designed with your long-term success in mind. +

+
+
+
+
+ + + +
+
+

Clear Communication

+

+ No jargon, no confusion. We explain complex financial matters in plain English so you can make informed decisions. +

+
+
+
+
+ + + +
+
+

Ethical Standards

+

+ Our commitment to integrity and professional ethics guides every client relationship and business decision we make. +

+
+
+
+
+ + + +
+
+

Responsive Service

+

+ When you need us, we're here. Quick response times and proactive communication are fundamental to our service. +

+
+
+
+
+ + {/* Our Journey Timeline */} +
+
+
+

+ Our Journey +

+

+ Three decades of growth, service, and commitment to our clients. +

+
+
+
+
+
+ 1992 +
+
+
+

Firm Founded

+

+ Jerry Hampton and Cheryl Brown established the firm with a vision to provide comprehensive CPA services to Corpus Christi. +

+
+
+
+
+
+ 2000 +
+
+
+

Expanded Services

+

+ Added estate planning and financial advisory services to better serve our growing client base. +

+
+
+
+
+
+ 2010 +
+
+
+

500+ Clients

+

+ Reached milestone of serving over 500 individual and business clients throughout South Texas. +

+
+
+
+
+
+ 2024 +
+
+
+

Continued Excellence

+

+ Over three decades of trusted service with a commitment to innovation and client success. +

+
+
+
+
+
+ + {/* Leadership Team */} +
+
+
+

+ Leadership Team +

+

+ Meet the experienced CPAs who founded and continue to lead our firm. +

+
+
+
+
+
+ JH +
+
+

Jerry Hampton, CPA

+

Managing Partner & Founder

+

+ With over 30 years of experience in public accounting, Jerry specializes in complex tax strategies and business advisory services. His expertise helps clients minimize tax liability while maximizing their economic potential. +

+
+
+
+ CPA License: Texas State Board +
+
+
+ AICPA Member +
+
+
+ Specializes in Business Tax Planning +
+
+
+
+
+
+ CB +
+
+

Cheryl Brown, CPA

+

Partner & Founder

+

+ Cheryl brings extensive expertise in estate planning, individual tax preparation, and financial planning. Her client-focused approach ensures personalized solutions that align with each client's unique goals and circumstances. +

+
+
+
+ CPA License: Texas State Board +
+
+
+ Estate Planning Specialist +
+
+
+ Personal Financial Planning +
+
+
+
+
+
+ + {/* Mission Section */} +
+
+
+

+ Our Mission +

+

+ To provide exceptional accounting, tax, and financial planning services through proactive planning, clear communication, and unwavering commitment to our clients' long-term financial success. +

+
+ + +
+
+
+
+ + + + ); +} diff --git a/app/api/contact/route.ts b/app/api/contact/route.ts new file mode 100755 index 0000000..fcf99a4 --- /dev/null +++ b/app/api/contact/route.ts @@ -0,0 +1,91 @@ +import { NextRequest, NextResponse } from 'next/server'; +import { contactFormSchema } from '@/lib/validations'; +import { Resend } from 'resend'; + +// Simple in-memory rate limiting (in production, use Redis or similar) +const rateLimitMap = new Map(); + +const RATE_LIMIT_WINDOW = 60 * 1000; // 1 minute +const RATE_LIMIT_MAX = 5; // 5 requests per minute + +function checkRateLimit(ip: string): boolean { + const now = Date.now(); + const record = rateLimitMap.get(ip); + + if (!record || now > record.resetTime) { + rateLimitMap.set(ip, { count: 1, resetTime: now + RATE_LIMIT_WINDOW }); + return true; + } + + if (record.count >= RATE_LIMIT_MAX) { + return false; + } + + record.count++; + return true; +} + +export async function POST(request: NextRequest) { + try { + // Rate limiting + const ip = request.ip || request.headers.get('x-forwarded-for') || 'unknown'; + if (!checkRateLimit(ip)) { + return NextResponse.json( + { error: 'Too many requests. Please try again later.' }, + { status: 429 } + ); + } + + // Parse and validate request body + const body = await request.json(); + const validatedData = contactFormSchema.parse(body); + + // Log in development + if (process.env.NODE_ENV === 'development') { + console.log('Contact form submission:', validatedData); + } + + // Send email in production if Resend is configured + if (process.env.NODE_ENV === 'production' && process.env.RESEND_API_KEY && process.env.CONTACT_TO_EMAIL) { + try { + const resend = new Resend(process.env.RESEND_API_KEY); + + await resend.emails.send({ + from: 'Hamton Brown CPA ', + to: process.env.CONTACT_TO_EMAIL, + subject: `New Contact Form Submission from ${validatedData.name}`, + html: ` +

New Contact Form Submission

+

Name: ${validatedData.name}

+

Email: ${validatedData.email}

+ ${validatedData.phone ? `

Phone: ${validatedData.phone}

` : ''} +

Message:

+

${validatedData.message}

+ `, + }); + } catch (emailError) { + console.error('Failed to send email:', emailError); + // Don't fail the request if email fails + } + } + + return NextResponse.json( + { message: 'Thank you for your message. We will get back to you soon.' }, + { status: 200 } + ); + } catch (error) { + console.error('Contact form error:', error); + + if (error instanceof Error && error.name === 'ZodError') { + return NextResponse.json( + { error: 'Invalid form data. Please check your inputs.' }, + { status: 400 } + ); + } + + return NextResponse.json( + { error: 'Internal server error. Please try again later.' }, + { status: 500 } + ); + } +} diff --git a/app/contact/page.tsx b/app/contact/page.tsx new file mode 100755 index 0000000..7567dd0 --- /dev/null +++ b/app/contact/page.tsx @@ -0,0 +1,157 @@ +import type { Metadata } from 'next'; +import Image from 'next/image'; +import { Mail, Phone, MapPin, Clock } from 'lucide-react'; +import { ContactForm } from '@/components/contact-form'; +import { CTASection } from '@/components/cta-section'; + +export const metadata: Metadata = { + title: 'Contact Us', + description: 'Get in touch with Hamton Brown CPA for professional tax and financial services in Corpus Christi, Texas. Schedule a consultation today.', + openGraph: { + title: 'Contact Us', + description: 'Get in touch with Hamton Brown CPA for professional tax and financial services.', + images: ['/images/contact-exterior.jpg'], + }, +}; + +export default function ContactPage() { + return ( + <> + {/* Hero */} +
+
+

+ Get in Touch +

+

+ Ready to start your tax planning journey? Contact us today to schedule a consultation or ask any questions about our services. +

+ +
+
+ +
+
+
+
+
+

+ Contact Information +

+

+ We're here to help with all your tax and financial needs. Reach out to us through any of the methods below. +

+
+
+
+ +
+
+

Phone

+

(361) 888-7711

+
+
+
+
+ +
+
+

Email

+

info@hamptonbrown.com

+
+
+
+
+ +
+
+

Address

+

711 N. Carancahua St, Suite 800

+

Corpus Christi, TX 78401-0545

+
+
+
+
+ +
+
+

Business Hours

+

Monday - Friday

+

9:00 AM - 5:00 PM

+
+
+
+
+

Free Consultation

+

+ Schedule a free 30-minute consultation to discuss your tax and financial needs. No obligation, just professional advice to help you make informed decisions. +

+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+

+ Visit Our Office +

+

+ Located in the heart of Corpus Christi, our office is easily accessible and provides a comfortable environment for confidential discussions about your financial matters. +

+
+
+

Parking

+

Free parking available in our building's parking garage

+
+
+

Accessibility

+

Our office is fully accessible with elevator access and ADA-compliant facilities

+
+
+

Appointments

+

We recommend scheduling appointments in advance to ensure we can give you our full attention

+
+
+
+
+ Professional office interior with clean desk setup +
+
+
+
+
+ + + + ); +} diff --git a/app/globals.css b/app/globals.css new file mode 100755 index 0000000..5ee98e2 --- /dev/null +++ b/app/globals.css @@ -0,0 +1,133 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + --primary: 221.2 83.2% 53.3%; + --primary-foreground: 210 40% 98%; + --secondary: 210 40% 96%; + --secondary-foreground: 222.2 84% 4.9%; + --muted: 210 40% 96%; + --muted-foreground: 215.4 16.3% 46.9%; + --accent: 210 40% 96%; + --accent-foreground: 222.2 84% 4.9%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 221.2 83.2% 53.3%; + --radius: 0.5rem; + } + + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + --primary: 217.2 91.2% 59.8%; + --primary-foreground: 222.2 84% 4.9%; + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + --ring: 224.3 76.3% 94.1%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + font-feature-settings: "rlig" 1, "calt" 1; + } +} + +@layer components { + .container { + @apply mx-auto max-w-7xl px-4 sm:px-6 lg:px-8; + } + + .prose { + @apply max-w-none; + } + + .prose h1 { + @apply text-4xl font-bold text-ink mb-6; + } + + .prose h2 { + @apply text-3xl font-bold text-ink mb-4 mt-8; + } + + .prose h3 { + @apply text-2xl font-semibold text-ink mb-3 mt-6; + } + + .prose p { + @apply text-slate mb-4 leading-relaxed; + } + + .prose ul { + @apply list-disc list-inside mb-4 space-y-2; + } + + .prose li { + @apply text-slate; + } + + .prose a { + @apply text-navy hover:text-teal transition-colors; + } +} + +/* Accessibility improvements */ +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } +} + +/* Focus styles */ +.focus-visible:focus { + outline: 2px solid #0F2740; + outline-offset: 2px; +} + +/* Skip link */ +.skip-link { + position: absolute; + top: -40px; + left: 6px; + background: #0F2740; + color: white; + padding: 8px; + text-decoration: none; + border-radius: 4px; + z-index: 1000; +} + +.skip-link:focus { + top: 6px; +} diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100755 index 0000000..d6ef836 --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,156 @@ +import type { Metadata } from 'next'; +import { Inter } from 'next/font/google'; +import './globals.css'; +import { SiteHeader } from '@/components/site-header'; +import { SiteFooter } from '@/components/site-footer'; + +const inter = Inter({ subsets: ['latin'] }); + +export const metadata: Metadata = { + title: { + default: 'Hampton, Brown & Associates, PC - Professional Tax Services in Corpus Christi', + template: '%s | Hampton, Brown & Associates, PC', + }, + description: 'Expert federal income and estate tax services, financial planning, and goal-oriented strategies in Corpus Christi, Texas. Helping clients achieve their economic goals through proactive planning.', + keywords: ['CPA', 'tax preparation', 'tax planning', 'Corpus Christi', 'Texas', 'accounting', 'tax services', 'estate tax', 'federal tax', 'financial planning'], + authors: [{ name: 'Hampton, Brown & Associates, PC' }], + creator: 'Hampton, Brown & Associates, PC', + publisher: 'Hampton, Brown & Associates, PC', + formatDetection: { + email: false, + address: false, + telephone: false, + }, + metadataBase: new URL(process.env.SITE_URL || 'https://hamptonbrown.com'), + alternates: { + canonical: '/', + }, + openGraph: { + type: 'website', + locale: 'en_US', + url: '/', + title: 'Hampton, Brown & Associates, PC - Professional Tax Services in Corpus Christi', + description: 'Expert federal income and estate tax services, financial planning, and goal-oriented strategies in Corpus Christi, Texas.', + siteName: 'Hampton, Brown & Associates, PC', + images: [ + { + url: '/images/home-hero.jpg', + width: 1200, + height: 630, + alt: 'Hampton, Brown & Associates office in Corpus Christi', + }, + ], + }, + twitter: { + card: 'summary_large_image', + title: 'Hampton, Brown & Associates, PC - Professional Tax Services in Corpus Christi', + description: 'Expert federal income and estate tax services, financial planning, and goal-oriented strategies in Corpus Christi, Texas.', + images: ['/images/home-hero.jpg'], + }, + robots: { + index: true, + follow: true, + googleBot: { + index: true, + follow: true, + 'max-video-preview': -1, + 'max-image-preview': 'large', + 'max-snippet': -1, + }, + }, + verification: { + google: 'your-google-verification-code', + }, +}; + +const jsonLd = { + '@context': 'https://schema.org', + '@type': 'AccountingService', + name: 'Hampton, Brown & Associates, PC', + description: 'Expert federal income and estate tax services, financial planning, and goal-oriented strategies in Corpus Christi, Texas', + url: 'https://hamptonbrown.com', + telephone: '+1-361-888-7711', + email: 'info@hamptonbrown.com', + address: { + '@type': 'PostalAddress', + streetAddress: '711 N. Carancahua St, Suite 800', + addressLocality: 'Corpus Christi', + addressRegion: 'TX', + postalCode: '78401-0545', + addressCountry: 'US', + }, + geo: { + '@type': 'GeoCoordinates', + latitude: 27.8006, + longitude: -97.3964, + }, + openingHours: 'Mo-Fr 09:00-17:00', + priceRange: '$$', + areaServed: { + '@type': 'City', + name: 'Corpus Christi', + }, + serviceArea: { + '@type': 'City', + name: 'Corpus Christi', + }, + hasOfferCatalog: { + '@type': 'OfferCatalog', + name: 'Tax Services', + itemListElement: [ + { + '@type': 'Offer', + itemOffered: { + '@type': 'Service', + name: 'Tax Planning', + description: 'Strategic year-round tax planning to minimize your tax burden', + }, + }, + { + '@type': 'Offer', + itemOffered: { + '@type': 'Service', + name: 'Income Tax Preparation', + description: 'Comprehensive individual and business tax return preparation', + }, + }, + { + '@type': 'Offer', + itemOffered: { + '@type': 'Service', + name: 'Estate Tax Planning', + description: 'Comprehensive estate planning to protect your legacy', + }, + }, + ], + }, +}; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + +