Course · Build apps with AI

Session 0
How an app works inside

Before you build, get to know the pieces. We will use a restaurant as a guide and prepare the tools for session 1.

Format
Online self-study
Estimated time
30 minutes, at your own pace
Essential
Identify dining room, kitchen and pantry
By the end
Tools ready and a way to check AI output

Prefer to watch it first? The talk “AI applied to business” explains this same restaurant, animated, in about fifteen minutes. Watch the talk ↗ and come back here to go over it calmly.

You do not need to memorise names. Keep three questions in mind: what you see on screen, where decisions are made and where data is stored. That is enough to follow the first practical session.

01

What happens when an app connects?

You open a website, fill in a form and press “Save”. In a connected app, the browser sends a request to another program. It processes the request and sends back a response, such as “Record saved”.

The client

The program that makes the request. In this course, it will be the browser on your computer or phone.

The server

The program that handles the request, running on a computer. It can check data, save it and return a result.

A URL is the address of a resource or service: it tells the browser where to find it. In session 1, your app will have its own URL.

At the restaurantYou order a dish in the dining room, the order reaches the kitchen and the result comes back. The request is your order; the response is what you receive. The network lets these parts communicate.

The cloud means services running on computers accessible over a network, such as Google's. It does not mean the data is public: access depends on permissions. Some apps also run entirely on your device without contacting a remote server.

02

The dining room and kitchen: frontend and backend

In the web app we will build, we will separate the part you use from the part that handles requests.

Frontend · the dining room

The browser interface: fields, buttons, messages and results. It also contains code that responds to clicks and prepares requests.

Backend · the kitchen

The server code: it checks requests, applies rules and accesses data. In this course, we will use Google Apps Script for it.

An important decisionThe dining room can warn you that a field is missing. But the kitchen must check too: it cannot trust everything it receives. In an app, browser validation helps; server validation is necessary.

So “I cannot see it” does not automatically mean “it is backend”. The browser does work too. The difference is where the code runs and what it is responsible for.

03

The pantry and storeroom: data and files

To retrieve data tomorrow, it needs to be saved somewhere. In our exercises, we will distinguish table data from files such as photos or documents.

Database · the pantry

Information organised for retrieval: dates, names, quantities or statuses. A Google spreadsheet will serve as a simple table to get started.

Storage · the storeroom

File storage: photos, PDFs or videos. We could use Google Drive for this in a later extension.

A common approach is to save a photo in file storage and its reference or link in the database. It is a useful pattern, not a rule for every app. There are other ways to organise this.

A reference is not permissionHaving a file's address does not always let you open it. A private photo needs permission to be viewed. We will not make a folder public just to get an image to load.

04

The pieces of your first app

In session 1, you will build a small log, such as a sleep diary with fictional data. It will have these parts:

PartIn the exercise
Dining room · frontendIndex.html: the form and results you see in the browser.
Kitchen · backendCodi.gs: Apps Script checks data and saves or retrieves it.
Pantry · dataA tab in your Google spreadsheet named Registres.

The browser will communicate with Apps Script, which will open the spreadsheet using its ID. This lets the code find the right document when you open the app through its link too.

AI will help you write this code. The resulting app does not need to consult AI every time you save a row. AI helps build it; the deployed code runs the tool.

05

What AI does and what you need to check

A language model generates responses from patterns learned during training and the context you provide. It builds text from small units called tokens. It does not necessarily consult a source to verify every statement.

It can get many tasks right remarkably well. But a confident-sounding answer can still contain errors: a function that does not exist, an unnecessary permission or instructions for an older tool version. This is often called a hallucination.

What you can ask it to do

Turn a need into a proposal, explain code, suggest tests or help you understand an error.

What you need to decide

Whether the proposal solves the problem, the permissions make sense and tests confirm the result.

Salt and sugarImagine a very fast kitchen assistant who might confuse salt and sugar. A dish looking good does not guarantee its taste. Code is similar: understand what it does and test it before accepting it.

What you write to AI is the prompt. Explain your goal, the data you are working with and how you will check the result. If it goes wrong, provide the error and context and try again. The loop is: ask → understand → test → fix.

From day one: practise with fictional data. Do not paste passwords, credentials or confidential information into the chat, browser code or shared materials. Use tools and accounts authorised by your organisation.

Before session 1

Prepare your tools (about 10 minutes)

A computer with a keyboard makes editing and copying files easier. Your phone will be useful for testing the app. You do not need to install any tools for this first exercise.

  1. Sign in to a Google account you are allowed to use for the exercise. For a work or school account, check whether it allows Sheets and Apps Script. If access is blocked, ask the administrator; do not bypass the restriction with another account.
  2. Open Google Drive and create an AI course folder. Use fictional data only, even with a personal account.
  3. Create a blank spreadsheet and name it something like Sleep diary · practice. Rename the first tab at the bottom to Registres. You can use it in session 1.
  4. In the spreadsheet, open Extensions → Apps Script. Check that the editor opens. You do not need to run or authorise any code yet.
  5. Open an AI assistant you are authorised to use. The course includes a shortcut to Gemini, but you can copy the prompts to another tool. Availability and limits depend on your account.

You are ready to continue when the spreadsheet, editor and chat are available. If you need access, consult the help page or your account administrator. Do not share passwords.

For reference

Mini glossary

Frontend
the interface and code running in the browser; the dining room.
Backend
the part that handles requests on the server; the kitchen.
Database
information organised for storage and retrieval; the pantry.
Storage
file storage; the storeroom.
Client / server
the program making a request and the program handling it.
URL
the address of a resource or service.
Apps Script
Google's service where our kitchen code will run.
Prompt
instructions and context you give AI.
Hallucination
an apparently plausible answer that is incorrect or invented.
Check it

Before you continue

Answer in your own words, then compare. There is no grade.

  1. Where do the frontend and backend of our app run?
  2. If you save a photo in Drive and its link in the spreadsheet, does the link make it public?
  3. If AI gives you code that looks right, how do you check that it works?
  4. Does the AI that writes the code need to be connected to the app to save each row?
See the answers ▾

1. The frontend runs in the browser; in this exercise, the backend runs on Apps Script servers.

2. No. Access to the file depends on its permissions.

3. Understand what it should do and test it with fictional data: a valid case, an invalid case and whether the result persists. Consult documentation or get help if something does not fit.

4. No. AI helps build it; the deployed code runs this log.

Ready? If you can identify dining room, kitchen and pantry, know why code needs testing and have your tools ready, mark the session as complete. Progress is saved in this browser.