This repository contains a personal portfolio website built with static HTML/CSS/JavaScript and a serverless contact form API for Vercel.
index.html- main portfolio landing pagestyle.css- site styling and layoutapp.js- page interactions, cursor effects, reveal animations, and form submission logicapi/contact.js- Vercel serverless function that receives contact form submissions and forwards them via email using Nodemailerpackage.json- project dependencies for Vercel deployment.gitignore- common files to ignore for this project
- custom cursor and scroll reveal animations
- contact form with floating labels
- serverless contact form backend for Vercel
- email forwarding of submitted messages to
ppavankumar9876@gmail.com
-
Install dependencies:
npm install
-
Run locally using a static server or Vercel preview.
If you only want to preview the site locally:
- Open
index.htmldirectly in the browser - or use a static server such as
live-serverorpython -m http.server
- Open
This site is ready to deploy on Vercel. The serverless contact API route is located in api/contact.js.
Create these environment variables in your Vercel project settings:
EMAIL_USER- SMTP username (typically your Gmail address)EMAIL_PASS- SMTP password, or Gmail app passwordEMAIL_SERVICE- optional, defaults togmailEMAIL_FROM- optional sender email address (defaults toEMAIL_USER)EMAIL_TO- optional recipient email address (defaults toppavankumar9876@gmail.com)
For Gmail, using an app password is recommended. Standard Gmail account passwords may not work unless SMTP access is configured properly.
- The contact form submits via JavaScript to
/api/contact. - The API validates
name,email, andmessage. - When valid, it sends an email with the form contents.
- It returns JSON success or error responses.
- This project does not store submissions in a database.
- Email forwarding depends on valid SMTP credentials.
- For production use, secure your environment variables and consider adding spam protection.
This project is provided as-is.