A modern, interactive portfolio website featuring a Node.js backend for dynamic project management and contact form functionality.
- Responsive Design: Beautiful, modern UI that works on all devices
- 3D Effects: Interactive 3D animations and hover effects
- Dynamic Project Loading: Projects loaded dynamically from backend API
- Interactive Skills Constellation: 3D visualization of skills and technologies
- Animated Timeline: Journey through development milestones
- Contact Form: Secure contact form with real-time validation
- RESTful API: Clean API endpoints for projects and contact form
- Email Integration: Automated email sending for contact form submissions
- Security Features: Rate limiting, input validation, and security headers
- Dynamic Project Management: Easy project management through JSON configuration
- Error Handling: Comprehensive error handling and logging
- HTML5, CSS3, JavaScript (ES6+)
- Three.js for 3D graphics
- Font Awesome for icons
- Google Fonts (Inter & Poppins)
- Node.js with Express.js
- Nodemailer for email functionality
- Express Rate Limit for security
- Express Validator for input validation
- Helmet for security headers
- CORS for cross-origin requests
- Node.js (v14 or higher)
- npm or yarn
- A Gmail account (for email functionality)
-
Clone or navigate to the project directory
cd portfolio -
Install backend dependencies
cd backend npm install -
Configure environment variables
Edit the
.envfile in thebackenddirectory:# Server Configuration PORT=3001 NODE_ENV=development # Email Configuration EMAIL_USER=your-email@gmail.com EMAIL_PASS=your-app-password
Important: For Gmail, you need to:
- Enable 2-factor authentication on your Gmail account
- Generate an "App Password" for this application
- Use your Gmail address and the app password in the .env file
-
Customize your projects
Edit
backend/data/projects.jsonto add your own projects:{ "projects": [ { "id": 1, "title": "Your Project Title", "description": "Project description...", "image": "assets/project-image.jpg", "technologies": ["React", "Node.js", "MongoDB"], "category": "Full Stack", "featured": true, "githubUrl": "https://github.com/yourusername/project", "liveUrl": "https://your-project.com", "completedDate": "2024-01-15" } ] } -
Start the development server
npm run dev # or for production npm start -
Access your portfolio Open your browser and go to:
http://localhost:3001
-
Prepare for production
cd backend npm install --production -
Set environment variables
export NODE_ENV=production export PORT=3001 export EMAIL_USER=your-email@gmail.com export EMAIL_PASS=your-app-password
-
Start the server
npm start
-
Create a
Procfilein the backend directoryweb: node server.js -
Set environment variables in your platform's dashboard
-
Deploy using your platform's deployment process
portfolio/
βββ backend/ # Backend API server
β βββ data/
β β βββ projects.json # Project data
β βββ .env # Environment variables
β βββ package.json # Backend dependencies
β βββ server.js # Main server file
βββ assets/ # Images and static assets
βββ css/ # Stylesheets
βββ js/ # JavaScript files
β βββ main.js # Main frontend logic
β βββ 3d-features.js # 3D effects
β βββ enhanced-background.js
β βββ interactive-effects.js
β βββ api-integration.js # API integration
βββ index.html # Main HTML file
βββ README.md # This file
Returns all projects in JSON format.
Response:
{
"success": true,
"data": {
"projects": [...]
}
}Handles contact form submissions.
Request Body:
{
"name": "John Doe",
"email": "john@example.com",
"subject": "Hello",
"message": "Your message here"
}Response:
{
"success": true,
"message": "Message sent successfully!"
}Health check endpoint.
- Edit
backend/data/projects.json - Add your project object with all required fields
- Restart the server
- The frontend will automatically load the new project
- Main styles:
css/style.css - 3D effects:
css/3d-enhancements.css
The email template can be customized in backend/server.js in the contact form handler.
- Rate Limiting: Prevents spam and abuse
- Input Validation: Validates and sanitizes all inputs
- Security Headers: Helmet.js adds security headers
- CORS Protection: Configured for specific origins
- Environment Variables: Sensitive data stored securely
-
Email not sending
- Check Gmail app password setup
- Verify .env file configuration
- Check server logs for errors
-
Projects not loading
- Verify backend server is running
- Check browser console for errors
- Ensure projects.json is valid JSON
-
Port already in use
- Change PORT in .env file
- Kill existing processes on port 3001
Check server logs for detailed error information:
cd backend
npm run devThis project is licensed under the MIT License - see the LICENSE file for details.
- Fork the project
- 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
If you have any questions or need help with setup, please open an issue or contact me at owolabilekan947@gmail.com.
Made with β€οΈ and cosmic code β¨