Live Demo β’ Report Bug β’ Request Feature
β οΈ Important NoteThis repository is a documentation-only showcase of a private project.
The source code is intentionally not public.
This README is provided to demonstrate:
- System design & architecture
- Applied GenAI engineering (RAG, agentic tools, fallback strategies)
- Full-stack development practices
- Production-ready engineering mindset
- β¨ Features
- π― What Makes This Portfolio Special
- π οΈ Tech Stack
- ποΈ Architecture
- π Getting Started
- π¦ Project Structure
- π Environment Variables
- π¨ Key Components
- π€ AI Virtual Assistant
- π Blog System
- π’ Deployment
- π License
- π§ Contact
- Dual LLM Architecture: Powered by Gemini 1.5 Flash with Groq (Llama 3) fallback
- RAG (Retrieval Augmented Generation): Context-aware responses using portfolio data
- Agentic AI with Tools: Function calling for resume delivery, session archiving, and connection requests
- Conversation Memory: Redis-backed chat history with intelligent context management
- Multi-Level Rate Limiting: IP-based protection using Vercel Redis (KV)
- Responsive Design: Pixel-perfect across all devices (desktop, tablet, mobile)
- Dark/Light Mode: Elegant theme switching with system preference detection
- Interactive Project Previews: Live iframe previews with device mockups (desktop/tablet/mobile)
- Smooth Animations: Framer Motion powered transitions and micro-interactions
- Glassmorphic UI: Modern glassmorphism effects with backdrop blur
- Idle Detection System: Smart user engagement with haptic feedback
- MDX Support: Write blog posts with interactive React components
- SEO Optimized: Server-side rendering with dynamic meta tags, Open Graph, and Twitter Cards
- Syntax Highlighting: Beautiful code blocks with
react-syntax-highlighter - RSS Feed: Auto-generated RSS feed for blog subscribers
- Author Pages: Multi-author support with dedicated author profiles
- Reading Time Estimation: Automatic calculation based on content length
- Dynamic Portfolio Showcase: Interactive project cards with filtering
- Skills Matrix: Categorized skill display (Frontend, Backend, AI, Cloud, etc.)
- Timeline Journey: Visual career and education timeline
- Automated Resume Delivery: Email integration using Resend API
- Session Archiving: Lead generation with contact request storage
- Contact Form: Secure message handling with validation
πΉ AI-First Approach: Not just a static portfolio, but an intelligent assistant that can answer questions, deliver resumes, and handle connection requests autonomously.
πΉ Production-Ready Architecture: Built with enterprise-level patterns including server-side rate limiting, Redis caching, error boundaries, and comprehensive SEO.
πΉ Developer Experience: TypeScript-first development with ESLint, type safety, and modular component architecture.
πΉ Performance Optimized: Next.js 14 App Router, image optimization, lazy loading, and efficient bundle splitting.
πΉ Scalable & Maintainable: Redux state management, custom hooks, utility functions, and clean code principles.
- Framework: Next.js 14 (App Router)
- Language: TypeScript 5.8
- Styling: Tailwind CSS 3.4 + Custom CSS
- UI Components: Radix UI + shadcn/ui
- Icons: React Icons (Lucide, Font Awesome)
- State Management: Redux Toolkit + React Redux
- Forms: React Hook Form + Zod validation
- Markdown: MDX with remark/rehype plugins
- Theme: next-themes for dark/light mode
- AI Models:
- Google Gemini 1.5 Flash (Primary)
- Groq (Llama 3.3 70B) (Fallback)
- Database & Cache: Vercel Redis (KV)
- Email Service: Resend
- Rate Limiting: Custom Redis-based middleware
- Hosting: Vercel
- Version Control: Git + GitHub
- Package Manager: npm
- Build Tool: Next.js Compiler (SWC)
- Linting: ESLint + TypeScript ESLint
portfolio-hub/
β
βββ π¨ Frontend (Next.js App Router)
β βββ Server Components (SSR/SSG)
β βββ Client Components (Interactive UI)
β βββ API Routes (Backend Logic)
β
βββ π€ AI Layer
β βββ Gemini 1.5 Flash (Primary LLM)
β βββ Groq Llama 3 (Fallback LLM)
β βββ RAG System (Context Retrieval)
β βββ Tool Functions (Agentic Actions)
β
βββ πΎ Data Layer
β βββ Vercel Redis KV (Rate Limiting)
β βββ Session Storage (Chat History)
β βββ Local Data (Portfolio Content)
β
βββ π§ External Services
βββ Resend (Email Delivery)
βββ Vercel Analytics
- Component Composition: Reusable UI components with props-based configuration
- Server/Client Separation: Strategic use of
"use client"directive - Custom Hooks: Abstracted logic in
src/hooks/ - Redux Slices: Domain-driven state management
- API Route Handlers: Secure backend endpoints with middleware
- MDX Content: Content as code with React component embedding
- Node.js 18+ and npm
- Vercel account (for Redis KV)
- API keys for Gemini, Groq, and Resend
-
Clone the repository
git clone https://github.com/SumatM/sumat-s-portfolio-hub.git cd sumat-s-portfolio-hub -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the root directory:cp .env.example .env.local
Fill in your API keys (see Environment Variables section)
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:8080
npm run build
npm startsumat-s-portfolio-hub/
β
βββ π content/ # MDX blog posts
β βββ blog/
β βββ *.mdx # Blog post files
β βββ authors.yaml # Author metadata
β
βββ π public/ # Static assets
β βββ portfolio.webp # Project images
β βββ sumat.webp # Profile photo
β βββ sitemap.xml # SEO sitemap
β βββ robots.txt # Crawler instructions
β
βββ π scripts/ # Build & utility scripts
β βββ generate-seo.js # SEO generation
β βββ new-post.js # Blog post creator
β
βββ π src/
β β
β βββ π app/ # Next.js 14 App Router
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page
β β βββ globals.css # Global styles
β β β
β β βββ π api/ # API routes
β β β βββ chat/ # AI chatbot endpoint
β β β βββ resume/ # Resume delivery
β β β βββ archive-session/ # Session archiving
β β β
β β βββ π blog/ # Blog pages
β β β βββ page.tsx # Blog index
β β β βββ [slug]/ # Individual posts
β β β βββ author/ # Author pages
β β β
β β βββ π projects/ # Projects pages
β β β βββ page.tsx # Projects list
β β β βββ [id]/ # Project detail
β β β
β β βββ π skills/ # Skills pages
β β βββ page.tsx # Skills list
β β βββ [id]/ # Skill detail
β β
β βββ π components/ # React components
β β βββ ChatBot.tsx # AI Assistant
β β βββ ProjectCard.tsx # Project cards
β β βββ SmoothScrollNav.tsx # Navigation
β β βββ Footer.tsx # Footer
β β βββ ui/ # shadcn/ui components
β β
β βββ π data/ # Static data
β β βββ portfolioData.ts # Portfolio content
β β
β βββ π hooks/ # Custom React hooks
β β βββ use-mobile.tsx # Mobile detection
β β βββ use-toast.ts # Toast notifications
β β
β βββ π lib/ # Utility libraries
β β βββ blog.ts # Blog post utilities
β β βββ redis.ts # Redis client
β β βββ utils.ts # Helper functions
β β
β βββ π services/ # External services
β β βββ aiChatService.ts # AI chat logic
β β βββ emailService.ts # Email handling
β β
β βββ π store/ # Redux store
β βββ store.ts # Store configuration
β βββ portfolioSlice.ts # Portfolio state
β βββ hooks.ts # Typed hooks
β
βββ .env.local # Environment variables (gitignored)
βββ next.config.js # Next.js configuration
βββ tailwind.config.ts # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies
Create a .env.local file with the following variables:
# AI Services
GEMINI_API_KEY=your_google_gemini_api_key_here
GROQ_API_KEY=your_groq_api_key_here
# Redis (Vercel KV)
KV_REST_API_URL=your_vercel_kv_rest_api_url
KV_REST_API_TOKEN=your_vercel_kv_rest_api_token
KV_REST_API_READ_ONLY_TOKEN=your_vercel_kv_read_only_token
KV_URL=your_vercel_kv_url
# Email Service (Resend)
RESEND_API_KEY=your_resend_api_key_here
# Application
NEXT_PUBLIC_SITE_URL=https://www.sumatmallick.xyz- Gemini API: Google AI Studio
- Groq API: Groq Console
- Vercel Redis: Vercel Dashboard β Storage β Create KV Database
- Resend: Resend Dashboard
- β Source code is private and not included in this repository
- β This project is not open source
- β Documentation is shared for learning, architectural review, and evaluation purposes only
This repository exists to showcase system design decisions, applied GenAI patterns, and full-stack engineering practices.
Please do not attempt to replicate this project verbatim.
The intelligent assistant that powers real-time interactions:
- Session management with Redis
- Multi-turn conversation support
- Markdown rendering with syntax highlighting
- Tool execution (resume delivery, connection requests)
- Toast notifications for user feedback
Interactive project showcase with:
- Live iframe previews (desktop/tablet/mobile views)
- Device mockups with browser chrome
- Self-detection (displays message if viewing current site)
- Responsive viewport controls
- Dynamic tag display
Custom navigation with:
- Active section highlighting
- Smooth scroll behavior
- Mobile-responsive hamburger menu
- Theme toggle integration
- Glassmorphic design
MDX-powered blog with:
- Server-side rendering for SEO
- Dynamic metadata generation
- Syntax-highlighted code blocks
- Author attribution
- Reading time estimation
- Related posts (can be extended)
The portfolio includes a sophisticated AI assistant with the following capabilities:
- Context Awareness: RAG system retrieves relevant portfolio information
- Multi-Turn Conversations: Redis-backed chat history
- Intelligent Fallback: Switches to Groq if Gemini fails
- Tool Calling: Can execute functions like sending resume, archiving sessions
sendResumeViaEmail: Delivers resume to user's email using Resend APIarchiveConnectionRequest: Stores user contact info for follow-up
- IP-Based: 20 requests per hour per IP
- Redis-Backed: Distributed rate limiting using Vercel KV
- Graceful Degradation: Clear error messages when limit exceeded
// User: "Can you send me your resume?"
// Assistant: Executes sendResumeViaEmail tool
// Result: Email sent with resume attachmentUse the provided script:
npm run new-postThis will create a new MDX file in content/blog/ with frontmatter template.
---
title: "Your Post Title"
date: "2025-12-26"
author: "sumat-mallick"
excerpt: "A brief description of your post"
image: "/blog-images/your-image.jpg"
tags: ["tag1", "tag2"]
---- Write in Markdown with JSX support
- Embed React components
- Code syntax highlighting
- GitHub Flavored Markdown (GFM)
See HOW_TO_BLOG.md for detailed instructions.
This project is optimized for Vercel deployment.
-
Push to GitHub
git push origin main
-
Import to Vercel
- Go to Vercel Dashboard
- Import your GitHub repository
- Configure environment variables
- Deploy!
Add all variables from .env.local to Vercel:
- Settings β Environment Variables β Add each key-value pair
- Go to Storage tab in Vercel Dashboard
- Create a new KV Database
- Copy connection strings to environment variables
This project is open source and available under the MIT License.
Feel free to use this as a template for your own portfolio, but please give credit and don't copy it entirely. Make it your own! π¨
Sumat Mallick
Software Engineer | Full-Stack & GenAI Developer
- π Website: sumatmallick.xyz
- π§ Email: [email protected]
- πΌ LinkedIn: linkedin.com/in/sumatmallick
- π GitHub: github.com/SumatM
