CodesPanda
Documentation

Shoppers Crown docs

Everything you need to install, customise and deploy Shoppers Crown: setup, scripts, folder layout, theming and hosting.

React 19TypeScriptViteTailwind CSS v4React Router

Screenshots

Shoppers Crown — Home
Home
Shoppers Crown — Shop
Shop
Shoppers Crown — Shipping calculator
Shipping calculator
Shoppers Crown — Pricing
Pricing

Click a screenshot to open it full size, or explore everything in the live preview.

Quick start

You need Node.js 20 or newer and npm. Clone the repository, install the dependencies and start the dev server:

Terminal
git clone https://github.com/codespanda/Shoppers-Crown.git
cd Shoppers-Crown
npm install
npm run dev

Then open http://localhost:5173. Changes reload instantly. You can also download the code as a ZIP from GitHub (Code → Download ZIP).

Scripts

npm run devStart the Vite dev server with hot reload
npm run buildType-check and build the production site into dist/
npm run previewServe the built dist/ folder locally to check it
npm run lintLint the code with Oxlint
npm run deployPublish dist/ to the gh-pages branch (run npm run build first)

Project structure

Built with Vite and TypeScript. The parts you'll work in most:

Folders
src/
  pages/               18 routed pages: Landing, Shop, ProductDetail, Cart, Checkout,
                       ShippingCalculator, Tracking, Dashboard, Pricing, Login, Signup…
  components/
    layout/            Header, footer and page shells
    sections/          Homepage and page sections
    ui/                Buttons, inputs, cards and other primitives
  context/             AuthContext, CartContext and ThemeContext
  data/mockData.ts     Products, brands, countries and other sample data
  lib/                 Helpers
  types/               Shared TypeScript types
  App.tsx              Routes
  index.css            Tailwind v4 theme

Customise the content

src/data/mockData.tsAll sample products, brands, countries and pricing used across the pages. Swap it for your own data or an API call.
src/pages/One file per page. Each page composes sections from src/components/sections/.
src/context/Sign-in state, the cart and the light/dark theme.

Colors and theme

src/index.cssBrand colors and fonts are defined in the Tailwind v4 @theme block. Change a value there to restyle every page.
Dark mode is built in: each color has a light and a dark value, so keep both in sync when you rebrand.

Pages and routing

React Router: routes are declared in src/App.tsx, one route per file in src/pages/. Forms use React Hook Form with Zod validation; data fetching uses TanStack Query.

Deployment

npm run build writes a static site to dist/, so it runs on any static host. The repository is set up for GitHub Pages:

  1. 1Run npm run build, then npm run deploy to push dist/ to the gh-pages branch.
  2. 2In the repository, open Settings → Pages and set Source to Deploy from a branch → gh-pages.
  3. 3netlify.toml and vercel.json are included too, so you can import the repo on Netlify or Vercel instead.
Netlify, Vercel or Cloudflare PagesImport the repository and use build command npm run build with output folder dist.
On Netlify and Vercel, public/_redirects and vercel.json send every route to index.html, so deep links like /shop work. GitHub Pages ignores those files: to host there, copy index.html to 404.html in dist/ after building, or deep links will show a 404.

License

Shoppers Crown is free and released under the MIT license. Use it for personal and commercial projects, including client work, with no attribution required beyond keeping the license notice in the code.

Want it set up for you?

We can customise Shoppers Crown with your content and branding, connect it to your backend and deploy it.