A production-ready Next.js application with comprehensive SEO setup, TypeScript, and Tailwind CSS.
- SEO Optimized: Complete meta tags, Open Graph, Twitter Cards, structured data
- Performance: Image optimization, compression, static generation
- Analytics: Google Analytics 4 integration
- PWA Ready: Web app manifest and service worker support
- Accessibility: WCAG compliant components and semantic HTML
- TypeScript: Full type safety
- Tailwind CSS: Utility-first styling
- ESLint: Code quality and consistency
- Dynamic meta titles and descriptions
- Open Graph tags for Facebook/LinkedIn
- Twitter Card optimization
- Canonical URLs
- Robots meta tags
- Organization schema
- Website schema
- Breadcrumb navigation
- Article/Product schemas (ready to implement)
- XML sitemap generation (
/sitemap.xml) - Robots.txt (
/robots.txt) - Proper heading hierarchy
- Image alt tags and optimization
- Core Web Vitals optimization
- Loading states
- Error boundaries
- 404 page
- Progressive Web App (PWA) manifest
- Font optimization with
next/font
Copy .env.local.example to .env.local and configure:
cp .env.local.example .env.localFill in your values:
NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX
NEXT_PUBLIC_SITE_URL=https://yoursite.comUpdate the following files with your information:
src/lib/constants.ts
- Site name, description, and URLs
- Social media links
src/lib/seo.ts
- Default SEO values
- Author and publisher information
src/components/JsonLd.tsx
- Organization details
- Contact information
- Address
Replace these files in /public/:
favicon.ico(32x32)favicon.svg(vector)apple-touch-icon.png(180x180)icon-192.png(192x192)icon-512.png(512x512)og-image.jpg(1200x630)
- Create a Google Analytics 4 property
- Add your GA4 ID to
.env.local - The Analytics component will automatically track page views
Install dependencies:
npm installRun development server:
npm run devBuild for production:
npm run build
npm start- Configure environment variables
- Update site information in constants
- Replace favicon and social images
- Set up Google Analytics
- Verify structured data with Google's Rich Results Test
- Test social sharing with Facebook Debugger
- Check Core Web Vitals with PageSpeed Insights
- Submit sitemap to Google Search Console
npm run lint- Run ESLintnpm run lint:fix- Fix ESLint errorsnpm run type-check- TypeScript type checkingnpm run analyze- Bundle size analysis
The app includes a web manifest for PWA capabilities:
- Installable on mobile devices
- Offline-ready (add service worker as needed)
- App-like experience
- Image optimization with
next/image - Font optimization with
next/font - Automatic code splitting
- Static generation where possible
- Compression enabled
- Security headers configured
- Google Analytics 4 integration
- Core Web Vitals tracking
- Custom event tracking utilities
- Error boundary logging
- Security headers configured
- XSS protection
- Content Security Policy ready
- HTTPS enforcement in production
Deploy easily on Vercel, Netlify, or any platform supporting Node.js:
Remember to configure environment variables in your deployment platform!