Saltar al contenido
  1. Home
  2. Documentation

Documentation

Everything you need to customize, configure, and publish your store.

Chapter 1

Getting started

To run the project you need Node.js 18 or higher and npm.

Verify Node

node --version    # should say v18.x.x or higher
npm  --version

Installation

  1. Unzip the package into a folder without spaces or special characters in the path. Windows tip: use C:\dev\mystore instead of C:\Users\...\Desktop\My Store.
  2. Open a terminal in that folder.
  3. Run npm install (1–3 minutes the first time).
  4. Run npm run dev and your browser opens at http://localhost:3000.
The dev server reloads automatically when you save changes in SCSS, JS, or .njk files. No need to restart anything.
Chapter 2

Project structure

You only work in the src/ folder. The dist/ folder is generated automatically.

fundev-package/
├── package.json              ← dependencies and scripts
├── package-lock.json         ← exact versions (DO NOT delete)
├── gulpfile.js               ← build pipeline
├── README.md                 ← short read
├── src/                      ← YOU WORK HERE
│   ├── assets/
│   │   ├── images/           ← your client images
│   │   ├── js/
│   │   │   ├── main.js
│   │   │   └── modules/      ← logic per feature
│   │   └── scss/
│   │       ├── main.scss     ← entry SCSS
│   │       ├── abstracts/    ← variables and mixins
│   │       ├── base/         ← reset, typography, design tokens
│   │       ├── themes/       ← _fashion, _furniture, _electronics
│   │       ├── layout/       ← header, footer, page-hero
│   │       ├── components/   ← buttons, cards, drawer, search
│   │       └── pages/        ← styles per page
│   └── views/
│       ├── *.njk             ← one page = one file
│       ├── _layouts/         ← master layout
│       ├── _partials/        ← header, footer, drawers
│       ├── _macros/          ← SVG icons, productCard
│       └── _data/
│           ├── site.json         ← ★ global configuration
│           ├── locales.json      ← ★ countries presets
│           ├── navigation.json   ← ★ menu and footer
│           ├── products.json     ← ★ catalog
│           ├── home-content.json ← ★ home editorial copy
│           └── i18n.json         ← UI strings dictionary
└── dist/                     ← generated by npm run build
The starred (★) files are the ones you'll touch most. Editing only those JSONs customizes the entire store without touching HTML, CSS, or JS.
Chapter 3

Commands

CommandWhat it does
npm run devDev server at http://localhost:3000 with auto-reload.
npm run buildProduction build (minified) into dist/ ready to deploy.
Chapter 4

Site configuration

The file src/views/_data/site.json controls name, logo, language, contact, and other global options.

{
  "name":     "Your Store",
  "tagline":  "Your slogan",
  "lang":     "en",
  "theme":    "fashion",            ← "fashion" | "furniture" | "electronics"
  "country":  "US",                 ← "US" | "MX" | "CA" | "GB" | "ES" | "AR" | "CO"
  "url":      "https://yourstore.com",

  "brand": {
    "logoText": "YourStore",
    "logoMark": "✦"
  },

  "contact": {
    "email": "hello@yourstore.com",
    "phone": "+1 555 123 4567",
    "city":  "New York, NY"
  },

  "license": {
    "type":         "frontend",     ← "frontend" or "premium"
    "buyer":        "Your Company",
    "purchaseDate": "2025-01-15",
    "createdBy":    "FunDev Studio",
    "createdByUrl": "https://fundevstudio.com"
  },

  "build": {
    "version": "1.0.0",
    "showThemeSwitcher":  true,     ← ⚠️ set to false in production
    "showPremiumBanner":  true      ← ⚠️ set to false if you have Premium
  }
}
Before publishing, set showThemeSwitcher and showPremiumBanner to false so they don't show on your client's live site.
Chapter 5

Country & currency

The template adapts automatically to 7 country presets. Set "country" in site.json and the currency, locale, postal code format, free-shipping threshold, and state list update.

CodeCountryCurrencyFree shipping over
USUnited StatesUSD ($)$75
MXMéxicoMXN ($)$1,500
CACanadaCAD ($)$99
GBUnited KingdomGBP (£)£60
ESSpainEUR (€)€70
ARArgentinaARS ($)$50,000
COColombiaCOP ($)$200,000

The presets live in src/views/_data/locales.json. To add a new country, add an entry there with currency, states, postal pattern, and shipping rates.

Chapter 6

The 3 themes

