Frontend tales · by Dhawal Mhatre

Domlok

Frontend, explained through the world of Domlok

Every character is a frontend concept and every villain is a bug you have already met. Anime energy, Indian and Japanese myth, and lessons from a frontend architect who has shipped since 2008.

A layered realm where every page is a kingdom. Kingdoms are built, styled and brought to life, and they are always under threat from bugs, bloat and broken experiences.

Step 1 · Earth

Build

Vishwa lays semantic stone first: header, main, section, footer. Screen readers, search engines and every developer after you read these walls.

Step 2 · Fire

Style

Kitsu breathes foxfire into the stone: colour, type, spacing, layout. The structure stays the same and the kingdom gets a face.

Step 3 · Lightning

Bring it to life

Raiden wires it with events. Buttons answer, cards react, the nav responds, and the kingdom wakes up.

Then the guardians take over. Sanjaya keeps it readable for everyone, Vayu keeps it light and fast, and Chitragupta keeps a record of every change to its state.

The cast · eight heroes, eight elements

Guardians of Domlok

Each guardian owns one part of the frontend and carries one of the elements. Learn the character and you remember the concept.

Acharya Kōdo, an elder architect with a silver topknot, long beard, round glasses, indigo robe and a staff with a gold orb, full body. Element: All five

The Architect · Mentor

Acharya Kōdo

All five · Pancha MahabhutaYour voice in every episode
“Frameworks rise and fall.
Principles stay.”

A veteran who has guarded Domlok since the Age of jQuery and survived the IE6 wars. Calm, dry-humoured, and he speaks in principles, not hype. Five motes of the elements orbit his staff.

Kai, a young adult apprentice with messy black hair, a yellow headband and an orange hoodie, full body. Element: Unknown

The Apprentice

Kai

Unknown, for nowThe reader’s stand-in
“Why can’t I just use !important?”

Eager, impatient and sometimes reckless. Kai asks the questions you are thinking and makes the classic mistakes on screen so you don’t have to.

Vishwa, a broad-shouldered builder with a head wrap, trimmed beard, terracotta tunic and a leather strap, full body. Element: Earth

HTML · Semantics

Vishwa

Earth · PrithviVishwakarma, the divine architect
“A button is a <button>.
Not a <div>.”

A stoic builder who hates div soup. He stands on cracked stone and builds kingdoms that last, one meaningful element at a time.

Kitsu, a sly fox spirit with fox ears, a sleek orange bob, winged eyeliner, a fox mask and a blue kimono, full body. Element: Fire

CSS · Layout

Kitsu

Fire · AgniKitsune, the shape-shifting fox spirit
“Same markup.
Watch me change its face.”

A playful illusionist and master of appearances. Her foxfire burns blue at the core, and flexbox and grid bend to her will.

Raiden, a sharp-eyed thunder spirit with swept-up yellow hair, a dark high-collared jacket and a lightning bolt emblem, full body. Element: Lightning

JavaScript · Events

Raiden

Lightning · VidyutRaijin, the thunder god
“Click. Fire. Handle.
Faster than you can blink.”

Fast, powerful and a little chaotic. Raiden lives on events, and when he strikes, the page comes alive.

Sanjaya, a calm narrator with long dark hair, closed eyes, a glowing forehead mark, sound waves and a teal robe with a white shawl, full body. Element: Ether

Accessibility

Sanjaya

Ether · AkashaSanjaya, who narrated the war to the blind king
“If it can’t be heard,
it isn’t finished.”

The original screen reader. Eyes closed, he describes the world for those who can’t see it. Sound travels through akasha.

Vayu, a light wind spirit with long white hair swept back, a leaf ornament and a green garment with a white sash, full body. Element: Air

Performance

Vayu

Air · VayuVayu, the wind god
“Every kilobyte is weight
your users carry.”

Light as the wind and obsessed with speed. Vayu judges every request, every image and every dependency you add.

Chitragupta, a meticulous scribe with spectacles, greying temples, a quill behind his ear, a purple robe and a scroll, full body. Element: Water

State management

Chitragupta

Water · JalThe divine keeper of everyone’s records
“Nothing changes
without a record.”

A meticulous scribe with one source of truth for every action. A stream of water flows from his ledger, and every change is written down.

The villains · recurring bugs

Try cutting the Hydra

The Callback Hydra grows two heads for every one you cut. Nest another callback and watch the code drift right. Then tame it the way Acharya teaches in Episode 01, and earn seal 01 of 24.

Heads 4 Nesting depth 4

Kai: “Easy. I’ll just nest another callback!”


        

Kappa of Leaks

The yokai who spills water when it bows. It leaks memory through listeners and timers nobody removed.

Beaten by cleanup: remove listeners, clear timers.

Play Episode 07: Drain the Pond

Ouroboros

The serpent eating its own tail. A render that sets state, which triggers a render, which sets state.

Beaten by stable dependencies and derived state.

Play Episode 22: Break the Ouroboros

Shifting Oni

Makes the ground jump under your users’ feet just as they tap. Also known as layout shift.

Beaten by reserving space: width, height, aspect-ratio.

Asura of Bloat

Grows bigger with every dependency added for one small function. Your users download all of it.

Beaten by audits, tree-shaking and code-splitting.

Play Episode 20: Shrink the Asura

Latest episodes · 24 so far

Lessons from the realm

Each episode is one bug, one fight and one rule you keep. Every episode has a game: win it to earn the guide’s seal.

All 24 episodes
Sanjaya, the guide of Episode 24
Episode 24 · Accessibility

The Silent Toast

Why Kai’s Saved toast is silent for screen reader users, and how Sanjaya makes it speak with a role="status" live region that is there from page load.

Vishwa, the guide of Episode 23
Episode 23 · Frontend

The Nameless Field

Why won’t Kai’s sign-up form autofill? Vishwa gives every field a label, a name, the right type and an autocomplete token.

Chitragupta, the guide of Episode 22
Episode 22 · JavaScript

The Ouroboros Render

Why Kai’s search page fetches forever after one visit, and how Chitragupta breaks the useEffect infinite loop with steady dependencies.

0 of 24 seals. Win every episode’s game to become a Guardian of Domlok.

Acharya’s Rule

Learn the principle. The framework is a detail.

Acharya Kōdo has guarded Domlok since the Age of jQuery. He has watched frameworks rise and fall, and every episode ends with one rule that outlives them all.