A modern, responsive portfolio website built with Next.js 14, TypeScript, Tailwind CSS, and Framer Motion.
- Responsive Design: Looks great on all devices
- Dark/Light Mode: Automatic theme switching based on system preferences
- Blog Support: MDX-based blog with syntax highlighting
- Video Gallery: YouTube video integration
- Gadgets Shop: Curated list of recommended products
- Animations: Smooth page transitions and micro-interactions
- GitHub Integration: Live GitHub contribution graph
- GitHub Sponsors: Display your GitHub sponsors with beautiful cards
- Twitter/X Testimonials: Showcase tweets about your work in a marquee
- Command Palette: Quick navigation with Ctrl+K / Cmd+K
- Smooth Cursor: Custom animated cursor effect
- SEO Optimized: Meta tags and OpenGraph support
- Performance Focused: Optimized for Core Web Vitals
- Visitor Counter: Real-time unique visitor tracking with Upstash Redis
- Social Hover Cards: Live GitHub profile and Steam status hover cards on social icons
- Framework: Next.js 14
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Animations: Framer Motion
- Content: MDX
- Deployment: Vercel
- Clone the repository:
git clone https://github.com/StarKnightt/prasendev- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
- Update
src/data/resume.tsxwith your personal information. - Add your blog posts in the
contentdirectory as MDX files. - Update
src/data/products.tsto add your recommended products. - Customize theme colors in
tailwind.config.ts.
Create a .env.local file in the root directory with the following variables:
# GitHub Token (Required for GitHub Sponsors)
GITHUB_TOKEN=your_github_personal_access_token
# Upstash Redis (Required for Visitor Counter)
UPSTASH_REDIS_REST_URL=your_upstash_redis_url
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_token
# Steam Web API (Required for Steam Hover Card)
STEAM_API_KEY=your_steam_web_api_key- Go to GitHub Settings > Developer Settings > Personal Access Tokens
- Click "Generate new token (classic)"
- Give it a name (e.g., "Portfolio Sponsors")
- Select the following scopes:
read:user- Read user profile dataread:org- Read org membership (if applicable)
- Click "Generate token" and copy it
- Add it to your
.env.localfile
Note: The token is used to fetch your GitHub sponsors. Without it, the sponsors section will show an error.
- Go to Steam Web API Key Registration
- Sign in with your Steam account
- Enter your domain name and register
- Copy the API key
- Add it to your
.env.localfile - Update
VANITY_URLinsrc/app/api/steam-stats/route.tswith your Steam vanity URL
Note: The Steam API key is used for the Steam hover card which shows your live profile status, current game, level, and games count. Your Steam profile must be public for this to work.
To add testimonials from Twitter/X:
- Open
src/components/twitter-testimonials.tsx - Add tweet IDs to the
tweetIdsarray:
const tweetIds = [
"1862049464807989608", // @username
"1868648019119522142", // @another_user
// Add more tweet IDs here
];To get a tweet ID:
- Open the tweet on Twitter/X
- Copy the URL:
https://x.com/username/status/1234567890 - The ID is the number at the end:
1234567890
The portfolio includes a unique visitor counter powered by Upstash Redis. It tracks real visitors without counting refreshes.
User visits site β Component fetches API β API checks cookie β Increment or not β Return count
- Component (
visitor-counter.tsx): Fetches count from API on page load - API Route (
/api/visitor-count): Checks for cookie, increments count in Redis if new visitor - Upstash Redis: Stores the visitor count persistently in the cloud
| Feature | How |
|---|---|
| No duplicate counting | Cookie prevents re-counting for 24 hours |
| Persists across deploys | Count stored in external Redis database |
| Thread-safe | Redis incr() is atomic |
| Fast | Upstash is edge-optimized |
- Go to upstash.com and sign up
- Click Create Database β Name it (e.g.,
portfolio-visitors) - Select a region close to your users
- After creation, go to the REST API section
- Copy
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKEN - Add them to your
.env.localfile:
UPSTASH_REDIS_REST_URL=https://your-db.upstash.io
UPSTASH_REDIS_REST_TOKEN=your-secret-token- For Vercel deployment, add these in Settings β Environment Variables
Note: Without these environment variables, the visitor counter will show 0.
The portfolio automatically displays your GitHub sponsors. Features include:
- Sponsor avatar, name, and username
- Beautiful card design with hover effects
- "Sponsor me" button linking to your GitHub Sponsors page
To customize, edit src/components/github-sponsors.tsx.
βββ content/ # Blog posts (MDX)
βββ public/ # Static assets
βββ src/
β βββ app/ # Next.js app router pages
β βββ components/ # React components
β βββ data/ # Data files and types
β βββ lib/ # Utility functions
The theme can be customized in tailwind.config.ts:
theme: {
extend: {
colors: {
primary: {...},
secondary: {...},
}
}
}Update the following files to customize content:
src/data/resume.tsx: Personal information and experiencesrc/data/products.ts: Recommended productscontent/*.mdx: Blog posts
Create a new MDX file in the content directory:
---
title: "Your Post Title"
publishedAt: "2024-01-01"
summary: "Brief description of your post"
---
Your content here...# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Lint code
npm run lintThis website is PWA-ready with:
- Service Worker support
- Offline functionality
- Install prompt
- App manifest
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- shadcn/ui for the beautiful UI components
- Framer Motion for animations
- Tailwind CSS for styling
- Next.js for the framework
Your Name - @Prasenjit
Project Link: Try it here