Skip to content
UDF · Software Engineering · 2nd semester

Front-End Lab

The Front-End Web Development course has 4 units. This page brings together, working, what each one taught. My main portfolio is plain CSS; here I use Bootstrap 5, the framework from unit 3.

HTML5 CSS3 JavaScript Bootstrap 5 Git and GitHub Pages

Course map

The course's 4 units and where each one shows up in my portfolio.
UnitWhat it taughtWhere it shows up in the portfolio
1 · Web fundamentalsSemantic HTML5, forms, multimedia, canvas and SVGheader, main, article, animated SVG icons, project videos, canvas background
2 · CSS3Flexbox, Grid, pseudo-classes, transitions and animationsGrid layout, cards with a 3D effect, a timeline that draws as you scroll, light and dark themes
3 · JavaScriptDOM, events, localStorage, frameworks and BootstrapInteractive terminal, Ctrl+K, live data from GitHub and dev.to, this page
4 · Versioning and deployGit, GitHub, deploy, AI in front-end and accessibilityGitHub repository, GitHub Pages hosting, ARIA and visible focus

Unit 1 · HTML5

Multimedia and graphics, which HTML5 handles without plugins.

<video>

A recording of my portfolio scrolling. The controls attribute gives play, pause and full screen without any JavaScript.

<canvas>

Draw here with the mouse or a finger. JavaScript draws each stroke, point by point.

Unit 2 · CSS3 and the Bootstrap grid

The Bootstrap grid is built with Flexbox. Resize the window: the columns rearrange at each breakpoint.

col-12 col-sm-6 col-lg-3
col-12 col-sm-6 col-lg-3
col-12 col-sm-6 col-lg-3
col-12 col-sm-6 col-lg-3

Current width: – · breakpoint: –

transform: rotate

Hover or tap.

transition + :hover

Lifts and glows smoothly.

@keyframes

An animation that repeats on its own.

Unit 3 · JavaScript and Bootstrap components

It is the page turned into objects that JavaScript can read and change. The counter next to this changes the DOM on every click.

It keeps data in the browser even after the tab is closed. That is how the portfolio remembers your light theme, and why the counter next to this does not reset.

Bootstrap gives you ready-made styles and components. React and Vue organize the interface into components that update themselves when the data changes.

Events + DOM + localStorage

0

Unit 4 · Versioning, deploy and accessibility

commit
A snapshot of the project at one moment, with a message saying what changed.
branch
A parallel line of work, to try something without touching what already works.
pull request
A request to merge a branch into the main one, with room for review.
deploy
Putting the site online. This one runs on GitHub Pages: every git push publishes it again.
WCAG
The web accessibility guidelines, such as minimum contrast between text and background.
ARIA
Attributes that tell screen readers what each element does.

Inside the projects

A plain-language, step-by-step look at how the main parts work. I built everything with Claude Code; this is what I need to understand to explain, test and fix it.

  1. The HTML: a box where answers appear and a form with a text field.
  2. The event: pressing Enter makes the form fire a submit. JavaScript listens with addEventListener and calls preventDefault() so the page does not reload.
  3. The command list: an object where each name points to a function. help returns the list, about scrolls to the section, and so on.
  4. Running it: the typed text is lowercased and the code looks that name up in the object. If it exists, it runs the function; if not, it answers “Command not found”.
  5. Showing the answer: createElement creates a new paragraph, sets the text and append adds it to the box.
  6. Extras: ↑ and ↓ walk through the history (an array of what was typed), Tab completes the command name and the secrets you find are saved in localStorage.
const comandos = {
  help: () => "about · projects · contact · game",
  whoami: () => "Gabriel Victor · Software Engineering",
};

form.addEventListener("submit", (event) => {
  event.preventDefault();
  const name = field.value.trim().toLowerCase();
  const action = comandos[name];
  write(action ? action() : `Command not found: ${name}`);
  field.value = "";
});

Short version. Try it in the portfolio terminal: type help.

  1. The board: a 320 × 320 <canvas> split into 16 × 16 squares of 20 pixels.
  2. The snake is a list: [{x: 8, y: 8}, {x: 7, y: 8}, {x: 6, y: 8}]. The first position is the head.
  3. Moving: on every step, the new head is the current head plus the direction. It goes into the start of the list (unshift) and the last position comes out (pop). That is why the snake seems to move.
  4. Eating: if the head lands on the fruit, the code does not remove the last position, so the snake grows by one square. A new fruit is placed on an empty square.
  5. Losing: if the head leaves the board or hits the body, the game ends and the high score is saved in localStorage.
  6. Controls: arrow keys and WASD (keydown), on-screen buttons and swiping (pointer events) change direction. Turning back on itself is blocked.
  7. Smoothness: requestAnimationFrame draws about 60 times per second, and between steps the snake is drawn partway along its path.
  8. The bug I found: the fruit grew in with a size based on time. On phones the math sometimes went negative, the canvas threw an error and the game froze. The fix was to never let it go below zero: Math.max(0, ...).
const cabeca = { x: cobra[0].x + dir.x, y: cobra[0].y + dir.y };
cobra.unshift(cabeca);

if (cabeca.x === comida.x && cabeca.y === comida.y) {
  pontos++;
  sorteia();
} else {
  cobra.pop();
}

The heart of the game: move, eat and grow. To play, type game in the terminal.

  1. The problem: each contract took about 15 minutes to edit the template, check it and print it, and there are 10 to 15 a week.
  2. The pseudocode: I wrote the steps in plain language before any code. That is what you see next to this.
  3. The code: I directed Claude Code to turn the pseudocode into a Python script, using the templates the lawyers had already approved.
  4. The tests: I ran it on real cases and checked every field. Bugs showed up, like the wrong printer and a contract with missing data, so the script now checks the fields before generating anything.
  5. The review: every document is checked by a person before it is signed.
  6. The result: from 15 minutes down to about 1 minute per contract.
FOR each new contract:
  read the data from the client intake form
  IF a required field is missing:
    say what is missing and stop
  open the template approved by the lawyers
  replace each placeholder ({{NAME}}, {{ID}}...) with the data
  save it in the client's folder
  send it to the right printer

Only the workflow. The office's code and templates are not public because they involve client data. Try the demo with a fictitious client.

  1. I define the problem: what needs solving and for whom.
  2. I write the pseudocode and the rules: that is where the logic lives.
  3. AI writes the code: Claude Code turns it into HTML, CSS, JavaScript or Python.
  4. I test as a user: on desktop and on mobile, trying to break it.
  5. I find the bugs and review: I describe what is wrong, check the fix and decide whether it goes in.
1. I define the problem and write the pseudocode
2. Claude Code writes the code
3. I test as a user, on desktop and on mobile
4. I find the bugs and describe what is wrong
5. I review the fix and decide whether it goes in

I do not hide that I use AI. What I practice is deciding what to build, testing it and being able to explain the result.

Contract engine demo

The same path as the engine I use at the office, running here in the browser: read the intake form, check the fields, open the template, replace each placeholder with the data and deliver the contract. The template and the client are fictitious. At the office the engine is written in Python and produces a Word file.

client intake form

  1. read the form
  2. check the fields
  3. open the template
  4. replace the placeholders
  5. contract ready
bootstrap.Toast
This notice is a Bootstrap component triggered by JavaScript.