Shared

This directory contains shared code that is used by both the frontend and backend.

Files

  • types.ts - TypeScript interfaces and types for the application
  • utils.ts - Utility functions for validation, formatting, and sanitization

Types

  • PortfolioFormData - Interface for the form data
  • ContentType - Type for the content type options
  • GenerateRequest - Interface for the API request
  • GenerateResponse - Interface for the API response

Utilities

  • validatePortfolioForm - Validates the form data
  • formatGeneratedText - Formats the generated text
  • sanitizeInput - Sanitizes user input to prevent XSS