• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
damixnr

damixnr

OpenCloset

Remix of laurynas/ChatAppSDKStarter
Public
Like
OpenCloset
Home
Code
10
backend
5
frontend
2
shared
4
.vtignore
OPENCLOSET.md
README.md
TESTING.md
TROUBLESHOOTING.md
WIDGET_REGISTRATION.md
deno.json
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
TESTING.md
Code
/
TESTING.md
Search
…
TESTING.md

Testing the Widget Components

This document describes how to test the three new React widget components that have been created.

Components Created

  1. CounterWidget - Interactive counter with increment/decrement functionality
  2. TodoWidget - Todo list with completion tracking and progress bar
  3. WeatherWidget - Weather display with temperature and conditions
  4. DemoWidget - Showcase page displaying all three widgets together
  5. ItemCard - Individual wardrobe item display component
  6. MultiItemCard - Grid display for multiple wardrobe items
  7. OutfitCard - Complete outfit display with top and bottom pieces

Testing in ChatGPT

Once you've added the MCP server to ChatGPT, you can test the widgets with these prompts:

Counter Widget

  • "Show me a counter widget"
  • "Show me a counter starting at 10 with step size 2"
  • "Increment the counter by 5" (after showing a counter)
  • "Decrement the counter by 3" (after showing a counter)
  • "Reset the counter to 0" (after showing a counter)

Todo Widget

  • "Show me a todo list"
  • "Show me my todos"

Weather Widget

  • "Show me the weather"
  • "Show me weather for London"
  • "Show me weather for Tokyo"

Demo Page

  • Navigate directly to /demo route to see all widgets together

Wardrobe Widgets

  • "Show me an item card"
  • "Show me an item card for a dress"
  • "Show me multiple wardrobe items"
  • "Show me 4 wardrobe items"
  • "Show me an outfit"
  • "Create an outfit for me"

OpenCloset Functionality (Real Features)

  • Upload clothing photos and say: "Add these to my closet as tops"
  • Upload clothing photos and say: "Add these to my closet as bottoms"
  • "Suggest an outfit from my closet"
  • "Show me all my closet items"
  • "Show me all my tops"
  • "Show me all my bottoms"
  • "What's in my closet?"

Available MCP Tools

Counter Tools

  • show_counter - Display counter widget with optional initial count and step
  • increment_counter - Increment counter by step amount
  • decrement_counter - Decrement counter by step amount
  • reset_counter - Reset counter to zero

Todo Tools

  • show_todos - Display todo list widget with sample data

Weather Tools

  • show_weather - Display weather widget with sample data for specified location

Wardrobe Tools

  • show_item_card - Display individual wardrobe item card
  • show_multi_item_card - Display multiple wardrobe items in a grid
  • show_outfit_card - Display complete outfit with top and bottom pieces

OpenCloset Tools (Real Functionality)

  • opencloset.capture_items - Upload and categorize clothing photos
  • opencloset.suggest_outfit - Get outfit suggestions from saved items
  • opencloset.list_items - View all closet items with optional category filter

Widget Routes

The following routes are available in the widget system:

  • / - Loading widget (default)
  • /list - Message list widget
  • /detail/:messageId - Message detail widget
  • /counter - Counter widget
  • /todo - Todo widget
  • /weather - Weather widget
  • /demo - Demo page with all widgets
  • Individual wardrobe components are rendered as standalone widgets (not routes)

Technical Details

Data Flow

  1. ChatGPT calls MCP tool (e.g., show_counter)
  2. Tool returns structured data with kind field
  3. NavigationSync component reads the kind and navigates to appropriate route
  4. Widget component renders based on the structured data

Widget State Management

  • All widgets use the useToolOutput hook to access structured data
  • Theme support via useTheme hook (light/dark mode)
  • Interactive actions send follow-up messages to ChatGPT via getOpenAI().sendFollowUpMessage()

Styling

  • Uses TailwindCSS for styling
  • Responsive design with mobile-first approach
  • Dark/light theme support throughout
  • Consistent design language across all widgets
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.