A modern, interactive portfolio website built with React and Three.js, showcasing my projects and experience.
Visit the live website at: https://zeyadhazem.github.io/
zeyadhazem.github.io/
├── client/ # React application
│ ├── public/ # Static assets
│ ├── src/ # Source code
│ │ ├── components/ # React components
│ │ └── ...
│ ├── package.json # Dependencies and scripts
│ └── README.md # Create React App documentation
├── hooks/ # Git hooks (version controlled)
│ └── pre-push # Pre-push hook for automatic deployment
├── setup-hooks.sh # Script to install git hooks
├── .gitignore # Git ignore rules
└── README.md # This file
- Node.js (v14 or higher)
- npm or yarn
- Git
-
Clone the repository:
git clone https://github.com/zeyadhazem/zeyadhazem.github.io.git cd zeyadhazem.github.io -
Set up git hooks for automatic deployment:
./setup-hooks.sh
-
Navigate to the client directory and install dependencies:
cd client npm install -
Start the development server:
npm start
-
Open http://localhost:3000 to view the website in your browser.
This repository is configured with a git pre-push hook that automatically deploys your changes when you push to the master or main branch.
How it works:
- When you push to
master/main, the hook automatically runsnpm run deploy - Your changes are built and deployed to GitHub Pages
- The website updates at https://zeyadhazem.github.io/
To deploy your changes:
-
Make your changes and commit them:
git add . git commit -m "Your commit message"
-
Push to master (deployment happens automatically):
git push origin master
The hook will:
- ✅ Detect you're pushing to master/main
- 🚀 Automatically run
npm run deployfrom the client directory - 📦 Build and deploy your React app to GitHub Pages
- 🌐 Make your changes live within minutes
If you prefer to deploy manually or need to deploy without pushing:
-
Navigate to the client directory:
cd client -
Run the deploy command:
npm run deploy
The deployment process uses the following npm scripts defined in client/package.json:
predeploy: Automatically runsnpm run buildbefore deploymentdeploy: Usesgh-pagesto deploy the build folder to GitHub Pages
Note: The git hook ensures that deployments only happen when pushing to the main branch, keeping your development workflow clean and preventing accidental deployments from feature branches.
In the client/ directory, you can run:
npm start- Runs the app in development modenpm test- Launches the test runnernpm run build- Builds the app for productionnpm run deploy- Deploys the app to GitHub Pages
- React - Frontend framework
- Three.js - 3D graphics and animations
- @react-three/fiber - React renderer for Three.js
- @react-three/drei - Useful helpers for react-three-fiber
- GSAP - Animation library
- GitHub Pages - Hosting platform
- Make your changes in the
client/src/directory - Test locally with
npm start(from theclient/directory) - When ready to publish:
git add . git commit -m "Describe your changes" git push origin master
- The git hook will automatically deploy your changes to GitHub Pages
- Your changes will be live at https://zeyadhazem.github.io/ within a few minutes
Note: The automated deployment only triggers when pushing to the master or main branch. Pushes to other branches will not trigger deployment.
This is a personal portfolio website. If you find any issues or have suggestions, feel free to open an issue or submit a pull request.
This project is open source and available under the MIT License.