Skip to content
View Sclaassen's full-sized avatar
  • 10:49 (UTC +02:00)

Block or report Sclaassen

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Sclaassen/README.md

Stefan Claassen CV Website

A modern, professional CV website built with React and Node.js, featuring visitor analytics, PDF export, and containerized deployment.

Features

  • ✨ Modern Professional Design - Clean, readable layout with no bright colors
  • πŸ“„ PDF Export - Download CV as PDF with one click
  • πŸ“Š Visitor Analytics - Track page views, unique visitors, and access patterns
  • πŸ–ΌοΈ Profile Picture Upload - Easy profile picture management
  • πŸ“± Responsive Design - Works perfectly on all devices
  • 🐳 Containerized - Ready for Docker deployment
  • ⚑ Easy Updates - JSON-based CV data for quick modifications

Quick Start

First Time Setup

  1. Install All Dependencies
    npm run setup
    This will install dependencies for the main project, server, and client.

Development Mode

  1. Start Development Server

    npm run dev
  2. Access the Application

Docker Development

  1. Development with Docker

    docker-compose --profile dev up
  2. Production with Docker

    docker-compose up cv-website
  3. Production with Nginx (for custom domains)

    # Copy environment template
    cp .env.example .env
    
    # Edit .env with your domain
    # DOMAIN=yourdomain.com
    
    # Start with nginx reverse proxy
    docker-compose --profile production up

Manual Setup (Alternative)

If the automatic setup doesn't work:

# Install main dependencies
npm install

# Install server dependencies
cd server
npm install

# Install client dependencies
cd ../client
npm install

# Go back to root
cd ..

# Start development
npm run dev

Docker Profiles

  • Default: Just the CV website (port 3001)
  • dev: Development mode with hot reload (ports 3000 + 3001)
  • production: Full production setup with Nginx reverse proxy (ports 80 + 443)

Free Domain Options

Recommended Free Hosting + Domains:

  1. Netlify (Recommended)

    • Free domain: stefan-cv.netlify.app
    • Free hosting + CI/CD
    • Easy custom domain setup
  2. Vercel

    • Free domain: stefan-cv.vercel.app
    • Automatic deployments from Git
  3. GitHub Pages

    • Free domain: stefanclaassen.github.io
    • Perfect for static sites

Free Domain Services:

  1. Freenom

    • Extensions: .tk, .ml, .ga, .cf
    • 12 months free
  2. GitHub Pages Custom

    • Use your repository name as subdomain

Deployment Guide

Option 1: Netlify (Recommended)

# Build the client
cd client
npm run build

# Deploy build folder to Netlify
# Or connect GitHub repository for auto-deployment

Option 2: Docker Production

# Set your domain
echo "DOMAIN=yourdomain.com" > .env

# Build and start
docker-compose --profile production up -d

# Your site will be available at:
# http://yourdomain.com (port 80)
# https://yourdomain.com (port 443, if SSL configured)

Option 3: VPS/Cloud Server

# On your server
git clone <your-repo>
cd CV

# Production build
docker-compose up cv-website -d

# Or with custom domain
docker-compose --profile production up -d

SSL/HTTPS Setup

For production with custom domain:

  1. Create SSL directory

    mkdir ssl
  2. Get SSL certificates (Let's Encrypt recommended)

    # Using certbot
    sudo certbot certonly --standalone -d yourdomain.com
    
    # Copy certificates
    cp /etc/letsencrypt/live/yourdomain.com/fullchain.pem ssl/cert.pem
    cp /etc/letsencrypt/live/yourdomain.com/privkey.pem ssl/key.pem
  3. Update nginx.conf - Uncomment HTTPS section

  4. Restart services

    docker-compose --profile production restart

Project Structure

stefan-cv/
β”œβ”€β”€ client/                 # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ CVPage.js   # Main CV display
β”‚   β”‚   β”‚   └── AdminPage.js # Analytics dashboard
β”‚   β”‚   β”œβ”€β”€ App.js          # Main React app
β”‚   β”‚   └── App.css         # Styling
β”‚   └── public/
β”œβ”€β”€ server/                 # Node.js backend
β”‚   β”œβ”€β”€ index.js           # Express server
β”‚   β”œβ”€β”€ cv-data.json       # CV content (easily editable)
β”‚   └── package.json
β”œβ”€β”€ data/                  # SQLite database
β”œβ”€β”€ uploads/               # Profile pictures
β”œβ”€β”€ nginx.conf             # Nginx reverse proxy config
β”œβ”€β”€ .env.example          # Environment template
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
└── README.md

Key Features Explained

1. Visitor Analytics

  • Real-time Tracking: Every page visit is logged with IP, timestamp, user agent, and referrer
  • Dashboard: View total visits, unique visitors, daily statistics, and recent visitor details
  • Privacy-Focused: Only essential data is collected for analytics

2. PDF Export

  • High Quality: Uses html2canvas and jsPDF for professional PDF generation
  • Responsive: Automatically handles page breaks and formatting
  • Branded: Maintains visual design and styling in PDF format

3. Easy CV Updates

Edit server/cv-data.json to update CV content:

{
  "personalInfo": {
    "name": "Your Name",
    "title": "Your Title",
    "email": "your.email@example.com"
  },
  "experience": [...],
  "skills": [...]
}

4. Profile Picture Management

  • Upload via admin dashboard at /admin
  • Automatic image optimization and validation
  • Secure file handling with size limits

API Endpoints

  • GET /api/cv-data - Retrieve CV content
  • POST /api/cv-data - Update CV content
  • POST /api/track-visit - Log visitor analytics
  • GET /api/analytics - Get visitor statistics
  • POST /api/upload-picture - Upload profile picture

Configuration

Environment Variables

  • DOMAIN - Your domain name (default: localhost)
  • PORT - Server port (default: 3001)
  • NODE_ENV - Environment mode (development/production)

Security Features

  • Rate limiting on API endpoints
  • File upload validation and size limits
  • CORS protection
  • Helmet.js security headers
  • Nginx reverse proxy for production

Troubleshooting

Common Issues

  1. 'concurrently' is not recognized

    npm install
    # or
    npm run setup
  2. Docker nginx.conf error

    • Make sure nginx.conf exists in project root
    • Check file permissions
  3. Ports already in use

    • Kill processes using ports 3000, 3001, 80, 443
    • Or change ports in docker-compose.yml
  4. SSL certificate errors

    • Ensure certificates exist in ssl/ directory
    • Check certificate permissions
    • Verify nginx.conf SSL configuration

Support & Maintenance

  • CV Updates: Edit JSON file and restart server
  • Picture Updates: Use admin dashboard upload feature
  • Analytics: Monitor via /admin dashboard
  • Backups: Regularly backup data/ folder containing visitor database

License

MIT License - Feel free to use this project as a template for your own CV website.

Popular repositories Loading

  1. Sclaassen Sclaassen Public

    Config files for my GitHub profile.

    JavaScript

  2. StaticWEb StaticWEb Public

    HTML

  3. vanilla vanilla Public

    HTML

  4. basic-php-composer basic-php-composer Public

    PHP

  5. codespace codespace Public

    EJS

  6. dotNET-FrontEnd-to-BackEnd-on-Azure-Container-Apps dotNET-FrontEnd-to-BackEnd-on-Azure-Container-Apps Public