Meu Natal Digital

A Christmas messagemade just forevery child.

Personalized videos, letters and surprises from Santa Claus.

A Christmas store in React that runs inside WordPress, in two identities.

Online storeSanta Claus and faithWordPress + WooCommerce

  • React 18.3
  • TypeScript 5.9
  • Webpack 5
  • Tailwind 3.4
  • WooCommerce REST
  • JWT
Meu Natal Digital

A Christmas messagemade just forevery child.

Personalized videos, letters and surprises from Santa Claus.

  • React 18.3
  • TypeScript 5.9
  • Webpack 5
  • Tailwind 3.4
  • WooCommerce REST
  • JWT

A Christmas store in React that runs inside WordPress, in two identities.

Online storeSanta Claus and faithWordPress + WooCommerce

  • React 18.3
  • TypeScript 5.9
  • Webpack 5
  • Tailwind 3.4
  • WooCommerce REST
  • JWT

The store in numbers

A whole catalog behind every door.

Every number on this page comes from the code: the catalog, the order forms, the two identities and the customer area.

Christmas arrives in

The same countdown that opens the store, live until the 25th.

  1. Products in the catalog

    Videos, messages, stories, letters, bundles and WhatsApp, each with its own WooCommerce ID.

  2. Product lines

    From Santa's invitation to the Bible stories, each line with its own showcase.

  3. Personalization fields

    21 order fields and 7 address fields; each product asks only for its own.

  4. Identities in one store

    Santa Claus and Christmas of faith, switched by a single toggle.

  5. Tabs in the customer area

    Overview, orders, videos, profile and settings.

  6. Spots in the visual editor

    Texts, images and spacing adjustable right on the page.

  • React 18.3
  • TypeScript 5.9
  • Webpack 5
  • Tailwind 3.4
  • WooCommerce REST
  • JWT
  • Embla Carousel 8.6
  • react-snowfall 2.3

Personalization

Every order comes with a form.

The video calls the child by name because the order carries the child's details. Each product has its own form, checked before it goes into the cart.

  1. One form per product

    There are 21 forms: the simple invitation asks for name and age; the premium one asks for four more fields, like the special trait.

  2. Six field types

    Text, number, long text, list, choice and address, each with its own limit.

  3. Checked before the cart

    Required, maximum length, minimum and maximum, and format: the message says what to fix.

    validateField()
  4. The postcode fills the address

    For letters by mail, the Brazilian postcode looks up the street, district, city and state.

    viacep.com.br
  5. The form travels with the item

    The item goes into the cart with its form, and the orders service writes each field into the WooCommerce order.

    _natal_nome · _natal_idade

Santa Video Premium Invitation

SKU 3-VPN-CONV-PRE · 7 business days

  1. Child's nameText · up to 50Ana
  2. AgeNumber · 1 to 126Age must be at most 12
  3. Brother or sisterText · optionalPedro
  4. How did they behave this year?ChoiceVery well behaved
  5. Video settingListNorth Pole
  6. A special traitText · up to 100Loves dinosaurs

Form checked · ready for the cart

An envelope of light under a starry sky, with the faith version of the store on a laptop beside it

02/Christmas of faith

Christmas is also a message of faith.

Personalized messages to celebrate the birth of Jesus with the family.

The store has two identities and a single toggle. The same screen swaps the logo, the colors, the top video, the color of the snow and the featured product, and the choice is kept in the browser.

  • Santa ClausThe top
    Christmas of faithThe top
  • Santa ClausHow it works
    Christmas of faithHow it works
  • Santa ClausThe catalog
    Christmas of faithThe catalog
  • Santa ClausWhat you get
    Christmas of faithWhat you get
  • 1 toggleOne choice switches the whole identity, without leaving the page.
  • 27 filesThe components that change their look with it.
  • Golden snowEven the snow falling on the page turns from white to gold.
  • RememberedThe choice stays in the browser and comes back on the next visit.

The delivery

The video arrives with rules.

After the order, the video lives in the customer area, with a deadline, a view limit and a watermark. The player checks every rule before it plays.

The store's sample videos screen
3 days of access left
  1. Access deadline

    Once the date passes, the player closes and shows the expired-access notice. With 3 days or less, the countdown changes color.

    expiresAt < now
  2. View limit

    Every time the video plays, the view is recorded; at the limit, it no longer opens.

    currentViews >= maxViews
  3. Plays only when active

    While it is being produced, the video is pending; when ready, it is active; once due, it expires.

    pending · active · expired
  4. Order watermark

    The order number stays over the video for the whole playback.

  5. No downloading

    No download button, fullscreen or floating window; right-click, Ctrl+S and dragging are blocked.

  6. For the family to watch

    The video link goes out by WhatsApp or by email.

The customer area

  • Overview
  • Orders
  • Videos
  • Profile
  • Settings

Levels by total spent

  1. BronzeUp to R$ 149
  2. SilverFrom R$ 150
  3. GoldFrom R$ 300
  4. DiamondFrom R$ 500

Inside

A whole store inside WordPress.

The app does not replace the website: it goes into a WordPress page, talks to WooCommerce and reaches the browser as a single bundle, with the version in the file name.

  1. WordPress and WooCommerce

    Products, orders, customers and coupons through the WooCommerce REST API; login goes through JWT. The store's own routes (videos, orders and personalization) have their client in the app.

    /wc/v3 · /jwt-auth/v1 · /natal/v1
  2. A page of the theme

    The app mounts in a div on the page, and its own CSS forces full width inside the Astra theme.

    #natal-root
  3. A single bundle

    Webpack builds a UMD bundle called NatalApp; React comes from the page itself, outside the bundle.

    library: NatalApp · externals: react
  4. The version in the file name

    The version.json file goes into the name: natal.bundle.v208.js and main.v208.css. New version, new file, and the browser never uses the old copy.

    version.json → v208
  5. The visual editor

    Shift+F turns on editing right on the page: 32 spots of text, image and spacing, with undo and redo, written into the code by a local server.

    Tunable · element-styles.ts

The technologies

What it is made of, piece by piece

A store that runs inside a WordPress site: the storefront is built in React and talks to WooCommerce for orders and the customer account. Pick a piece to see what it does here and which file it is in.

11technologies, in 3 layers

Screen

Server

Build

The screens

The store, screen by screen.

Both identities and the account sign-in, as the customer sees them.