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.
Course map
| Unit | What it taught | Where it shows up in the portfolio |
|---|---|---|
| 1 · Web fundamentals | Semantic HTML5, forms, multimedia, canvas and SVG | header, main, article, animated SVG icons, project videos, canvas background |
| 2 · CSS3 | Flexbox, Grid, pseudo-classes, transitions and animations | Grid layout, cards with a 3D effect, a timeline that draws as you scroll, light and dark themes |
| 3 · JavaScript | DOM, events, localStorage, frameworks and Bootstrap | Interactive terminal, Ctrl+K, live data from GitHub and dev.to, this page |
| 4 · Versioning and deploy | Git, GitHub, deploy, AI in front-end and accessibility | GitHub 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.
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
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 pushpublishes 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.
- The HTML: a box where answers appear and a form with a text field.
- The event: pressing Enter makes the form fire a
submit. JavaScript listens withaddEventListenerand callspreventDefault()so the page does not reload. - The command list: an object where each name points to a function.
helpreturns the list,aboutscrolls to the section, and so on. - 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”.
- Showing the answer:
createElementcreates a new paragraph, sets the text andappendadds it to the box. - 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.
- The board: a 320 × 320
<canvas>split into 16 × 16 squares of 20 pixels. - The snake is a list:
[{x: 8, y: 8}, {x: 7, y: 8}, {x: 6, y: 8}]. The first position is the head. - 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. - 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.
- Losing: if the head leaves the board or hits the body, the game ends and the high score is saved in
localStorage. - Controls: arrow keys and WASD (
keydown), on-screen buttons and swiping (pointer events) change direction. Turning back on itself is blocked. - Smoothness:
requestAnimationFramedraws about 60 times per second, and between steps the snake is drawn partway along its path. - 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.
- 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.
- The pseudocode: I wrote the steps in plain language before any code. That is what you see next to this.
- The code: I directed Claude Code to turn the pseudocode into a Python script, using the templates the lawyers had already approved.
- 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.
- The review: every document is checked by a person before it is signed.
- 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.
- I define the problem: what needs solving and for whom.
- I write the pseudocode and the rules: that is where the logic lives.
- AI writes the code: Claude Code turns it into HTML, CSS, JavaScript or Python.
- I test as a user: on desktop and on mobile, trying to break it.
- 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.
- read the form
- check the fields
- open the template
- replace the placeholders
- contract ready
SERVICE AGREEMENT
Fictitious demo template. This is not the office's contract and has no legal value.
CLIENT: {{NOME}}, {{NACIONALIDADE}}, {{ESTADO_CIVIL}}, {{PROFISSAO}}, taxpayer ID (CPF) {{CPF}}, residing at {{ENDERECO}}, ZIP {{CEP}}.
PURPOSE: following up on the application for {{BENEFICIO}} with Brazil's social security agency (INSS), from gathering documents to the final decision.
DUTIES: the client agrees to deliver the requested documents and to report any change of address.
Brasília, Brazil, {{DATA_EXTENSO}}.
{{NOME}}