A high-performance, SEO-optimized portfolio website built with Next.js 14, TypeScript, Tailwind CSS, and Shadcn UI. Features include authentication, admin panel, static export capabilities, comprehensive analytics, and accessibility compliance.
- Modern Tech Stack: Next.js 14, TypeScript, Tailwind CSS, Shadcn UI
- Static Export: Optimized for GitHub Pages deployment
- Responsive Design: Mobile-first design with dark mode support
- Performance Optimized: Lighthouse performance score >90
- SEO Optimized: Comprehensive meta tags, structured data, sitemap
- Accessibility: WCAG AA compliant with keyboard navigation
- Home: Hero section with introduction and key highlights
- About: Professional background, skills, and journey
- Projects: Showcase of development projects with live demos
- Research: Academic publications and research work
- Recommendations: Professional testimonials and endorsements
- Authentication: NextAuth.js integration with multiple providers
- Content Management: Admin panel for managing portfolio content
- Dynamic Updates: Real-time content updates without code changes
- Secure: Environment-based feature toggles
- Web Vitals: Real-time performance monitoring
- Google Analytics: Privacy-compliant analytics with consent management
- Error Tracking: Comprehensive error monitoring and reporting
- Bundle Optimization: Code splitting and lazy loading
src/
βββ app/ # Next.js App Router pages
β βββ api/data/ # API routes for content access
β βββ about/ # About page
β βββ projects/ # Projects page
β βββ research/ # Research papers page
β βββ experience/ # Experience page
β βββ recommendations/ # Recommendations page
βββ components/ # React components
β βββ ui/ # Shadcn UI components
β βββ layout/ # Layout components
βββ data/ # Content data (JSON files)
β βββ projects.json # Project data
β βββ research.json # Research papers data
β βββ experience.json # Work experience data
β βββ recommendations.json # Recommendations data
β βββ about-me.json # Personal information
βββ lib/ # Utility libraries
β βββ data-access.ts # Data access layer
β βββ content-service.ts # React hooks and API
β βββ content-utils.ts # Validation and utilities
β βββ utils.ts # General utilities
βββ types/ # TypeScript type definitions
β βββ content.ts # Content model types
βββ public/ # Static assets
βββ images/ # Image assets
The portfolio uses comprehensive TypeScript models for all content types:
- Project information: Title, description, technologies, status
- Media assets: Screenshots, demos, architecture diagrams
- Links: GitHub, live demo, documentation
- Metadata: Timeline, team size, achievements, metrics
- Publication details: Title, abstract, authors, venue
- Academic metadata: DOI, citation count, keywords
- Supporting materials: PDFs, supplementary data, code
- Job details: Company, position, duration, responsibilities
- Achievements: Quantified impact, recognition, metrics
- Technologies: Skills and tools used
- Testimonials: Content, author information, relationship
- Metadata: Platform, rating, featured status
- Personal info: Bio, contact, availability
- Skills: Categorized technical skills with proficiency levels
- Education: Degrees, certifications, achievements
import { ContentService } from '@/lib/data-access';
// Get all projects with filtering and pagination
const projects = await ContentService.getProjects({
published: true,
featured: true
}, { field: 'startDate', direction: 'desc' }, 1, 10);
// Get single project
const project = await ContentService.getProject('project-id');
import { useProjects, useProject } from '@/lib/content-service';
// Use projects with automatic loading states
const { data: projects, loading, error } = useProjects({
published: true,
featured: true
});
// Use single project
const { data: project, loading, error } = useProject('project-id');
All content is validated using TypeScript interfaces and runtime validation:
import { ContentValidator } from '@/lib/content-utils';
const validationResult = ContentValidator.validateProject(projectData);
if (!validationResult.isValid) {
console.log('Validation errors:', validationResult.errors);
}
import { DateUtils } from '@/lib/content-utils';
DateUtils.formatDate('2024-01-15'); // "Jan 15, 2024"
DateUtils.calculateDuration('2023-06-01', '2024-01-30'); // "7 months"
DateUtils.getRelativeTime('2023-12-01'); // "2 months ago"
import { TextUtils } from '@/lib/content-utils';
TextUtils.truncate(text, 150); // Truncate with ellipsis
TextUtils.generateExcerpt(text, 2); // Extract first 2 sentences
TextUtils.slugify('Project Title'); // "project-title"
import { ImageUtils } from '@/lib/content-utils';
ImageUtils.getImageUrl('/images/project.jpg', 'medium'); // Optimized URL
ImageUtils.getPlaceholderImage(400, 300, 'Project Image'); // Placeholder
Edit src/data/projects.json
and add a new project:
{
"id": "my-new-project",
"title": "My Awesome Project",
"description": "Detailed description...",
"shortDescription": "Brief summary...",
"technologies": ["React", "Node.js", "PostgreSQL"],
"category": "web",
"status": "completed",
"featured": true,
"images": [...],
"links": [...],
"startDate": "2024-01-01",
"endDate": "2024-03-01",
...
}
Edit src/data/experience.json
:
{
"id": "new-job",
"company": "Tech Company",
"position": "Senior Developer",
"location": "San Francisco, CA",
"locationType": "hybrid",
"startDate": "2024-01-01",
"isCurrent": true,
...
}
Edit src/data/research.json
:
{
"id": "paper-new",
"title": "Novel Research Paper",
"abstract": "Research abstract...",
"authors": [...],
"venue": "Conference Name",
"venueType": "conference",
...
}
- Enable GitHub Pages in your repository settings
- Set source to "GitHub Actions"
- Push to main branch - deployment happens automatically
The site will be available at: https://username.github.io/repository-name
Copy .env.example
to .env.local
and configure:
NEXT_PUBLIC_SITE_URL=https://username.github.io
NEXT_PUBLIC_SITE_NAME="Your Name - Portfolio"
NEXT_PUBLIC_SITE_DESCRIPTION="Your professional tagline"
NEXT_PUBLIC_CONTACT_EMAIL=your.email@example.com
To use a custom domain with GitHub Pages:
- Add
CNAME
file to thepublic
directory with your domain - Configure DNS settings with your domain provider
- Enable "Enforce HTTPS" in GitHub Pages settings
- Node.js 18+
- npm or yarn
- Clone the repository
git clone https://github.com/username/portfolio.git
cd portfolio
- Install dependencies
npm install
- Run development server
npm run dev
- Open browser to http://localhost:3000
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint errors
npm run format # Format code with Prettier
npm run type-check # Run TypeScript type checking
- Create component in
src/components/
- Use Shadcn UI components from
src/components/ui/
- Follow existing patterns for styling and TypeScript
API routes are available at /api/data/
:
GET /api/data/projects
- List projects with filteringGET /api/data/projects/[id]
- Get single projectGET /api/data/projects/featured
- Get featured projectsGET /api/data/research
- List research papersGET /api/data/experience
- List experienceGET /api/data/recommendations
- List recommendationsGET /api/data/about-me
- Get about me dataGET /api/data/search?q=query
- Search all contentGET /api/data/analytics
- Get analytics data
Modify theme colors in src/app/globals.css
:
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
/* ... */
}
Configure fonts in src/app/layout.tsx
:
import { Inter } from 'next/font/google';
const inter = Inter({ subsets: ['latin'] });
Modify layout components in src/components/layout/
:
header.tsx
- Navigation headerfooter.tsx
- Site footermain-layout.tsx
- Page layout wrapper
- Dynamic meta tags for each page
- Open Graph and Twitter Card support
- Structured data for projects and research
- Sitemap generation
- Robots.txt
Add Google Analytics by setting NEXT_PUBLIC_GA_ID
in environment variables.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make changes and commit:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - React framework
- Tailwind CSS - CSS framework
- Shadcn/ui - UI components
- Radix UI - Headless UI components
- Lucide React - Icon library
Built with β€οΈ using modern web technologies