Skip to content

markhazleton/ReactSparkPortfolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ReactSparkPortfolio

License: MIT GitHub stars GitHub issues Azure Static Web Apps CI/CD GitHub forks Last Commit

πŸš€ A modern, high-performance React portfolio showcasing enterprise-grade web development

🌐 Live Demo β€’ πŸ“– Documentation β€’ πŸ”§ Admin Panel β€’ πŸ“‹ Report Bug


🎯 Overview

ReactSparkPortfolio is a production-ready, enterprise-grade developer portfolio built with React 19, TypeScript, and Vite. It demonstrates modern frontend engineering best practices, serverless architecture, and cloud-native deployment patterns. The project serves as both a personal portfolio and a comprehensive reference implementation for scalable, maintainable web applications.

✨ Key Highlights

  • 🎨 Modern UI/UX - Bootstrap 5 + custom SCSS with dark/light theme switching
  • ⚑ Performance First - Vite + lazy loading + code splitting for optimal UX
  • πŸ”’ Type Safety - Full TypeScript implementation with strict mode
  • 🌐 Multi-Platform - Dual deployment (Azure Static Web Apps + GitHub Pages)
  • πŸ”„ Real-time Features - SignalR chat, live weather, dynamic content
  • β™Ώ Accessibility - WCAG compliant with semantic HTML and ARIA
  • πŸ“± Responsive - Mobile-first design that works on all devices
  • πŸš€ CI/CD Ready - Automated builds and deployments via GitHub Actions

πŸ—οΈ Architecture

graph TD
    A[React Frontend] --> B[Azure Functions API]
    A --> C[External APIs]
    B --> D[WebSpark Backend]
    C --> E[OpenWeather API]
    C --> F[RSS Feeds]
    A --> G[SignalR Hub]
    G --> H[Real-time Chat]
    A --> I[Static Assets]
    I --> J[Azure CDN]
Loading

🎭 Features

🎨 User Experience

  • πŸŒ“ Dark/Light Mode - Persistent theme switching with smooth transitions
  • πŸ“± Responsive Design - Mobile-first approach with Bootstrap 5 components
  • ⚑ Fast Loading - Optimized bundle size with lazy-loaded components
  • πŸ” SEO Optimized - Meta tags, Open Graph, JSON-LD structured data
  • β™Ώ Accessible - WCAG 2.1 AA compliant with keyboard navigation

πŸ’» Technical Features

  • πŸ”„ Real-time Chat - SignalR integration with multiple AI personalities
  • 🌀️ Weather Widget - Live weather data with interactive maps (Leaflet)
  • πŸ“° RSS Integration - Dynamic blog post feeds with XML parsing
  • πŸƒ Fun Elements - Random jokes API integration
  • πŸ“Š Project Showcase - Searchable, sortable portfolio with admin panel
  • πŸ—ΊοΈ Interactive Maps - Location-based weather visualization

πŸ› οΈ Developer Experience

  • πŸ”§ Admin Interface - Live project management with image browser
  • πŸ“ TypeScript - Strict type safety and IntelliSense support
  • πŸ§ͺ Modern Tooling - ESLint, Prettier, SCSS compilation
  • πŸ“š Documentation - Comprehensive guides in /documentation
  • πŸ”„ Hot Reload - Instant development feedback with Vite

πŸ› οΈ Technology Stack

🎯 Frontend Core
  • React 19.1 - Latest React with concurrent features
  • TypeScript 5.9 - Type safety and modern JavaScript features
  • Vite 7.0 - Lightning-fast build tool and development server
  • React Router 7.7 - Client-side routing and navigation
🎨 Styling & UI
  • Bootstrap 5.3.7 - Responsive component framework
  • SCSS/Sass 1.89 - Enhanced CSS with variables and mixins
  • React Bootstrap 2.10 - Bootstrap components for React
  • Bootstrap Icons 1.13 - Comprehensive icon library
  • Bootswatch 5.3 - Bootstrap theme variants
