A modern, responsive portfolio website built with React, TypeScript, and Node.js. Features a beautiful UI with animations, contact form functionality, and a backend server for handling email communications.
- Modern React with TypeScript: Built with React 18 and TypeScript for type safety
- Responsive Design: Mobile-first approach with Bootstrap and custom CSS
- Smooth Animations: Framer Motion and custom animations for engaging user experience
- Contact Form: Backend integration with email functionality
- 3D Graphics: Three.js integration for interactive elements
- Font Awesome Icons: Comprehensive icon library
- ESLint Configuration: Proper linting setup for code quality
Before you begin, ensure you have the following installed:
- Node.js (version 16 or higher)
- npm (comes with Node.js)
- Git (for cloning the repository)
git clone https://github.com/rajat6235/portfolio.git
cd portfolionpm installcd myportfolio
npm installDue to peer dependency conflicts with React 18 and some older packages, run:
npm install --legacy-peer-depsCreate a .env file in the root directory:
cd ..
touch .envAdd the following environment variables to your .env file:
# Server Configuration
PORT=6000
NODE_ENV=development
# Email Configuration (if using contact form)
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password
EMAIL_SERVICE=gmailNote: For Gmail, you'll need to use an App Password instead of your regular password. Enable 2-factor authentication and generate an App Password in your Google Account settings.
From the root directory, run:
npm run devThis command will start both:
- Backend server on port 6000
- React development server on port 3000
Once the servers are running, you can access:
- Frontend: http://localhost:3000
- Backend API: http://localhost:6000
portfolio/
βββ myportfolio/ # React frontend application
β βββ src/
β β βββ Container/ # React components
β β βββ assets/ # Images, fonts, and static files
β β βββ utilities/ # Utility functions and services
β βββ public/ # Public assets
β βββ package.json # Frontend dependencies
βββ route/ # Backend routes
βββ backend/ # Backend files
βββ server.js # Express server
βββ package.json # Root dependencies
βββ README.md # This file
npm run dev- Start both frontend and backend serversnpm run server- Start only the backend servernpm run myportfolio- Start only the React development server
npm start- Start the React development servernpm run build- Build the app for productionnpm test- Run testsnpm run eject- Eject from Create React App
If you encounter a port conflict, you can:
- Stop the existing process:
pkill -f "react-scripts start" - Or use a different port:
PORT=3001 npm start
If you encounter peer dependency warnings:
cd myportfolio
npm install --legacy-peer-depsThe project includes TypeScript ESLint configuration. If you see TypeScript-related errors:
- Ensure TypeScript is installed:
npm install typescript - Restart your development server
- Clear ESLint cache if needed
If the contact form isn't working:
- Verify your
.envfile has correct email credentials - For Gmail, ensure you're using an App Password, not your regular password
- Check that 2-factor authentication is enabled on your Google account
- Create your component in
myportfolio/src/Container/ - Follow the existing TypeScript patterns
- Add proper ESLint configuration if needed
- Use CSS modules or regular CSS files
- Follow the existing naming conventions
- Bootstrap classes are available for responsive design
- Add new routes in the
route/directory - Follow the existing Express.js patterns
- Test API endpoints using tools like Postman
cd myportfolio
npm run buildThe project includes Heroku configuration. The heroku-postbuild script will automatically build the React app for production.
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the ISC License.
Rajat Gupta
- GitHub: @rajat6235
If you encounter any issues, please:
- Check the troubleshooting section above
- Search existing issues on GitHub
- Create a new issue with detailed information about your problem
Happy Coding! π