A modern, SEO-optimized Progressive Web App (PWA) portfolio website built with Next.js, TypeScript, and Tailwind CSS.
Website: https://godwillbarasa.netlify.app/
- Offline functionality with service worker
- Installable on mobile and desktop devices
- App shortcuts for quick navigation
- Push notifications ready
- Responsive design optimized for all devices
- Structured data (Schema.org markup)
- Open Graph and Twitter Card meta tags
- XML sitemap with image optimization
- Robots.txt configuration
- Core Web Vitals optimized
- Google Search Console ready
- Next.js 13 with App Router
- TypeScript for type safety
- Tailwind CSS for styling
- MDX for rich content
- Dark/Light mode support
- Accessibility (WCAG 2.1 compliant)
Framework: Next.js 13.4.16
Language: TypeScript
Styling: Tailwind CSS
Content: MDX with rehype-prism
Deployment: Netlify
Analytics: Google Analytics (optional)
SEO: Google Search Console
src/
├── app/ # Next.js App Router
│ ├── articles/ # Blog articles (MDX)
│ ├── projects/ # Projects showcase
│ ├── speaking/ # Speaking engagements
│ ├── uses/ # Tools and tech stack
│ ├── layout.tsx # Root layout with PWA features
│ └── page.tsx # Homepage
├── components/ # Reusable components
│ ├── ArticleLayout.tsx # Article layout
│ ├── PWAInstallPrompt.tsx # PWA install prompt
│ └── Analytics.tsx # Analytics integration
├── lib/ # Utility functions
│ ├── articles.ts # Article management
│ ├── metadata.ts # SEO metadata
│ └── structured-data.ts # Schema.org markup
└── styles/ # Global styles
├── tailwind.css # Tailwind CSS
└── prism.css # Code syntax highlighting
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone https://github.com/yourusername/portfolio.git cd portfolio -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Add your configuration:
NEXT_PUBLIC_SITE_URL=https://godwillbarasa.netlify.app GOOGLE_ANALYTICS_ID=G-XXXXXXXXXX # Optional GOOGLE_TAG_MANAGER_ID=GTM-XXXXXXX # Optional
-
Run development server
npm run dev
- Create a new MDX file in
src/app/articles/[slug]/page.mdx - Add the article metadata:
export const article = { author: 'Godwill Barasa', date: '2024-12-20', title: 'Your Article Title', description: 'Article description for SEO', }
Edit the projects data in src/app/projects/page.tsx
Update speaking data in src/app/speaking/page.tsx
- Person schema for author information
- Article schema for blog posts
- Website schema for site information
- Breadcrumb schema for navigation
- Image optimization with Next.js Image component
- Code splitting for faster loading
- Service worker for offline functionality
- Caching strategies for static assets
- Web App Manifest for app installation
- Service Worker for offline functionality
- App shortcuts for quick access
- Install prompts for better UX
- Connect your GitHub repository to Netlify
- Set build command:
npm run build - Set publish directory:
.next - Deploy!
NEXT_PUBLIC_SITE_URL=https://yourdomain.com
GOOGLE_ANALYTICS_ID=G-XXXXXXXXXX
GOOGLE_TAG_MANAGER_ID=GTM-XXXXXXX- Add your site to Google Search Console
- Verify ownership with the provided meta tag
- Submit your sitemap:
/sitemap.xml - Monitor search performance
Visit /seo-dashboard to monitor:
- SEO score and recommendations
- Core Web Vitals status
- PWA optimization score
- Performance metrics
- Modify
tailwind.config.tsfor theme customization - Update colors in
src/styles/tailwind.css - Customize components in
src/components/
- Update personal information in
src/app/layout.tsx - Modify social links in
src/components/SocialIcons.tsx - Add new sections by creating new pages
- Open Chrome DevTools (F12)
- Go to Application tab
- Check Manifest and Service Workers sections
- Test offline functionality
- Open the site on mobile
- Look for "Add to Home Screen" prompt
- Test app shortcuts
- Verify offline functionality
Test your site: PageSpeed Insights
Check mobile optimization: Mobile-Friendly Test
Test structured data: Rich Results Test
- Lighthouse Score: 95+ (Performance, Accessibility, Best Practices, SEO)
- Core Web Vitals: All metrics in "Good" range
- PWA Score: 95+ (Installable, PWA Optimized)
- SEO Score: 90+ (Meta tags, structured data, sitemap)
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE.md file for details.
Godwill Barasa
- Website: https://godwillbarasa.netlify.app
- Twitter: @godwill_codes
- LinkedIn: godwillcodes
- GitHub: godwillcodes
Star this repository if you found it helpful!