What is a backend?

Play this lesson

The vanishing saves

When Kai and Remy first built Garden Defense, saves lived in local storage: a small store of data inside one browser on one device. Clear the browser or get a new phone, and the garden is gone.

To fix that, our games need a partner on the internet called a backend: the part of a game that runs on servers instead of on the player's device.

Client and server

The client is the game running on your device: your phone, tablet or laptop. It draws the ship, plays the sounds and reads your buttons.

The server is a computer in a data centre, a building packed with thousands of servers, cooling fans and backup power. It's always on and always online.

They talk by sending messages. The client sends a request ("save my garden, please") and the server sends back a response ("saved").

Quick check

You play Hyper Shards on your laptop. Which part is the client?

  1. The game running on your laptop
  2. A computer in a data centre
  3. The internet cable
Show the answer

The game running on your laptop

The client is the game on the player's own device. The server is the always-on computer far away that it talks to.

What lives on the backend?

Bolt says: A simple rule: if many players or many devices need it, it belongs on the backend.

Backend or device?

#studio-chat, Remy
Moving Garden Defense to the cloud! My plan: put the pest pop animation, the music, every player's save and the button sounds on the server.

Only one item on Remy's list really belongs on the backend. Which one?

  1. The pest pop animation
  2. The music
  3. Every player's save
  4. The button sounds
Show the answer

Every player's save

Animations and sounds must play instantly, so they stay on the device. Saves must survive a new phone and work on every device, so they live on the server.

Running servers is a huge job

Running your own servers is serious work. They must stay on day and night, because somewhere in the world a player is always logging in. They need security updates as soon as a weakness is found, and backups in case a disk breaks.

And they must scale: cope with 1 player on a quiet Tuesday or 100,000 players on launch day. Big studios have whole teams, often called DevOps or live ops engineers, just for this.

Backend-as-a-Service: Firebase

Backend-as-a-Service means another company runs the servers, and we use just the parts we need. Our pick is Firebase, made by Google. Its free plan, Spark, has a daily allowance that's plenty for a small studio. A pay-as-you-go plan, Blaze, is there when we grow.

When we create the database we pick a location, like a region in Europe or the US, close to most players. It can't be changed later, so we choose with care.

Quick check

With Firebase, our studio has to buy and look after its own server computers.

Show the answer

False

That's the whole point of Backend-as-a-Service. Firebase runs the servers, keeps them updated and scales them up when lots of players arrive.

Setting up as a team

A Firebase project lives inside a Google account, and creating it means agreeing to Google's terms of service. Terms of service are a contract: promises with legal weight on both sides.

The law requires an adult to sign contracts, and Google accounts for children under 13 (older in some countries) are managed by a parent. So you and a parent create the project together. The parent owns the account, and the two of you build in it side by side.

Next: how the messages work

Client asks, server answers. Every save, score and login in this stage is a request and a response.

Next we open one of those messages and look inside: URLs, status codes and JSON. Then we plan our data, and then come logins, so the server knows who is asking.

Bolt says: Client, server, backend. Three words, and you can already explain how online games keep your progress.

Fact-checked 9 October 2026