This repository contains the code for Alex Benny's personal portfolio website, showcasing projects, skills, and contact information.
index.html: The main frontend file containing all UI componentsbackend/: Contains the server code for handling contact form submissions
The backend is responsible for handling contact form submissions and sending emails. Follow these steps to set it up:
cd backend
npm installCreate or edit the .env file in the backend directory with the following variables:
# Email Configuration
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
EMAIL_TO=your_email@gmail.com
# Server Configuration
PORT=3000
Important Notes for Gmail Users:
- For
SMTP_USER: Use your Gmail address - For
SMTP_PASS: You need to use an App Password, not your regular Gmail password- Go to Google Account Security
- Enable 2-Step Verification if not already enabled
- Go to App Passwords
- Select "Mail" as the app and "Other" as the device (name it "Portfolio Website")
- Copy the generated 16-character password
- For
EMAIL_TO: This is where you'll receive the contact form submissions
cd backend
npm run devcd backend
npm startIf you're deploying the backend to a different URL, update the backendUrl variable in index.html (around line 985):
const backendUrl = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'
? 'http://localhost:3000' // Local development
: 'https://your-new-backend-url.com'; // Your deployed backend URL- Check if the
.envfile is properly configured with valid credentials - Ensure you're using an App Password for Gmail, not your regular password
- Verify that the backend server is running (
npm run devornpm start) - Check the console logs for any error messages
- If deployed, ensure the backend URL in
index.htmlis correct
- Check the browser console for any error messages
- Verify that all required fields (name, email, subject, message) are being submitted
- Ensure the backend server is running and accessible
- Check if Gmail's security settings are blocking the authentication
All rights reserved. This code is not licensed for redistribution.