The template ships with 3 finished aesthetics. To switch between them, edit theme in site.json.

fashion apparel

Palette: warm cream + ink black + bordeaux.

Type: Fraunces (display) + Manrope (body).

Aesthetic: editorial, sharp edges, lots of whitespace.

furniture home

Palette: sand + terracotta + cocoa.

Type: Cormorant Garamond + Outfit.

Aesthetic: warm, organic, soft edges.

electronics tech

Palette: carbon black + gray + neon lime accent.

Type: Unbounded (display) + Manrope + JetBrains Mono.

Aesthetic: tech, dark, high contrast.

The demo switcher (runtime theme change)

When showThemeSwitcher is on, a "Fashion · Furniture · Electronics" picker appears at the bottom right. On click, not only colors and typography change — visible products, menu items, categories, hero/editorial/promo copy, and the top announcement change too. All in the same HTML, no reload.

  • data-theme-content="path.to.value" — points to a key in home-content.json. JS replaces text, src, or href on the element.
  • data-theme-zone="featured|bestsellers|categories" — marks containers whose children are fully regenerated (product grids, category tiles).
For the end client. In production you set showThemeSwitcher: false and the site stays on the chosen theme from site.json with no way to change it. The switcher is only a demo tool.

Edit content per theme

Home editorial copy (hero, editorial split, promo banner, etc.) lives in src/views/_data/home-content.json, organized by theme. Edit that file to change what the hero, subtitle, or CTAs say without touching HTML.

The main menu per theme lives in navigation.json. Each theme has its own primary[] with category-specific sections (Women/Men for fashion, Living/Dining for furniture, Audio/Computers for electronics).

Chapter 7

Product catalog

The file src/views/_data/products.json has one object per theme. Each contains categories and items.

Product structure

{
  "id":          "fa-001",                  ← required, unique
  "name":        "Linen shirt",             ← required
  "category":    "clothing",                ← required, must exist in categories
  "price":       79,                        ← required
  "comparePrice": 99,                       ← optional (price before discount)
  "image":       "https://.../photo.jpg",   ← required
  "variants":    "XS · S · M · L",          ← optional
  "colors":      "Beige · Black · White",   ← optional
  "badge":       "new",                     ← optional: "new" | "sale" | "exclusive" | "bestseller" | null

  "description": "Long product copy…",      ← optional, used in /producto.html
  "features":    ["European linen", "..."], ← optional, bullet list
  "sizes":       ["XS","S","M","L"],        ← optional, override of variants
  "colorOptions": [                         ← optional, override of colors
    { "name": "Beige", "hex": "#d6c4a8" }
  ]
}

Only id, name, category, price, and image are required. The detail page adapts to whatever is present.

Use your own photos

Put your photos in src/assets/images/ and reference them as "image": "assets/images/photo.jpg". Files in src/assets/ are copied to dist/ on build.

Recommended size: 600×750 px (4:5 vertical) for catalog cards. Compress with Squoosh before uploading.
Chapter 8

Included pages

PageFileDescription
Homeindex.njkHero, categories, featured, editorial, promo, benefits.
Catalogcatalogo.njkFilters, sort, grid/list view. Accepts ?category=….
Product detailproducto.njkGallery, variants, description, related. Reads ?id=….
Checkoutcheckout.njkForm with validations + sticky summary.
Order confirmedorden-confirmada.njkDetail of the new order.
My accountcuenta.njkOrders, data, addresses. Protected.
Sign in / Registerlogin.njk / registro.njkAuth forms.
Reset passwordrecuperar.njkSimulated form (real in Premium).
Favoritesfavoritos.njkProducts saved with ❤️.
About usnosotros.njkEditorial, story, values, stats.
Contactcontacto.njkForm + channels + FAQ.
404404.njkError page.
Documentationdocs.njkThis page.
Licenselicencia.njkTemplate terms of use.
Chapter 9

JavaScript modules

Each feature lives in its own file in src/assets/js/modules/.