πŸ”§ State & Data
  • React Context API - Global state management
  • Axios 1.11 - HTTP client for API requests
  • date-fns 4.1 - Modern date utility library
  • xml2js 0.6 - XML parsing for RSS feeds
🌐 APIs & Integration
  • SignalR 9.0 - Real-time web communication
  • OpenWeather API - Weather data via WebSpark proxy
  • JokeAPI - Entertainment content integration
  • Leaflet 1.9 - Interactive maps and geolocation
☁️ Cloud & Deployment
  • Azure Static Web Apps - Serverless hosting with CDN
  • Azure Functions - Serverless API endpoints
  • GitHub Pages - Alternative static hosting
  • GitHub Actions - CI/CD automation
🧹 Development Tools
  • ESLint 9.32 - Code linting and quality
  • TypeScript ESLint - TypeScript-specific linting
  • Concurrently - Run multiple npm scripts
  • rimraf - Cross-platform file removal
  • ts-node - TypeScript execution for scripts

πŸ“ Project Structure

ReactSparkPortfolio/
β”œβ”€β”€ πŸ“± src/                          # Source code
β”‚   β”œβ”€β”€ 🧩 components/               # React components
β”‚   β”‚   β”œβ”€β”€ About.tsx               # About section with tech stack
β”‚   β”‚   β”œβ”€β”€ Articles.tsx            # RSS blog integration  
β”‚   β”‚   β”œβ”€β”€ Chat.tsx                # SignalR real-time chat
β”‚   β”‚   β”œβ”€β”€ Header.tsx              # Navigation with theme toggle
β”‚   β”‚   β”œβ”€β”€ Hero.tsx                # Landing page hero section
β”‚   β”‚   β”œβ”€β”€ Projects.tsx            # Portfolio project showcase
β”‚   β”‚   β”œβ”€β”€ WeatherForecast.tsx     # Weather widget with maps
β”‚   β”‚   └── ...                     # Additional components
β”‚   β”œβ”€β”€ 🎨 scss/                    # SCSS styling
β”‚   β”‚   β”œβ”€β”€ components/             # Component-specific styles
β”‚   β”‚   β”œβ”€β”€ utilities/              # Custom utility classes  
β”‚   β”‚   β”œβ”€β”€ variables/              # SCSS variables and mixins
β”‚   β”‚   └── styles.scss             # Main stylesheet entry
β”‚   β”œβ”€β”€ πŸ”§ contexts/                # React context providers
β”‚   β”œβ”€β”€ πŸ“Š data/                    # Static data files
β”‚   β”œβ”€β”€ οΏ½ services/                # API service layers
β”‚   β”œβ”€β”€ πŸ“ models/                  # TypeScript interfaces
β”‚   └── βš™οΈ utils/                   # Utility functions
β”œβ”€β”€ ☁️ api/                          # Azure Functions
β”‚   └── proxy-rss/                  # RSS proxy function
β”œβ”€β”€ πŸŽ›οΈ admin/                       # Project management interface
β”œβ”€β”€ πŸ“– documentation/               # Project documentation  
β”œβ”€β”€ πŸ—οΈ docs/                        # Production build output
β”œβ”€β”€ βš™οΈ .github/                     # GitHub workflows and templates
└── πŸ“‹ Configuration files          # Various config files

πŸš€ Quick Start

πŸ“‹ Prerequisites

⚑ Installation

# Clone the repository
git clone https://github.com/markhazleton/ReactSparkPortfolio.git
cd ReactSparkPortfolio

# Install dependencies
npm install

# Start development server
npm run dev

πŸŽ‰ That's it! Open http://localhost:3000 to see the app.

πŸ”§ Available Scripts

Command Description
npm run dev πŸš€ Start development server with hot reload
npm run build πŸ“¦ Build production bundle
npm run preview πŸ‘€ Preview production build locally
npm run lint πŸ” Lint codebase with ESLint
npm run clean 🧹 Remove build artifacts and cache
npm run build-css 🎨 Compile SCSS to CSS
npm run watch-css πŸ‘οΈ Watch and compile SCSS changes
npm run generate-seo-files πŸ“„ Generate sitemap.xml and robots.txt

