A modern, dynamic portfolio website with a comprehensive Content Management System (CMS) built with PHP, MySQL, and vanilla JavaScript. Features a beautiful UI with video backgrounds, smooth animations, and full admin control over all content.
- Modern Portfolio Interface: Clean, responsive design with video backgrounds
- Dynamic Content: All sections powered by CMS
- Smooth Animations: Interactive cursor effects and transitions
- Secure Dashboard: Login system with rate limiting and CSRF protection
- Content Management: Full CRUD operations for all sections
- Drag & Drop Sorting: Intuitive reordering for portfolio items, experience, education, and technologies
- Responsive Design: Mobile-first approach, works on all devices
- Video Backgrounds: Dynamic video overlay on About section
- Interactive Cursor: Custom cursor with smooth animations
- Image Optimization: WebP format support with fallbacks
- Lazy Loading: Optimized image loading for better performance
- Social Media Integration: LinkedIn, Instagram, and GitHub links
- SEO Optimized: Meta tags for Facebook, Twitter, and WhatsApp sharing
- Lightbox Gallery: Fancybox integration for portfolio images
- Environment Variables: Sensitive data stored in
.env(never committed to git) - Secure Authentication: Password hashing with bcrypt
- Rate Limiting: Login attempt throttling (7 attempts per 15 minutes)
- CSRF Protection: Token-based form validation
- SQL Injection Prevention: Prepared statements for all queries
- XSS Protection: Input sanitization and output escaping
- Session Security: Secure session handling with regeneration
- IP Whitelisting: Restrict access to utility files by IP address
- Auto-Deploy Security: GitHub webhook signature verification
- Environment-based Config: Separate development and production settings
- Overview statistics (total portfolio items, experience entries, etc.)
- Quick access to all sections
- Recent activity monitoring
- Personal information management
- Video background upload/selection
- Rich text description editor
- Email, phone, birthday, location
- Social media links (LinkedIn, Instagram, GitHub)
- Dynamic updates to frontend
- Add/Edit/Delete services
- Icon upload support
- Drag & drop sorting
- Active/inactive status toggle
- Technology name and icon management
- File upload for icons (SVG, PNG, JPG)
- Manual path entry option
- Drag & drop reordering
- Live icon preview
- Job title, company, location
- Start/end dates with "current position" support
- Technologies used per role
- Detailed description with rich text
- Drag & drop chronological sorting
- Degree, institution, location
- Date range tracking
- GPA display
- Detailed achievements
- Sortable entries
- Project title, category, description
- Image upload with WebP optimization
- Demo URL and GitHub repository links
- Technologies used tags
- Featured projects highlighting
- Drag & drop sorting
- Category filtering
- Client name, position, company
- Star rating system (1-5)
- Active/inactive status
- Sortable display order
- Test Database Connection: Verify database connectivity
- Generate Password Hash: Create secure bcrypt hashes
- Run Migrations: Execute database schema updates
- Run Seeders: Populate database with sample data
- Login Activity Monitor: Track authentication attempts
- Rate Limit Manager: View and manage login restrictions
- Migration System: Version-controlled schema changes
- Seeder System: Sample data population
- Backup Support: Database export functionality
- Error Logging: Detailed migration/seeder logs
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Apache/Nginx web server
- Composer (optional, for dependencies)
-
Clone the repository
git clone https://github.com/HolitSky/my-profile.git cd my-profile -
Setup Environment Variables
Copy
.env.exampleto.env:cp .env.example .env
Edit
.envand fill in your values:APP_ENV=local APP_DEBUG=true APP_URL=http://localhost/my-profile DB_HOST=localhost DB_NAME=khalid_portfolio DB_USER=root DB_PASS= YOUR_IP=127.0.0.1 ENABLE_UTILITY_FILES=true
📖 See ENV-SETUP.md for detailed configuration guide
-
Configure Database (Legacy - Optional)
Alternatively, edit
config/config.phpdirectly:// Development Configuration define('DB_HOST', 'localhost'); define('DB_NAME', 'portfolio_db'); define('DB_USER', 'root'); define('DB_PASS', '');
-
Create Database
CREATE DATABASE portfolio_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
Run Migrations
Access:
http://localhost/my-profile/admin/login.phpLogin with default credentials:
- Username:
admin - Password:
admin123
Navigate to: Security → Run Migrations
- Username:
-
Seed Database (Optional)
Navigate to: Security → Run Seeders
This will populate the database with sample data.
-
Access the Site
- Frontend:
http://localhost/my-profile/ - Admin Panel:
http://localhost/my-profile/admin/
- Frontend:
-
Upload Files
Upload all files to
public_htmldirectory via FTP/File Manager⚠️ Important: Do NOT upload.envfile! Create it on server. -
Create .env on Server
SSH to server and create
.env:ssh user@server cd public_html nano .envFill in production values:
APP_ENV=production APP_DEBUG=false APP_URL=https://www.khalidsaifullah.me DB_HOST=localhost DB_NAME=my_db DB_USER=my_user DB_PASS=YourPassword YOUR_IP=YOUR_ACTUAL_IP ENABLE_UTILITY_FILES=false DEPLOY_ENABLED=true DEPLOY_SECRET=your-generated-secret PROJECT_PATH=/home/public_html GIT_BRANCH=main
Set permissions:
chmod 600 .env
-
Configure Production Database (Legacy)
Edit
config/config.php:// Production Configuration define('ENVIRONMENT', 'production'); define('DB_HOST', 'localhost'); define('DB_NAME', 'u734000704_khalid_profile'); define('DB_USER', 'u734000704_root'); define('DB_PASS', 'your_secure_password');
-
Create Production Database
Use Hostinger's MySQL Database tool to create database
-
Run Migrations
Access:
https://yourdomain.com/admin/login.phpNavigate to: Security → Run Migrations
-
Update Admin Password
Navigate to: Security → Generate Password Hash
Generate a new hash and update the database:
UPDATE admin_users SET password = 'new_hash_here' WHERE username = 'admin';
my-profile/
├── admin/ # Admin panel
│ ├── includes/ # Shared admin components
│ │ ├── header.php # Admin header with sidebar
│ │ └── footer.php # Admin footer
│ ├── index.php # Admin dashboard
│ ├── login.php # Authentication page
│ ├── logout.php # Logout handler
│ ├── about.php # About section management
│ ├── contact.php # Contact info management
│ ├── services.php # Services CRUD
│ ├── skills.php # Technologies management
│ ├── experience.php # Experience timeline
│ ├── education.php # Education history
│ ├── portfolio.php # Portfolio projects
│ ├── testimonials.php # Testimonials management
│ ├── security.php # Security tools & utilities
│ ├── test-db.php # Database connection tester
│ ├── generate-password.php # Password hash generator
│ ├── run-migrations.php # Migration runner
│ └── run-seeders.php # Seeder runner
├── api/ # REST API endpoints
│ └── index.php # Main API endpoint
├── assets/ # Static assets
│ ├── css/ # Stylesheets
│ │ ├── style.css # Main styles
│ │ └── cms-fixes.css # CMS-specific styles
│ ├── images/ # Images
│ │ ├── icon/ # Technology icons
│ │ ├── optimized/ # WebP optimized images
│ │ └── video/ # Background videos
│ └── js/ # JavaScript files
│ ├── script.js # Main frontend logic
│ └── cms-integration.js # CMS data integration
├── config/ # Configuration
│ └── config.php # Database & environment config
├── database/ # Database files
│ ├── migrations.sql # Schema definitions
│ └── seeders.sql # Sample data
├── includes/ # PHP utilities
│ ├── db.php # Database connection
│ ├── functions.php # Helper functions
│ └── auth.php # Authentication functions
├── index.html # Main frontend page
└── README.md # This file
- admin_users - Admin authentication
- about - About section content
- contact_info - Contact information
- services - Services offered
- skills - Technologies/skills
- experience - Work experience
- education - Educational background
- portfolio - Portfolio projects
- testimonials - Client testimonials
- login_attempts - Rate limiting tracking
- Foreign Keys: Referential integrity
- Timestamps: Created/updated tracking
- Soft Deletes:
is_activeflags - Sorting:
sort_orderfields for drag & drop
Returns all portfolio data in JSON format:
{
"about": {
"title": "About me",
"description": "...",
"video_background": "./assets/images/video/video4.mp4"
},
"contact": {
"email": "holitsky98@gmail.com",
"phone": "+62 821-4768-8858",
"birthday": "1998-07-15",
"location": "South Tangerang, West Java, Indonesia",
"linkedin": "https://www.linkedin.com/...",
"instagram": "https://www.instagram.com/...",
"github": "https://github.com/HolitSky"
},
"services": [...],
"skills": [...],
"experience": [...],
"education": [...],
"portfolio": [...],
"testimonials": [...]
}- HTML5 - Semantic markup
- CSS3 - Modern styling with animations
- JavaScript (ES6+) - Vanilla JS, no frameworks
- Fancybox - Lightbox gallery
- Ionicons - Icon library
- PHP 7.4+ - Server-side logic
- MySQL - Database management
- PDO - Database abstraction layer
- Bootstrap 5 - UI framework
- Bootstrap Icons - Icon set
- Drag & Drop API - HTML5 native
- bcrypt - Password hashing
- CSRF Tokens - Form protection
- Prepared Statements - SQL injection prevention
- Rate Limiting - Brute force protection
-
Password Security
- Bcrypt hashing with cost factor 10
- Minimum 8 characters required
- Special characters recommended
-
Session Management
- Secure session cookies
- Session regeneration on login
- Automatic timeout after inactivity
-
Input Validation
- Server-side validation for all inputs
- Sanitization before database storage
- Escaping on output
-
Rate Limiting
- 7 login attempts per 15 minutes
- IP-based tracking
- Automatic cleanup of old attempts
-
CSRF Protection
- Token generation on form load
- Token validation on submission
- Single-use tokens
- Login to admin panel
- Navigate to Portfolio
- Click Add Project
- Fill in details:
- Title, category, description
- Upload project image
- Add demo URL and GitHub link
- List technologies used
- Mark as featured (optional)
- Click Save
- Drag to reorder if needed
- Navigate to Technologies
- Click Add Technology
- Enter technology name
- Upload icon (SVG recommended) or enter path
- Click Add Technology
- Drag to reorder display order
- Navigate to About
- Edit title and description
- Update video background path
- Click Update About
- Navigate to Security
- Click Run Migrations
- Review migration log
- Verify tables created successfully
- Verify credentials in
config/config.php - Check MySQL service is running
- Test connection via Security → Test Database
- Check rate limiting status
- Verify password hash in database
- Clear browser cookies/cache
- Check folder permissions (755 for directories, 644 for files)
- Verify upload directory exists
- Check PHP upload limits in
php.ini
- Review error logs in migration output
- Check SQL syntax in
database/migrations.sql - Verify database user has CREATE/DROP permissions
- Blog section with categories and tags
- Contact form with email notifications
- Multi-language support (i18n)
- Dark/light theme toggle
- Advanced analytics dashboard
- Image compression on upload
- PDF resume generator
- REST API documentation
- Unit tests for critical functions
- Docker containerization
This project is licensed under the MIT License - see the LICENSE file for details.
Khalid Saifullah
- Website: khalidsaifullah.me
- LinkedIn: khalid-saifullah
- GitHub: @HolitSky
- Instagram: @holit_sky
- Email: holitsky98@gmail.com
- Bootstrap - For the amazing UI framework
- Ionicons - For the beautiful icon set
- Fancybox - For the elegant lightbox solution
- PHP Community - For excellent documentation and support
For support, email holitsky98@gmail.com or open an issue on GitHub.
Made with ❤️ by Khalid Saifullah
⭐ Star this repo if you find it helpful!