Global

Members

(constant) root

Create the root element for the app and render it inside the React Router context.
Source:

Methods

App() → {JSX.Element}

App - Main entry point of the frontend routing structure. This component defines client-side routing paths using React Router. It also maintains shared application state such as current user, uploaded images, and results.
Source:
Returns:
A React element that defines all routes of the application.
Type
JSX.Element

ClothesDetail(props) → {JSX.Element}

ClothesDetail component to view a single clothing item's information, image, and suggestions.
Parameters:
Name Type Description
props Object
Properties
Name Type Description
userId string ID of the currently logged-in user.
Source:
Returns:
Type
JSX.Element

FullCloset(props) → {JSX.Element}

FullCloset component renders the full virtual closet interface with category filter, search, user account dropdown, and popular item sidebar.
Parameters:
Name Type Description
props Object
Properties
Name Type Description
username string Username for greeting in account dropdown.
userId string ID of the currently logged-in user.
Source:
Returns:
Type
JSX.Element

History(props) → {JSX.Element}

History component displays the logged-in user's history of clothing interactions.
Parameters:
Name Type Description
props Object
Properties
Name Type Description
username string Current username.
userId string User ID from props (optional, fallback to URL or localStorage).
Source:
Returns:
Type
JSX.Element

Home() → {JSX.Element}

Home component provides the main landing page with navigation to login/register.
Source:
Returns:
Type
JSX.Element

Login(props) → {JSX.Element}

Login component provides username/password login and feedback messaging.
Parameters:
Name Type Description
props Object
Properties
Name Type Description
setUserId function Setter to store user ID globally.
setUsername function Setter to store username globally.
Source:
Returns:
Type
JSX.Element

Register() → {JSX.Element}

Register component allows users to sign up for an account.
Source:
Returns:
Type
JSX.Element

SaveImage(props) → {JSX.Element}

SaveImage component allows users to view the try-on result and send it to their email.
Parameters:
Name Type Description
props Object
Properties
Name Type Description
resultImage string | null URL of the final try-on image.
Source:
Returns:
Type
JSX.Element

TryOn(props) → {JSX.Element}

TryOn component allows users to preview clothing on their own image, manage closet, and save looks.
Parameters:
Name Type Description
props Object
Properties
Name Type Description
username string Current username.
userId string ID of the logged-in user.
uploadedImage string | null User's uploaded image for try-on.
setUploadedImage function Setter for uploaded image.
resultImage string | null Resulting AI-generated image.
setResultImage function Setter for generated result image.
Source:
Returns:
Type
JSX.Element

(async) fetchImageAsBase64(imageUrl) → {Promise.<string>}

Utility: Convert image URL to base64 string using FileReader and fetch API
Parameters:
Name Type Description
imageUrl string
Source:
Returns:
base64-encoded image string
Type
Promise.<string>