🌐 Deployment

πŸ”΅ Azure Static Web Apps (Recommended)

The project is configured for automatic deployment to Azure Static Web Apps:

  1. Automatic CI/CD - Triggered on push to main branch
  2. Serverless API - Azure Functions for backend services
  3. Global CDN - Worldwide content delivery
  4. Custom Domains - SSL certificates included
  5. Preview Deployments - Automatic PR previews

Configuration Files:

  • .github/workflows/azure-static-web-apps-*.yml - GitHub Actions workflow
  • staticwebapp.config.json - Azure SWA routing and settings
  • api/ - Azure Functions for serverless backend

🟒 GitHub Pages

Alternative deployment to GitHub Pages:

# Build and deploy to GitHub Pages
npm run build
git add docs/
git commit -m "Deploy to GitHub Pages"
git push origin main

Setup: Enable GitHub Pages in repository settings, source: /docs folder.


πŸŽ›οΈ Admin Panel

The project includes a full-featured admin interface for managing portfolio content:

πŸš€ Quick Start

# Navigate to admin directory
cd admin

# Install dependencies
npm install

# Start admin server
npm run dev

✨ Features

  • πŸ“ Project Management - Add, edit, delete portfolio projects
  • πŸ–ΌοΈ Image Browser - Visual image selection with previews
  • πŸ”— URL Validation - Real-time accessibility checking
  • πŸ“± Responsive Interface - Works on all devices
  • οΏ½ Data Persistence - Projects saved to JSON file

Access: http://localhost:3001 (when admin server is running)


πŸ§ͺ Testing & Quality

πŸ” Code Quality

# Run linting
npm run lint

# Type checking
npx tsc --noEmit

# Check for outdated dependencies  
npm outdated

πŸ›‘οΈ Security

# Security audit
npm audit

# Fix vulnerabilities
npm audit fix

β™Ώ Accessibility

  • Semantic HTML - Proper heading hierarchy and landmarks
  • ARIA Labels - Screen reader compatibility
  • Color Contrast - WCAG 2.1 AA compliant
  • Keyboard Navigation - Full keyboard accessibility

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

πŸ”„ Development Process

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“‹ Issue Templates


πŸ“š Documentation


πŸ”— Related Projects


πŸ“ˆ Performance

  • Lighthouse Score: 95+ across all metrics
  • Bundle Size: <500KB gzipped
  • First Contentful Paint: <1.5s
  • Time to Interactive: <3s

πŸ†˜ Support

  • οΏ½ Issues: GitHub Issues
  • πŸ’¬ Discussions: GitHub Discussions
  • πŸ› Bug Reports: Use the bug report template
  • ✨ Feature Requests: Use the feature request template

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • React Team - For the amazing framework
  • Microsoft Azure - For excellent cloud services
  • Bootstrap Team - For the responsive framework
  • Vite Team - For the lightning-fast build tool
  • Open Source Community - For countless contributions

Built with ❀️ by Mark Hazleton

Follow on GitHub Twitter Follow

⭐ Star this repo if you find it helpful!

  • Responsive Design: Mobile-first, accessible, and optimized for all device sizes (Bootstrap 5.3)
  • Dark/Light Mode: Theme toggle with persistent context-based state
  • Dynamic Content: RSS feed integration, real-time weather, jokes, and chat
  • TypeScript: Strict type safety and modern React patterns
  • SEO Optimized: Meta tags, Open Graph, and JSON-LD structured data
  • Serverless Backend: Azure Functions for API/data proxying
  • Dual Deployment: GitHub Pages & Azure Static Web Apps (with CI/CD)
  • CI/CD: Automated builds and deployments via GitHub Actions
  • Accessibility: Semantic HTML, ARIA, and color contrast best practices
  • Performance: Lazy loading, code splitting, and optimized assets

