🐢 Super-slow beginner track
Below I will walk you from zero to a tiny calisthenics tracker that runs in your browser.
I explain every new word the first time I use it.
────────────────────────
0. What you need (no installs yet)
────────────────────────
- A computer (Windows, Mac, or Linux).
- A browser (Chrome, Firefox, Edge, Safari – you already have one).
- A text editor – we’ll use the simplest one that exists on every computer:
– Windows: Notepad
– Mac: TextEdit (open it, then go to menu Format → Make Plain Text)
That’s all. We are not installing “Node.js” or anything else today.
New word: browser – the program you use to open websites (Chrome, Firefox, etc.).
────────────────────────
- Make a folder on your desktop
────────────────────────
- Right-click on your desktop → New → Folder.
- Name it exactly:
calisthenics-tracker (no spaces, lowercase is fine).
────────────────────────
2. Create the first file
────────────────────────
- Open Notepad (or TextEdit).
- Copy the very small text below and paste it in.
- Save the file inside the folder you just made.
– File name must be: index.html (the ending .html is important).
– In Notepad: when the Save dialog opens, change “Save as type” from “Text Documents (.txt)” to “All Files (.*)” so Windows does not add .txt at the end.
<!DOCTYPE html>
<html>
<head>
<title>My Workout Tracker</title>
</head>
<body>
<h1>Hello, I am your tracker!</h1>
</body>
</html>
Close the editor.
────────────────────────
3. Open the file in your browser
────────────────────────
- Double-click the file
index.html inside the folder.
- Your browser opens and shows the big text “Hello, I am your tracker!”.
Congratulations – you just made a web page.
New word: HTML – the simple language that tells the browser what to show (headings, buttons, lists, etc.).
────────────────────────
4. Add a place to pick the date
────────────────────────
- Right-click
index.html → Open with → Notepad (or TextEdit).
- Replace everything between
<body> and </body> with this:
<h1>Calisthenics Tracker</h1>
<label>Date:
<input type="date" id="date">
</label>
Save the file (Ctrl+S or Cmd+S).
Refresh the browser (F5 or the circular arrow near the address bar).
You now see a heading and a date picker – click it and choose any day.
New word: input – an HTML tag that makes interactive boxes (text, numbers, dates, etc.).
────────────────────────
5. Add boxes for exercise name, sets, reps
────────────────────────
Still inside <body> after the date label, add:
<h3>Add Exercise</h3>
<input id="name" placeholder="Exercise name">
<input id="sets" placeholder="Sets" type="number" min="1">
<input id="reps" placeholder="Reps (e.g. 8,7,6)">
<button id="add-btn">Add</button>
<ul id="current-list"></ul>
<button id="save-btn">Save Workout</button>
Save and refresh. You now see more boxes and two buttons.
Nothing works yet – we need JavaScript.
New word: JavaScript – a language that runs inside the browser and makes pages interactive.
────────────────────────
6. Create the JavaScript file
────────────────────────
- Open a new Notepad window.
- Paste the tiny script below:
// 1. Grab the boxes we just made
const dateInput = document.getElementById('date');
const nameInput = document.getElementById('name');
const setsInput = document.getElementById('sets');
const repsInput = document.getElementById('reps');
const addBtn = document.getElementById('add-btn');
const saveBtn = document.getElementById('save-btn');
const currentList = document.getElementById('current-list');
// 2. Today’s date as default
dateInput.valueAsDate = new Date();
// 3. A list to remember what we add
let exercises = [];
// 4. When “Add” is clicked
addBtn.onclick = () => {
const name = nameInput.value.trim();
const sets = parseInt(setsInput.value, 10);
const reps = repsInput.value.trim();
if (!name || isNaN(sets) || !reps) {
alert('Please fill all fields');
return;
}
exercises.push({ name, sets, reps });
// Show the exercise in the list
const li = document.createElement('li');
li.textContent = `${name} – ${sets} sets, ${reps} reps`;
currentList.appendChild(li);
// Clear the boxes
nameInput.value = setsInput.value = repsInput.value = '';
nameInput.focus();
};
// 5. When “Save Workout” is clicked
saveBtn.onclick = () => {
if (!dateInput.value || exercises.length === 0) {
alert('Pick a date and add at least one exercise');
return;
}
// Read any old workouts from browser memory
const old = JSON.parse(localStorage.getItem('workouts') || '[]');
// Add the new one
old.unshift({ date: dateInput.value, exercises });
// Save back to browser memory
localStorage.setItem('workouts', JSON.stringify(old));
// Clear the screen
exercises = [];
currentList.innerHTML = '';
alert('Workout saved!');
};
- Save this file inside the same folder with the name
script.js.
New word: localStorage – a tiny built-in database inside every browser. It keeps data even after you close the tab.
────────────────────────
7. Link the script to the page
────────────────────────
Open index.html again and add one line just before </body>:
<script src="script.js"></script>
</body>
Save and refresh the browser.
────────────────────────
8. Test it
────────────────────────
- Pick a date.
- Type
Push-ups, sets 3, reps 10,9,8.
- Click Add – the line appears under the button.
- Add another exercise if you like.
- Click Save Workout – you get an alert “Workout saved!”.
- Refresh the page – the list is empty again, but your data is safe.
- To see saved data we’ll add a history section next.
────────────────────────
9. Show history (optional but fun)
────────────────────────
Still inside <body> after the save button, add:
<h2>History</h2>
<ul id="history-list"></ul>
At the bottom of script.js (after everything else) paste:
// 6. Display saved workouts
function showHistory() {
const workouts = JSON.parse(localStorage.getItem('workouts') || '[]');
const list = document.getElementById('history-list');
list.innerHTML = '';
workouts.forEach(w => {
const li = document.createElement('li');
li.innerHTML = `<strong>${w.date}</strong>`;
const ul = document.createElement('ul');
w.exercises.forEach(ex => {
const sub = document.createElement('li');
sub.textContent = `${ex.name} – ${ex.sets} sets, ${ex.reps} reps`;
ul.appendChild(sub);
});
li.appendChild(ul);
list.appendChild(li);
});
}
// Run it once when the page loads
showHistory();
// Also run it after every save
saveBtn.addEventListener('click', () => {
// ...existing save code...
showHistory();
});
Save and refresh. You now see every workout you ever saved, grouped by date.
────────────────────────
10. What you learned (in plain English)
────────────────────────
- HTML = skeleton (boxes, buttons, lists).
- CSS = paint & layout (we skipped fancy CSS to stay simple).
- JavaScript = brain (react when you click, remember data).
- localStorage = tiny notebook inside the browser that remembers things for you.
You did not need “Node.js” – that is a separate program for running JavaScript outside the browser (on servers). We stayed 100 % inside the browser.
────────────────────────
11. Next tiny steps (when you feel ready)
────────────────────────
- Make the page prettier with colors (CSS).
- Add a “Delete” button next to each saved workout.
- Replace the plain text boxes with a dropdown of common calisthenics moves.
Enjoy your first web app!