ModulePurposeGlobal API
storage.jsPersistence (localStorage wrapper).FD.Storage
locale.jsCountry presets, currency formatting, state lists.FD.Locale
auth.jsSimulated client-side auth (register, login, profile).FD.Auth
cart.jsCart store.FD.Cart
cart-ui.jsConnects cart to DOM (drawer, counters, add-to-cart).
wishlist.jsPersistent favorites.FD.Wishlist
api.jsAPI facade (replaces with fetch in Premium).FD.Api
auth-ui.jsSign in/register/recover forms + header state.
header.jsSticky with blur on scroll.
search.jsLive search + recents.
catalog.jsFilters, sort, grid/list view.
product-detail.jsPDP hydration, gallery, variants.
checkout.jsValidation + order submission.
account.jsMy Account tabs + render of orders/data/addresses.
wishlist-page.jsRenders the favorites page.
announcement.jsTop bar rotator.
theme-content.jsRe-paints header, home, and catalog when the theme changes (demo).

Console access

Any exposed module is on window.FD.*. Useful for debugging:

FD.Cart.items()         // see current cart
FD.Cart.clear()         // empty cart
FD.Auth.currentUser()   // see logged-in user
FD.Wishlist.ids()       // see favorites
FD.Api.products.list({ category: 'clothing' })
Chapter 10

Style system (SCSS)

Colors, typography, and geometry are controlled via CSS Custom Properties. Everything that changes between themes lives as a CSS variable.

Main variables (in :root)

--fd-color-bg            ← site background
--fd-color-fg            ← primary text
--fd-color-primary       ← brand color
--fd-color-accent        ← accent color (CTAs, sales)
--fd-color-surface       ← raised surfaces (cards)
--fd-color-border        ← borders
--fd-color-muted         ← secondary text

--fd-font-display        ← title type
--fd-font-body           ← body type
--fd-font-mono           ← monospace (prices, SKUs)

--fd-radius-sm/md/lg/xl  ← border radii

--fd-space-1..10         ← spacing scale (4px → 128px)

Change a theme palette

Edit src/assets/scss/themes/_fashion.scss (or whichever theme). The whole site reacts automatically.

Chapter 11

Publishing your store

  1. Verify site.json has showThemeSwitcher: false and showPremiumBanner: false (if you have Premium).
  2. Run npm run build.
  3. Upload only the dist/ folder to your hosting.
  4. Configure your hosting to serve 404.html on errors.

Hostings that work without setup

  • Netlify: drag dist/ to netlify.com/drop.
  • Vercel: connect the repo, build command npm run build, output dir dist.
  • GitHub Pages: push dist/ contents to the gh-pages branch.
  • Hostinger / cPanel: upload dist/ contents to public_html/.
Chapter 12

Premium plan

If you need a real backend (database, admin panel, payments, real emails), the Premium plan adds all of that without changing the frontend you already know.

Frontend

This version
  • 15 finished pages
  • 3 aesthetics (fashion · furniture · electronics)
  • Cart, checkout, confirmation
  • Functional Sign in / Register UI
  • My Account with orders, addresses
  • Search and favorites
  • Browser-stored data
  • Static hosting (free)

Premium

Backend included
  • Everything in Frontend, +
  • PHP API + MySQL database
  • Admin panel
  • Centralized orders (multi-device)
  • Real auth with server sessions
  • Email password recovery
  • Login with Google / Facebook
  • Payment gateway (Stripe / MercadoPago)
  • Transactional emails
  • Real stock and inventory
Contact for upgrade
The frontend doesn't change between versions. The upgrade only replaces the data layer: what your client sees and how you customize the store remains identical. Nothing new to learn.
Chapter 13

Frequently asked questions

Can I use the template for a client?

Depends on the license. The Commercial license allows using the template in paid client projects. See details on the license page.

Do orders go to an email?

In the Frontend version, orders are stored in the visitor's browser. No automatic email sending nor admin panel. That requires the Premium plan with backend.

Can I accept real payments?

Not in the Frontend version. The payment form validates card with Luhn, but doesn't process real payments. To integrate Stripe / MercadoPago / PayPal you need Premium.

Can I add more pages?

Yes. Create a .njk file in src/views/ that extends _layouts/base.njk and fill the content block. After npm run build, the file shows up automatically in dist/.

Can I combine two themes (e.g., fashion + electronics)?

Not in the same install. Each theme is a complete visual identity. To sell two unrelated categories, you do two separate installs. If you want a custom theme, we can do it (ask).

How do I change the language?

The template ships in English by default. You can translate the .njk files and the JSON content to any language. Adjust "lang" in site.json.

Does it work offline?

Pages are static so yes (after first load). Fonts come from Google Fonts; if you need 100% offline, download them and serve locally.

How do I clear the demo data?

Open DevTools (F12) → Application → Local Storage → your domain → right click → Clear. Clears cart, users, favorites, and saved orders.