Module 1 Project: Build a Personal Bio Page with Dynamic Content
Project Overview
Time to put your skills into action! You'll build a professional bio page that showcases everything you've learned. This isn't just another boring "About Me" page - it's a dynamic, interactive experience that changes based on time, user interaction, and server-side logic.
Your bio page will feature:
- Dynamic greetings based on time of day
- Automatic age calculation
- Visit tracking with cookies
- Interactive theme switcher
- Social media link validator
- Downloadable vCard contact file
- Request logging for analytics
- Mobile-responsive design
Think of this as your digital business card on steroids. Ready to impress?
Project Requirements
Core Features (Must Have)
- Personal Information Section
- Full name (dynamically formatted)
- Current age (calculated from birthdate)
- Location (with timezone display)
- Professional title/tagline
- Bio paragraph (at least 100 words)
- Dynamic Time-Based Elements
- Greeting that changes by time of day
- "Office hours" indicator (available/away)
- Local time display with timezone
- Days until next birthday
- Skills Showcase
- At least 5 skills with proficiency levels
- Visual progress bars
- Categorized by type (technical/soft skills)
- Contact Information
- Email with obfuscation for spam protection
- Social media links (validated URLs)
- Downloadable vCard feature
- Contact form with basic validation
- Interactive Features
- Theme switcher (light/dark/custom)
- Language toggle (at least 2 languages)
- Visit counter using cookies
- "Remember me" functionality
Bonus Features (Nice to Have)
- Random quote generator
- Recent blog posts or projects
- Animated skill bars on page load
- Weather widget for your location
- QR code for mobile contact sharing
- Simple analytics dashboard
- Easter egg for curious visitors
Technical Requirements
PHP Concepts to Implement
- Variables and data types
- String manipulation
- Date/time functions
- Arrays (indexed and associative)
- Control structures (if/else, loops)
- Functions for code reuse
- Form handling (GET/POST)
- Cookie management
- Basic file operations
- Header manipulation
- Error handling
File Structure
bio-project/
├── index.php # Main bio page
├── config.php # Configuration settings
├── functions.php # Reusable functions
├── process.php # Form processing
├── download-vcard.php # vCard generator
├── assets/
│ ├── style.css # Styling
│ ├── script.js # JavaScript enhancements
│ └── images/ # Profile photo, icons
├── languages/
│ ├── en.php # English translations
│ └── es.php # Spanish translations
└── logs/
└── visits.log # Visit tracking
Code Quality Standards
- Proper indentation and formatting
- Meaningful variable names
- Comments explaining complex logic
- No deprecated PHP functions
- Basic security measures (input validation, output escaping)
- Error handling for edge cases
Step-by-Step Development Guide
Phase 1: Setup and Configuration
Start with config.php
to centralize your settings:
<?php
// Personal information
define('FULL_NAME', 'Your Name');
define('BIRTH_DATE', '1995-07-15');
define('EMAIL', '[email protected]');
define('LOCATION', 'San Francisco, CA');
define('TIMEZONE', 'America/Los_Angeles');
define('PROFESSION', 'Web Developer');
// Social media links
define('SOCIAL_LINKS', [
'github' => 'https://github.com/yourusername',
'linkedin' => 'https://linkedin.com/in/yourusername',
'twitter' => 'https://twitter.com/yourusername'
]);
// Office hours (24-hour format)
define('OFFICE_START', 9);
define('OFFICE_END', 17);
Phase 2: Core Functions
Create functions.php
with reusable utilities:
<?php
function calculateAge($birthDate) {
// Calculate age from birth date
}
function getTimeBasedGreeting() {
// Return appropriate greeting
}
function isOfficeHours() {
// Check if currently in office hours
}
function obfuscateEmail($email) {
// Protect email from scrapers
}
function validateSocialUrl($platform, $url) {
// Ensure social URLs are valid
}
function incrementVisitCounter() {
// Update visit count in cookie
}
function getRandomQuote() {
// Return random inspirational quote
}
Phase 3: Main Page Structure
Build your index.php
with proper organization:
<?php
require_once 'config.php';
require_once 'functions.php';
// Initialize variables
// Handle theme switching
// Process language selection
// Track visits
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo FULL_NAME; ?> - Personal Bio</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body>
<!-- Header with greeting and theme switcher -->
<!-- Main bio section -->
<!-- Skills showcase -->
<!-- Contact section -->
<!-- Footer with visit counter -->
</body>
</html>
Phase 4: Interactive Features
Implement theme switching without page reload:
// Theme handler
if (isset($_GET['theme'])) {
$theme = $_GET['theme'];
setcookie('theme', $theme, time() + (86400 * 30), '/');
header('Location: index.php');
exit;
}
$currentTheme = $_COOKIE['theme'] ?? 'light';
Phase 5: Contact Form
Create a working contact form with validation:
// In process.php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
$email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
$message = filter_input(INPUT_POST, 'message', FILTER_SANITIZE_STRING);
// Validate inputs
// Send email or save to file
// Redirect with success message
}
Phase 6: vCard Generator
Build download-vcard.php
for contact downloads:
<?php
require_once 'config.php';
header('Content-Type: text/vcard');
header('Content-Disposition: attachment; filename="contact.vcf"');
echo "BEGIN:VCARD\n";
echo "VERSION:3.0\n";
echo "FN:" . FULL_NAME . "\n";
echo "EMAIL:" . EMAIL . "\n";
// Add more vCard fields
echo "END:VCARD\n";
Design Guidelines
Visual Design
- Clean, modern layout
- Professional color scheme
- Readable typography (16px+ body text)
- Sufficient whitespace
- Smooth transitions/animations
- Accessible contrast ratios
Responsive Design
- Mobile-first approach
- Flexible grid layout
- Touch-friendly buttons (44px+ tap targets)
- Readable without zooming
- Optimized images
User Experience
- Fast loading (optimize images)
- Clear navigation
- Obvious interactive elements
- Helpful error messages
- Smooth animations (not jarring)
- Keyboard accessible
Testing Checklist
Before considering your project complete:
Functionality Tests
- Age calculates correctly
- Time-based greeting updates
- Theme switcher persists across visits
- Visit counter increments properly
- Contact form validates input
- vCard downloads successfully
- Social links open in new tabs
- Office hours indicator works
Cross-Browser Testing
- Chrome/Edge
- Firefox
- Safari
- Mobile browsers
Edge Cases
- Cookies disabled
- JavaScript disabled
- Very long names/text
- Special characters in input
- Different timezones
- Leap year birthdays
Security Checks
- HTML output escaped
- Email addresses obfuscated
- Form inputs validated
- No sensitive data in cookies
- Error messages don't reveal system info
Submission Guidelines
Your completed project should include:
- All PHP files properly organized
- Assets folder with CSS and any images
- README.md with:
- Your name and project title
- Brief description
- Setup instructions
- Features implemented
- Challenges faced and solutions
- Future improvements planned
- Screenshots showing:
- Desktop view (light theme)
- Desktop view (dark theme)
- Mobile responsive view
- Contact form in action
Grading Rubric
Functionality (40%)
- All required features work correctly
- No PHP errors or warnings
- Handles edge cases gracefully
Code Quality (30%)
- Well-organized and readable
- Proper use of functions
- Comments where necessary
- Follows PHP best practices
Design/UX (20%)
- Professional appearance
- Responsive on all devices
- Intuitive user interface
- Smooth interactions
Creativity (10%)
- Bonus features implemented
- Creative problem solving
- Personal touches that stand out
Common Pitfalls to Avoid
- Hardcoding dates - Use PHP's date functions
- Storing sensitive data in cookies - Only store preferences
- Not escaping output - Always use htmlspecialchars()
- Ignoring mobile users - Test responsive design
- Overcomplicating - Start simple, add features gradually
- Not testing edge cases - What if cookies are disabled?
- Poor error handling - Guide users when things go wrong
Inspiration and Examples
Look at these for inspiration (but don't copy):
Remember: This is YOUR bio page. Make it reflect your personality!
Getting Help
Stuck? Try these steps:
- Check PHP documentation - php.net has great examples
- Review lesson examples - Similar code patterns exist there
- Break the problem down - Solve one feature at a time
- Use var_dump() - Debug variables to understand what's happening
- Test incrementally - Don't write 100 lines before testing
Extension Ideas
Once you complete the basic requirements, consider adding:
- Blog integration - Pull recent posts from an API
- GitHub activity - Show recent commits
- Spotify integration - Currently playing music
- Reading list - Books you recommend
- Testimonials - Rotating client quotes
- Skills quiz - Test visitors on your expertise
- Admin panel - Update content without editing code
Final Tips
- Start with the HTML structure, then add PHP
- Test one feature at a time
- Use Git to track your progress
- Ask for feedback from friends
- Have fun with it - this represents you!
Ready to build something awesome? Your bio page awaits!
Project Deadline and Submission
Recommended timeline:
- Day 1-2: Setup and basic structure
- Day 3-4: Core features implementation
- Day 5-6: Interactive features and styling
- Day 7: Testing and refinements
Remember: A working project with basic features is better than an incomplete project with ambitious goals. Start simple, iterate, and improve!
Good luck! 🚀