Commit Graph

2 Commits

Author SHA1 Message Date
AmirReza Jamali 3e5e135b47 feat(security): Add XSS protection with DOMPurify sanitization
- Add sanitize.ts utility module with sanitizeText(), sanitizeUrl(), and sanitizeHtml() functions
- Implement server-side HTML entity escaping and client-side DOMPurify sanitization
- Add comprehensive test suite for sanitization functions in lib/__tests__/sanitize.test.ts
- Secure marketing pages by sanitizing all CMS data (hero, features, challenges, advantages, footer)
- Secure inquiries form by sanitizing field labels, placeholders, and button text
- Add SECURITY.md documentation outlining XSS protection measures and best practices
- Add USAGE_EXAMPLES.md with detailed examples of sanitization function usage
- Add XSS_PROTECTION_SUMMARY.md with implementation overview
- Update package.json to include dompurify (^3.3.0) dependency
- Protects against common XSS attack vectors including script injection, event handlers, and malicious URLs
2025-11-30 11:14:42 +03:30
AmirReza Jamali 807a77992e feat(analytics): Add Firebase Analytics integration with page tracking
- Initialize Firebase Analytics with configuration and client-side setup
- Create GoogleAnalytics component to track page views on route changes
- Add analytics utility functions for tracking custom events (button clicks, form submissions, link clicks, searches)
- Integrate GoogleAnalytics component into home, not-found, and marketing layouts with Suspense boundary
- Add firebase dependency to package.json
- Enable automatic page view tracking with pathname and search parameters
2025-11-22 10:56:40 +03:30