πŸ› οΈ Technology Stack

  • Frontend: React 19.1, TypeScript 5.8, Vite 6.3
  • Styling: Bootstrap 5.3.5, SCSS/Sass, React Bootstrap, Bootstrap Icons
  • State Management: React Context API
  • Routing: React Router v7.5
  • APIs: Axios, OpenWeather, JokeAPI, SignalR (real-time chat), XML2JS (RSS)
  • Maps: Leaflet & React Leaflet
  • Markdown: React Markdown
  • Date Handling: date-fns
  • Syntax Highlighting: Prism.js
  • Serverless: Azure Functions (API)
  • CI/CD: GitHub Actions
  • Deployment: Azure Static Web Apps, GitHub Pages

πŸ“ Project Structure

ReactSparkPortfolio/
β”œβ”€β”€ public/                  # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/             # Images, SVGs
β”‚   β”œβ”€β”€ components/         # React components (hooks/, modules/)
β”‚   β”œβ”€β”€ contexts/           # React context providers
β”‚   β”œβ”€β”€ css/                # Compiled CSS
β”‚   β”œβ”€β”€ data/               # Static data (JSON, XML)
β”‚   β”œβ”€β”€ models/             # TypeScript interfaces/types
β”‚   β”œβ”€β”€ scss/               # SCSS source files (components/, utilities/, variables/)
β”‚   β”œβ”€β”€ services/           # API/data services
β”‚   β”œβ”€β”€ App.tsx             # Main app
β”‚   └── main.tsx            # Entry point
β”œβ”€β”€ api/                    # Azure Functions (serverless API)
β”œβ”€β”€ docs/                   # Production build output
β”œβ”€β”€ .github/                # Workflows, issue/PR templates
β”œβ”€β”€ scripts/                # Utility scripts (SEO, robots.txt, etc.)
β”œβ”€β”€ vite.config.ts          # Vite config
β”œβ”€β”€ tsconfig.json           # TypeScript config
β”œβ”€β”€ staticwebapp.config.json# Azure SWA config
β”œβ”€β”€ swa-cli.config.json     # SWA CLI config
└── package.json            # Dependencies & scripts

πŸš€ Getting Started

Environment & Configuration

  • Node.js: v18 or higher
  • npm: v9+ recommended
  • .env files: Supports environment-specific config via .env, .env.development, .env.production, etc. See vite.config.ts for details.
  • Required Variables: (example)
    • VITE_BASE_URL - Base URL for the app
    • OPENWEATHER_API_KEY - (if using direct weather API)
    • See vite.config.ts and service files for more

Installation

# Clone the repository
git clone https://github.com/markhazleton/ReactSparkPortfolio.git
cd ReactSparkPortfolio

# Install dependencies
npm install

Scripts

Script Description
npm run dev Start dev server with HMR and SCSS watcher
npm run build Build production bundle (outputs to docs/)
npm run preview Preview local production build
npm run lint Lint codebase with ESLint
npm run clean Remove build artifacts and cache
npm run build-css Compile SCSS to CSS
npm run watch-css Watch and auto-compile SCSS
npm run generate-sitemap Generate sitemap.xml
npm run generate-robots Generate robots.txt
npm run generate-seo-files Generate all SEO files

Development

npm run dev
# Open http://localhost:3000

Linting & Code Quality

  • Lint: npm run lint (uses ESLint, see eslint.config.js)
  • Type Checking: TypeScript strict mode enabled
  • Formatting: (Recommend using Prettier or VSCode default)

πŸ“¦ Building for Production

npm run build
npm run preview # (optional, to preview build)
  • Output is in docs/ (for GitHub Pages & Azure SWA)

πŸ§ͺ Testing

  • No automated tests included yet.
  • Manual Testing: Use the live demo or local preview to verify features.
  • Recommended: Add unit/integration tests with Jest, React Testing Library, or Cypress.

🌐 Deployment

GitHub Pages

  1. Build: npm run build (outputs to docs/)
  2. Push: Commit and push docs/ to main branch
  3. Enable Pages: In GitHub repo settings, set Pages source to /docs on main
  4. Access: https://<your-username>.github.io/<repository-name>/

Azure Static Web Apps

  1. Config Files:

    • staticwebapp.config.json, swa-cli.config.json, .github/workflows/azure-static-web-apps-gentle-smoke-063be0b10.yml
  2. CI/CD Workflow: Automated publishing is handled by a GitHub Actions workflow:

    • Trigger: Runs on push and pull requests to the main branch.
    • Jobs:
      • build_and_deploy_job: Builds and deploys the app and API unless the PR is closed.
      • close_pull_request_job: Cleans up deployments when a PR is closed.

    Key Steps:

    1. Checkout code: Uses actions/checkout@v3 with submodules.

    2. Setup Node.js: Uses actions/setup-node@v3 (Node 18, npm cache).

    3. Install dependencies: Runs npm ci for clean install.

    4. OIDC Client: Installs @actions/core and @actions/http-client for authentication.

    5. Get Id Token: Uses actions/github-script@v6 to retrieve an OIDC token for Azure authentication.

    6. Build and Deploy: Uses Azure/static-web-apps-deploy@v1 with these settings:

      • azure_static_web_apps_api_token: Secure token from repo secrets
      • action: "upload"
      • app_location: / (root)
      • api_location: api (serverless API)
      • output_location: docs (Vite build output)
      • app_build_command: npm run build
      • skip_app_build/skip_api_build: false
      • github_id_token: OIDC token for secure deployment
    7. Close PR Deployments: When a PR is closed, the workflow runs a job to clean up preview deployments using the same Azure action.

    Reference: See .github/workflows/azure-static-web-apps-gentle-smoke-063be0b10.yml for the full workflow file.

  3. Local Dev:

    npm install -g @azure/static-web-apps-cli
    swa start
  4. Features:

    • Global CDN, SSL, serverless API, staging environments, advanced routing

πŸ›‘οΈ Maintenance & Updating

  • Dependencies: Run npm outdated and npm update regularly
  • Security: Use npm audit and keep dependencies patched
  • Azure Best Practices: Use managed identity, never hardcode secrets, follow Azure security guidance
  • Accessibility: Test with screen readers and color contrast tools
  • Performance: Audit with Lighthouse, optimize images/assets

β™Ώ Accessibility, Security & Performance

  • Accessibility: Semantic HTML, ARIA, alt text, keyboard navigation, color contrast
  • Security: No secrets in code, uses environment variables, follows Azure best practices
  • Performance: Lazy loading, code splitting, optimized assets, CDN delivery

🀝 Contributing

Contributions are welcome!

  • Issues: Use GitHub Issues
  • Pull Requests: Fork, branch, and submit PRs
  • Code Style: Follow existing TypeScript/React patterns and lint rules
  • Templates: See .github/ISSUE_TEMPLATE/ for bug/feature templates

❓ FAQ & Troubleshooting

  • Q: Build fails on Windows?
    • A: Ensure Node.js v18+, use PowerShell, and check for locked files in node_modules.
  • Q: Weather/Chat/API not working?
    • A: Check environment variables and API keys.
  • Q: Styling issues?
    • A: Run npm run build-css and ensure SCSS compiles without errors.
  • Q: How do I update dependencies?
    • A: npm update and review changelogs for breaking changes.

πŸ” SEO Implementation

  • Semantic HTML5, meta tags, Open Graph, JSON-LD, canonical URLs, mobile-friendly, fast loading
  • See index.html and SEO context for implementation details

πŸ“ Blog Posts

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ž Support & Contact

  • Issues: GitHub Issues
  • Pull Requests: Welcome!
  • General Questions: Please use GitHub Issues for all support and contact

Built with ❀️ by the ReactSparkPortfolio community. Report an issue

About

ReactSparkPortfolio is a production-ready, enterprise-grade developer portfolio built with React 19, TypeScript, and Vite.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •