Toy Store Frontend

This directory contains the frontend code for the Toy Store website.

Structure

  • index.html - Main HTML template
  • index.js - JavaScript for rendering the UI and handling interactions

Features

  • Responsive design using TailwindCSS
  • Client-side rendering of different pages
  • Shopping cart with local storage persistence
  • Product search functionality
  • Contact form

Pages

  • Homepage with featured products and categories
  • Product detail pages
  • Category pages
  • Shopping cart
  • Contact page
  • Search results

JavaScript Architecture

The frontend uses a simple client-side rendering approach:

  1. The server injects initial data into the HTML
  2. JavaScript renders the appropriate page based on the URL
  3. Event listeners handle user interactions
  4. Cart data is stored in localStorage