Skip to content

why-pengo/why-pengo.github.io

Repository files navigation

Jon Morgan - Portfolio Website

πŸš€ Modern portfolio website built with TypeScript, Vite, and deployed on GitHub Pages.

Visit: https://why-pengo.github.io/

πŸ› οΈ Tech Stack

  • Build Tool: Vite 6.0
  • Language: TypeScript 5.7
  • Testing: Vitest 2.1 with jsdom
  • Styling: Bootstrap 5.3 + Custom CSS
  • Code Quality: ESLint + Prettier
  • CI/CD: GitHub Actions

πŸ“‹ Prerequisites

  • Node.js 20.x or higher
  • npm 10.x or higher

πŸš€ Getting Started

Installation

npm install

Development

Run the development server with hot module replacement:

npm run dev

Open http://localhost:5173 to view it in the browser.

Building

Build the production-ready static site:

npm run build

The built files will be output to the docs/ directory for GitHub Pages deployment.

Preview Production Build

Preview the production build locally:

npm run preview

πŸ§ͺ Testing

Run Tests

npm test

Run Tests with UI

npm run test:ui

Generate Coverage Report

npm run test:coverage

Coverage reports are generated in the coverage/ directory.

πŸ“ Code Quality

Format Code

npm run format

Lint Code

npm run lint

Fix Linting Issues

npm run lint:fix

Type Check

npm run type-check

🚒 Deployment

The site is automatically deployed to GitHub Pages when changes are pushed to the main branch.

Manual Deployment

  1. Build the project: npm run build
  2. The output in docs/ folder is served by GitHub Pages
  3. Commit and push the changes

GitHub Actions

The project includes a GitHub Actions workflow (.github/workflows/deploy.yml) that:

  • Runs tests
  • Performs type checking
  • Lints code
  • Builds the project
  • Deploys to GitHub Pages

πŸ“ Project Structure

.
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── deploy.yml         # GitHub Actions deployment workflow
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ test/
β”‚   β”‚   β”œβ”€β”€ setup.ts          # Vitest setup
β”‚   β”‚   └── index.test.ts     # Unit tests
β”‚   └── index.ts              # Main entry point
β”œβ”€β”€ public/                   # Static assets (copied to docs/)
β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”œβ”€β”€ index.css
β”‚   β”œβ”€β”€ profile.png
β”‚   β”œβ”€β”€ robots.txt
β”‚   └── separator.svg
β”œβ”€β”€ docs/                     # Build output (GitHub Pages serves this)
β”œβ”€β”€ index.html               # Main HTML file
β”œβ”€β”€ vite.config.ts           # Vite configuration
β”œβ”€β”€ vitest.config.ts         # Vitest configuration
β”œβ”€β”€ tsconfig.json            # TypeScript configuration
β”œβ”€β”€ eslint.config.js         # ESLint configuration
β”œβ”€β”€ .prettierrc              # Prettier configuration
└── package.json             # Dependencies and scripts

🎨 Features

  • Responsive Design: Mobile-first approach with Bootstrap 5
  • Animated Background: CSS-based animated circles
  • Profile Showcase: Animated profile image
  • Project Links: Direct links to various projects:
    • Angular Sudoku (v18)
    • Python Sprinkler Control
    • Three.js WebGL Playground
    • Phaser Game Development
  • Modern Build: Optimized with Vite for fast builds and HMR
  • Type Safety: Full TypeScript support
  • Test Coverage: Comprehensive Vitest test suite
  • CI/CD: Automated testing and deployment

πŸ”§ Configuration

Vite

Configuration is in vite.config.ts. Key settings:

  • Output directory: docs/ (for GitHub Pages)
  • Base URL: / (root path)
  • Source maps enabled in production

TypeScript

Modern TypeScript configuration with:

  • Strict mode enabled
  • ES2020 target
  • Bundler module resolution

ESLint

Flat config format with TypeScript support and recommended rules.

Prettier

Consistent code formatting with sensible defaults.

πŸ“„ License

MIT

πŸ‘€ Author

Jon Morgan

🀝 Contributing

This is a personal portfolio project, but suggestions and improvements are welcome!

πŸ“Š Best Practices Implemented

  • βœ… Modern build tooling (Vite)
  • βœ… TypeScript for type safety
  • βœ… Comprehensive test suite with Vitest
  • βœ… Code quality tools (ESLint, Prettier)
  • βœ… Automated CI/CD with GitHub Actions
  • βœ… Semantic HTML and accessibility
  • βœ… Responsive design
  • βœ… Optimized assets and build output
  • βœ… Security headers and best practices
  • βœ… Git ignored files properly configured

About

Jon Morgan - Portfolio Website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors