Go to file
Michael Mainguy d0e70f81e7 Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs
Security Fixes:
- Add DOMPurify HTML sanitization for all dangerouslySetInnerHTML usage
- Create comprehensive HTML sanitization utility with configurable security levels
- Implement safe template rendering for slide content and layouts
- Add input validation for image sources and dangerous attributes

UI/UX Improvements:
- Replace browser alert() and confirm() with proper React modal components
- Create reusable Modal, AlertDialog, and ConfirmDialog components
- Add useDialog hook for easy dialog state management
- Implement proper accessibility with keyboard navigation and focus management
- Add smooth animations and responsive design for dialogs

Components Added:
- src/utils/htmlSanitizer.ts - Comprehensive HTML sanitization
- src/components/ui/Modal.tsx - Base modal component
- src/components/ui/AlertDialog.tsx - Alert dialog component
- src/components/ui/ConfirmDialog.tsx - Confirmation dialog component
- src/hooks/useDialog.ts - Dialog state management hook

Updated Components:
- SlideEditor.tsx - Now uses sanitized HTML rendering
- LayoutPreviewPage.tsx - Now uses sanitized HTML rendering
- PresentationEditor.tsx - Now uses React dialogs instead of browser dialogs

Benefits:
✅ Eliminates XSS vulnerabilities from unsafe HTML rendering
✅ Provides consistent, accessible user interface
✅ Improves user experience with proper modal dialogs
✅ Maintains security while preserving slide formatting capabilities
✅ Follows React best practices for component composition

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 17:41:15 -05:00
public Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs 2025-08-20 17:41:15 -05:00
scripts Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
src Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs 2025-08-20 17:41:15 -05:00
.gitignore Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
CLAUDE.md Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs 2025-08-20 17:41:15 -05:00
ERROR_HANDLING_STANDARDS.md Add full-screen layout preview route and fix iframe sandbox issue 2025-08-20 13:48:13 -05:00
eslint.config.js Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
IMPORT_STANDARDS.md Add full-screen layout preview route and fix iframe sandbox issue 2025-08-20 13:48:13 -05:00
index.html Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
package-lock.json Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs 2025-08-20 17:41:15 -05:00
package.json Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs 2025-08-20 17:41:15 -05:00
REACT19_IMPLEMENTATION.md Add full-screen layout preview route and fix iframe sandbox issue 2025-08-20 13:48:13 -05:00
README.md updated README.md, removed boilersplate and added instructions for using 2025-08-20 10:26:23 -05:00
tsconfig.app.json Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
tsconfig.json Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
tsconfig.node.json Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
USERFLOWS.md Implement slide deletion and duplication functionality 2025-08-20 17:32:06 -05:00
VITE_PERFORMANCE.md Add full-screen layout preview route and fix iframe sandbox issue 2025-08-20 13:48:13 -05:00
vite.config.ts Add full-screen layout preview route and fix iframe sandbox issue 2025-08-20 13:48:13 -05:00

Online slide presentation editor and viewer built with React and Vite


A web application for creating, editing, and presenting slide presentations with customizable themes and layouts.

Features

  • Create new presentations with a selection of built-in themes
  • Add slides with various layouts based on the selected theme
  • Add text and images to slide layout "slots"
  • Add presentation notes to slides
  • Present slides in full-screen mode
  • Easily switch themes and update presentations accordingly
  • Modular and reusable React components
  • Customizable themes with support for CSS, fonts, colors, and images
  • Support for "master slides" with non-overridable content
  • Responsive design for various screen sizes
  • Export presentations to PDF or HTML format

Getting Started

Prerequisites

  • Node.js (v20 or later)
  • npm (v9 or later)
  • Git (for cloning the repository)
  • A modern web browser (for running the application)
  • A code editor (e.g., VSCode) for development
  • Basic knowledge of React, TypeScript, HTML, and CSS
  • Familiarity with Vite and npm package management

Installation

  • Clone the repository:
    git clone https://git.dasfad.com/mmainguy/slideshare.git
    
  • Navigate to the project directory:
    cd slideshare
    
  • Install dependencies:

npm install ```

  • Start the development server:

npm run dev ```

  • Open your web browser and navigate to http://localhost:5173 to view the application.