A modern, interactive portfolio website featuring 3D effects, GitHub API integration, and a clean, minimalist design.
- GitHub Integration - Automatically fetches and displays your repositories
- Project Detail Modal - Click any project to view README and screenshots
- Dark/Light Mode - Automatic theme switching with system preference
- Responsive Design - Works perfectly on desktop, tablet, and mobile
- Contact Form - Functional contact form with email notifications
- Smart Image Filtering - Automatically filters out badges, logos, and npm shields
- Fork Detection - Shows original repositories for fork contributions
- Project Blacklist - Hide specific projects via environment variables
- Star-based Sorting - Projects sorted by popularity (GitHub stars)
- Smooth Animations - GSAP animations and custom cursor effects
- PHP 8.1 or higher
- GitHub account
- Web server (Apache/Nginx) or PHP built-in server
-
Clone the repository
git clone https://github.com/yourusername/portfolio.git cd portfolio -
Install dependencies
composer install
-
Configure environment
cp .env.example .env # Edit .env with your settings -
Start the server
# Using PHP built-in server php -S localhost:8000 # Or configure your web server to point to the project root
-
Open in browser
http://localhost:8000
Edit your .env file:
# Required
GITHUB_USERNAME=your-github-username
# Recommended (increases API limits)
GITHUB_TOKEN=ghp_your_token_here
# Your domain
APP_URL=https://yourdomain.comTo hide specific projects from your portfolio:
HIDDEN_PROJECTS=private-repo,experiment,test-projectNote: Your profile README repository (username/username) is automatically hidden.
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-app-password
MAIL_TO_ADDRESS=your-email@example.comportfolio/
βββ api/ # API endpoints
β βββ readme.php # GitHub README fetcher
βββ assets/ # Static assets
β βββ css/ # Stylesheets
β β βββ style.css
β βββ js/ # JavaScript files
β β βββ main.js # Main application
β β βββ three-scene.js # 3D background
β β βββ three-projects.js # Project cards
β βββ js/gsap.min.js # Animation library
βββ config/ # Configuration
β βββ env_loader.php
βββ images/ # Screenshots and images
β βββ startpage.png # Hero section
β βββ aboutme.png # About section
β βββ projektpage.png # Projects grid
β βββ skillspage.png # Skills section
β βββ contact-mepage.png # Contact form
βββ partials/ # PHP partials
β βββ header.php
β βββ footer.php
β βββ navbar.php
βββ .env # Environment variables (not in git)
βββ .env.example # Environment template
βββ .gitignore # Git ignore rules
βββ composer.json # PHP dependencies
βββ github_api.php # GitHub API service
βββ index.php # Main entry point
βββ README.md # This file
Edit CSS variables in assets/css/style.css:
:root {
--primary-text: #000000;
--secondary-text: #555555;
--bg-color: #ffffff;
/* ... more variables */
}
body.dark-mode {
--primary-text: #ffffff;
--secondary-text: #aaaaaa;
--bg-color: #121212;
}-
Create a new section in
index.php:<section id="custom" class="section"> <h2 class="section-title">Custom Section</h2> <!-- Your content --> </section>
-
Add navigation link in
partials/navbar.php -
Style in
assets/css/style.css
Edit assets/js/three-scene.js:
// Change particle count
const particleCount = 100; // Increase for more particles
// Change colors
const colors = [0x000000, 0x333333, 0x666666]; // Light mode
const darkColors = [0xffffff, 0xcccccc, 0x999999]; // Dark modeTo reduce API calls, responses are cached. Configure cache duration:
GITHUB_CACHE_MINUTES=60To include private repositories:
- Create a GitHub token with
reposcope - Add to
.env:GITHUB_TOKEN=ghp_your_token_with_repo_scope
Note: Private repos only show README content, no source code.
- Update
APP_URLin.env - Configure DNS to point to your server
- Set up SSL certificate
- Update meta tags in
partials/header.php
Problem: API rate limit exceeded
Solution: Add a GitHub token to .env:
GITHUB_TOKEN=ghp_your_token_hereProblem: Screenshots not appearing in project modal
Solution:
- Ensure images are in the repository (not just linked externally)
- Check that image files are not in
.gitignore - Supported formats: PNG, JPG, JPEG, GIF, WEBP, SVG
Problem: Emails not being sent
Solution:
- Check SMTP settings in
.env - For Gmail, use an App Password (not your regular password)
- Enable "Less secure app access" if not using App Password
- Check PHP mail configuration
Problem: Black background instead of 3D animation
Solution:
- Check browser console for errors
- Ensure Three.js is loading:
https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js - Disable ad blockers that might block CDNs
- β Chrome 80+
- β Firefox 75+
- β Safari 13+
- β Edge 80+
- β Mobile Safari (iOS 13+)
- β Chrome Mobile (Android 10+)
- Environment variables are never exposed to client
- GitHub token is server-side only
- Contact form has CSRF protection
- Input sanitization on all user inputs
- SQL injection prevention (if using database)
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- 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
- Changelog - Version history and updates
- Contributing Guide - How to contribute
- Env Example - Configuration reference
Samuel Mencke - contact@samuel-mencke.com
Project Link: https://github.com/Samuel-Mencke/portfolio





