101 | {name} 102 |
103 | 104 | 105 | 106 |107 | {designation} 108 |
109 |121 | Redirect not working? 122 |
123 | 127 | Open resume directly├── src ├── app │ ├── favicon.ico │ ├── globals.css │ ├── layout.tsx │ ├── api │ │ └── notify-view │ │ │ └── route.ts │ └── page.tsx └── components │ ├── ProgressBar.tsx │ └── SocialLinks.tsx ├── postcss.config.mjs ├── next.config.ts ├── vercel.json ├── .env.example ├── eslint.config.mjs ├── .gitignore ├── tsconfig.json ├── package.json ├── LICENSE ├── ResumeConfig.ts └── README.md /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VishalRMahajan/ResumeRedirect/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: ["@tailwindcss/postcss"], 3 | }; 4 | 5 | export default config; 6 | -------------------------------------------------------------------------------- /next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | /* config options here */ 5 | }; 6 | 7 | export default nextConfig; 8 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": [ 3 | { 4 | "source": "/(.*)", 5 | "headers": [ 6 | { 7 | "key": "X-Robots-Tag", 8 | "value": "index, follow" 9 | } 10 | ] 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | // Create a .env file in the root directory of your project and fill in the values below with your own. 2 | // EMAIL_ USER is the email address you want to use to send notifications. 3 | // EMAIL_PASSWORD is the password for that email address. (Make sure to use an app password if using Gmail.) 4 | // NOTIFICATION_EMAIL is the email address where you want to receive notifications. 5 | EMAIL_USER= 6 | EMAIL_PASSWORD= 7 | NOTIFICATION_EMAIL= 8 | NEXT_PUBLIC_RESUME_URL= -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import { dirname } from "path"; 2 | import { fileURLToPath } from "url"; 3 | import { FlatCompat } from "@eslint/eslintrc"; 4 | 5 | const __filename = fileURLToPath(import.meta.url); 6 | const __dirname = dirname(__filename); 7 | 8 | const compat = new FlatCompat({ 9 | baseDirectory: __dirname, 10 | }); 11 | 12 | const eslintConfig = [ 13 | ...compat.extends("next/core-web-vitals", "next/typescript"), 14 | ]; 15 | 16 | export default eslintConfig; 17 | -------------------------------------------------------------------------------- /src/app/globals.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | 3 | :root { 4 | --background: #ffffff; 5 | --foreground: #171717; 6 | } 7 | 8 | @theme inline { 9 | --color-background: var(--background); 10 | --color-foreground: var(--foreground); 11 | --font-sans: var(--font-geist-sans); 12 | --font-mono: var(--font-geist-mono); 13 | } 14 | 15 | @media (prefers-color-scheme: dark) { 16 | :root { 17 | --background: #0a0a0a; 18 | --foreground: #ededed; 19 | } 20 | } 21 | 22 | body { 23 | background: var(--background); 24 | color: var(--foreground); 25 | font-family: Arial, Helvetica, sans-serif; 26 | } 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./src/*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "resume-redirect", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev --turbopack", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "framer-motion": "^12.23.0", 13 | "next": "15.3.8", 14 | "nodemailer": "^6.10.1", 15 | "react": "^19.0.0", 16 | "react-dom": "^19.0.0", 17 | "react-icons": "^5.5.0" 18 | }, 19 | "devDependencies": { 20 | "@eslint/eslintrc": "^3", 21 | "@tailwindcss/postcss": "^4", 22 | "@types/node": "^20", 23 | "@types/nodemailer": "^6.4.17", 24 | "@types/react": "^19", 25 | "@types/react-dom": "^19", 26 | "eslint": "^9", 27 | "eslint-config-next": "15.3.1", 28 | "tailwindcss": "^4", 29 | "typescript": "^5" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Vishal Mahajan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import { Geist, Geist_Mono } from "next/font/google"; 3 | import "./globals.css"; 4 | import { ResumeConfig } from "../../ResumeConfig"; 5 | 6 | const geistSans = Geist({ 7 | variable: "--font-geist-sans", 8 | subsets: ["latin"], 9 | display: "swap", 10 | }); 11 | 12 | const geistMono = Geist_Mono({ 13 | variable: "--font-geist-mono", 14 | subsets: ["latin"], 15 | display: "swap", 16 | }); 17 | 18 | export const metadata: Metadata = { 19 | title: ResumeConfig.seo.title, 20 | description: ResumeConfig.seo.description, 21 | keywords: [ 22 | "resume", 23 | "portfolio", 24 | ResumeConfig.name, 25 | ResumeConfig.designation, 26 | ], 27 | robots: { 28 | index: true, 29 | follow: true, 30 | }, 31 | }; 32 | 33 | export default function RootLayout({ 34 | children, 35 | }: Readonly<{ 36 | children: React.ReactNode; 37 | }>) { 38 | return ( 39 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 49 | {children} 50 | 51 | 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /src/components/ProgressBar.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useState, useEffect } from "react"; 4 | 5 | type ProgressBarProps = { 6 | onComplete: () => void; 7 | disabled?: boolean; 8 | accelerated?: boolean; 9 | }; 10 | 11 | export default function ProgressBar({ 12 | onComplete, 13 | disabled = false, 14 | accelerated = false, 15 | }: ProgressBarProps) { 16 | const [progress, setProgress] = useState(0); 17 | 18 | useEffect(() => { 19 | if (disabled) return; 20 | 21 | const increment = accelerated ? 4 : 2; 22 | const interval = accelerated ? 30 : 50; 23 | 24 | const timer = setInterval(() => { 25 | setProgress((prev) => { 26 | if (prev >= 98) { 27 | clearInterval(timer); 28 | setTimeout(() => { 29 | onComplete(); 30 | }, 100); 31 | return 100; 32 | } 33 | return prev + increment; 34 | }); 35 | }, interval); 36 | 37 | return () => clearInterval(timer); 38 | }, [onComplete, disabled, accelerated]); 39 | 40 | return ( 41 |
131 |
132 |
133 |
134 |
140 |
141 |
148 | Built with ❤️ by Vishal Rajesh Mahajan 149 |
150 | -------------------------------------------------------------------------------- /src/app/api/notify-view/route.ts: -------------------------------------------------------------------------------- 1 | import { NextResponse } from "next/server"; 2 | import nodemailer from "nodemailer"; 3 | import { ResumeConfig } from "../../../../ResumeConfig"; 4 | 5 | export async function POST(request: Request) { 6 | try { 7 | const body = await request.json(); 8 | const { timestamp, sendMail = true, source = "direct" } = body; 9 | 10 | console.log(`Resume viewed at ${new Date(timestamp).toLocaleString()}`); 11 | 12 | if (!sendMail || !ResumeConfig.notifications.sendMail) { 13 | return NextResponse.json({ 14 | success: true, 15 | message: "View logged (email notifications disabled)", 16 | }); 17 | } 18 | 19 | if (!process.env.EMAIL_USER || !process.env.EMAIL_PASSWORD) { 20 | return NextResponse.json({ 21 | success: true, 22 | message: "Email credentials not configured", 23 | }); 24 | } 25 | 26 | const transporter = nodemailer.createTransport({ 27 | service: "gmail", 28 | auth: { 29 | user: process.env.EMAIL_USER, 30 | pass: process.env.EMAIL_PASSWORD, 31 | }, 32 | }); 33 | 34 | const date = new Date(timestamp); 35 | const formattedDate = date.toLocaleString("en-IN", { 36 | day: "numeric", 37 | month: "long", 38 | year: "numeric", 39 | hour: "numeric", 40 | minute: "numeric", 41 | hour12: true, 42 | timeZone: "Asia/Kolkata", 43 | }); 44 | 45 | const mailOptions = { 46 | from: process.env.EMAIL_USER, 47 | to: process.env.NOTIFICATION_EMAIL || process.env.EMAIL_USER, 48 | subject: "Someone viewed your resume 📄", 49 | html: ` 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 || 60 | 98 | | 99 |
107 | {designation} 108 |
109 |121 | Redirect not working? 122 |
123 | 127 | Open resume directly