Problem statement
A small storefront co-locates a home view and a product view on the same page. Two entry modules and one shared bootstrap module together turn the empty page shell into the finished storefront. Nothing happens at module import time. The shared setup runs exactly once even when both entries request it, each entry sets up only its own view, and calling an entry's setup a second time does not stack duplicate click listeners, using Vanilla TypeScript and standard DOM APIs.
Demo
The page, styles, seeded data, and DOM helpers are already scaffolded and wired. Only the three modules in src/js/ — bootstrap.ts, homeEntry.ts, and productEntry.ts — are missing. Implement them so every test passes. Do not edit any other file.
What to implement
- Do not do any page work when a module is first loaded. All work happens when the page calls the entry's setup function.
- Show the site header (brand name and tagline) exactly once, no matter how many entries ask for it to be set up.
- Show the home view (featured line and Explore button) when the home entry's setup runs. Do not show anything from the product view.
- Show the product view (name, price, and Add to cart button) when the product entry's setup runs. Do not show anything from the home view.
- Each time the Explore button is clicked, increment the Explored count on the page by exactly one. Each time the Add to cart button is clicked, increment the In cart count on the page by exactly one.
- Running an entry's setup a second time must not add a second click listener; one click still moves each counter by exactly one.
- Everything shown must come from the seeded data. Nothing should be hardcoded.
