Build a Car Dashboard on an iPad
Use Claude Code to build and publish a GPS-aware car dashboard for a tablet.
Introduction
30 Second Summary
Spare tablets often sit in a drawer while driving information stays split between the car dashboard and a phone. A single mounted display can make the essentials easier for a passenger to follow.
In this project, you will use Claude Code to create a car dashboard from plain-English requests. You will publish it through Netlify Drop so its location features run over HTTPS.
What You'll Build
Your published dashboard turns a spare tablet into a landscape display where Demo drive sends the speed to exactly 80 km/h while the map tracks the route beside a turning 3D car.
By the end of this project, you'll have:
- A speed display with selectable km/h or mph units plus a repeatable Demo drive from 0 to 80 km/h back to 0.
- A moving route view where an OpenFreeMap map follows live or simulated position while a heading-aware 3D car turns with the route.
- A Home Screen web app that launches from your mounted tablet in landscape with Screen Wake Lock status visible.
- Secret Mission: Use Chrome to discover a Bluetooth Low Energy OBD2 adapter and list its accessible services without sending vehicle commands.
Are there any prerequisites?
You need Claude Pro, Max, Ultra, Team, Enterprise, or Console access. Keep a computer running macOS 13 or newer or Windows 10 1809 or newer ready with internet access.
You also need a spare tablet or phone plus a dashboard or vent mount. No coding experience is needed.
Before We Start
Before any hands-on work begins, lock in the full build: a car dashboard with GPS speed, a moving map, a 3D car, Home Screen web app access, plus optional read-only Bluetooth Low Energy discovery. Your safety commitment is to mount the device clear of the road view, complete every setup action while parked, and leave every moving check to a passenger.
Build and Publish the Speed Screen
A GPS dashboard needs a secure HTTPS page before location testing can be reliable.
You will use Claude Code to create the speed screen without typing application code. You will publish it through Netlify so the first desk test runs from a persistent web address.
In this step, get ready to:
- Prepare an authenticated Claude Code session inside the approved car-dash folder.
- Generate a dark speed screen with unit controls and a repeatable Demo drive.
- Prove the HTTPS dashboard works when Demo drive reaches exactly 80 km/h before returning to 0.
Install and Authenticate Claude Code
Claude Code is an interactive coding tool that runs inside Terminal on macOS or PowerShell on Windows. It creates and edits project files from plain-English requests.
Why Use the Native Installer?
The native installer gives Claude Code direct access to your local project folder. This project uses that supported path on both operating systems without adding WSL.
Start by checking whether Claude Code is already available. The result determines whether you can continue or need the native installer.
- Press Cmd+Space on macOS or the Windows key on Windows to open system search.
- Type Terminal on macOS or PowerShell on Windows.
- Press Enter to start the selected command-line app.
- Check whether Claude Code is installed by running this command:
claude --version
What Does This Command Do?
The claude --version command asks Claude Code to print its installed version. A version number confirms that your shell can find the tool.
✔️ I see a version number
Claude Code is already installed. Keep this Terminal or PowerShell window open for the project folder setup.
ⓧ Claude Code is not installed yet
Install Claude Code with Anthropic's native installer for your operating system. The installer may take a little while to download the required files.
macOS
- Install Claude Code by running this command:
curl -fsSL https://claude.ai/install.sh | bash
What Does This Command Do?
This command downloads Anthropic's native macOS installer over HTTPS. It passes the installer to your shell so Claude Code can be added to your computer.
- Close the current Terminal window.
- Start a fresh Terminal window.
- Press Cmd+Space to open Spotlight.
- Type Terminal into the search field.
- Press Enter to start a new Terminal session.
- Verify the installation by running this command:
claude --version
What Does This Command Do?
This command checks the fresh Terminal session for Claude Code. You should see a Claude Code version number.
Windows
- Install Claude Code by running this command:
irm https://claude.ai/install.ps1 | iex
What Does This Command Do?
This command downloads Anthropic's native Windows installer through PowerShell. It runs the installer so Claude Code can be added to your computer.
- Close the current PowerShell window.
- Start a fresh PowerShell window.
- Press the Windows key to open system search.
- Type PowerShell into the search field.
- Press Enter to start a new PowerShell session.
- Verify the installation by running this command:
claude --version
What Does This Command Do?
This command checks the fresh PowerShell session for Claude Code. You should see a Claude Code version number.
Claude Code Still Unavailable?
- Confirm that the installer finished before closing the original Terminal or PowerShell window.
- Start a completely new Terminal or PowerShell session so it can detect the installed command.
- Check your internet connection if the installer could not download its files.
- Help me troubleshoot my Claude Code installation.
Claude Code needs a named folder before it can create your dashboard. Starting it inside car-dash keeps every generated file together on your Desktop.
The final command starts an interactive Claude Code session. It may open a browser login before returning you to the command-line prompt.
macOS
- Move to your Desktop by running this command:
cd ~/Desktop
What Does This Command Do?
The cd command changes Terminal's current location. The ~/Desktop path points to the Desktop for your signed-in macOS account.
- Create the project folder and start Claude Code by running these commands:
mkdir car-dash
cd car-dash
claude
What Does This Command Do?
- The mkdir car-dash command creates the project folder on your Desktop.
- The cd car-dash command moves the Terminal session into that folder.
- The claude command starts the interactive Claude Code session.
Windows
- Move to your Desktop by running this command:
Set-Location "$env:USERPROFILE\Desktop"
What Does This Command Do?
The Set-Location command changes PowerShell's current location. The path uses your Windows user profile to find its Desktop folder.
- Create the project folder and start Claude Code by running these commands:
mkdir car-dash
cd car-dash
claude
What Does This Command Do?
- The mkdir car-dash command creates the project folder on your Desktop.
- The cd car-dash command moves the PowerShell session into that folder.
- The claude command starts the interactive Claude Code session.
- Complete the account login shown by Claude Code.
- Return to the Terminal or PowerShell session after authentication.
- Approve the local car-dash folder when Claude Code requests access.
You should see the Claude Code prompt waiting for a request inside car-dash. Your authenticated coding session is ready.
Build the Speed Screen With Claude Code
The browser's Geolocation API can supply position updates with a speed measured in metres per second. A device can also return a null speed when it cannot measure movement.
The request below covers both cases. It also asks for a simulated drive so you can test the dashboard safely at a desk.
- Create the speed dashboard by pasting this exact request into the waiting Claude Code prompt:
Build a car dashboard web app in this folder. I am a total beginner and will not type code, so create and edit every file for me. Use index.html for a tablet in landscape with a dark background, a huge speed number with km/h beneath it, a button that switches between km/h and mph, and a Demo drive button. Read live updates with navigator.geolocation.watchPosition using enableHighAccuracy. Treat coords.speed as metres per second, convert it for the selected unit, and show -- when speed is null. Demo drive must run at a desk, climb smoothly from 0 to exactly 80 km/h, then return to 0. Make the layout touch-friendly. Tell me which files you created and what I should see after publishing.
What Does This Request Do?
- It tells Claude Code to create index.html inside the current car-dash folder.
- It defines the large speed display plus the exact km/h and mph behavior.
- It configures high-accuracy location updates while preserving -- when the browser cannot measure speed.
- It adds a repeatable Demo drive with an exact 80 km/h peak.
Claude Code may pause while it plans and writes the page. Changing progress messages in the terminal show that the request is still running.
- Approve the creation of index.html if Claude Code asks for file access.
You should see Claude Code report that it created index.html with a large speed display, a unit switch, and a Demo drive button.
✔️ Awesome, I've got everything!
Great. Keep the complete car-dash folder ready for publication.
ⓧ I'd like to double check the full code
Claude Code can choose different formatting, but the complete index.html file must satisfy every checkpoint below.
- Confirm that the page has a dark, touch-friendly landscape layout with a large speed display.
- Confirm that the page contains speedEl, unitEl, unitButton, demoButton, and statusEl elements.
- Confirm that the page tracks unit, metresPerSecond, and demoRunning state.
- Confirm that navigator.geolocation.watchPosition uses enableHighAccuracy.
- Confirm that measured speed converts from metres per second to km/h or mph.
- Confirm that a null measured speed displays --.
- Confirm that Demo drive climbs from 0 to exactly 80 km/h before returning to 0.
Claude Did Not Create the Speed Screen?
- Confirm that the Claude Code prompt is running from inside the car-dash folder.
- Paste the complete request again if part of it was missed.
- Approve file access if Claude Code is waiting for permission to create index.html.
- Help me understand why Claude Code did not create index.html.
Publish and Test Over HTTPS
A double-clicked HTML file does not provide the secure web context required for dependable location testing. Netlify Drop gives the folder a persistent HTTPS address without adding a build system.
- Open Netlify Drop in your browser.
- Create a free Netlify account.
- Use the account creation option shown on the Netlify Drop page.
- Complete the account prompts in the browser.
- Confirm that Netlify shows you as signed in.
- Return to the Netlify Drop page after account creation.
- Check for your account details in the page header.
- Publish the dashboard by dragging the complete car-dash folder into the Drop zone.
- Use your computer's file browser to go to the Desktop.
- Locate the car-dash folder.
- Drag the folder onto the Drop zone in your browser.
The deployment may sit quietly while Netlify uploads the folder. You should then see a Preview URL ending in netlify.app.
- Record the published address here: your netlify.app address.
- Load your netlify.app address in your browser.
You should see the dark speed screen with its large number and two touch-friendly controls. A stationary computer may show -- because its browser cannot measure speed.
- Change the displayed speed unit to mph.
- Click Switch to mph beneath the speed display.
You should see the unit label change to mph. The button should now offer a switch back to km/h.
- Restore the displayed speed unit to km/h.
- Click Switch to km/h beneath the speed display.
You should see the unit label return to km/h.
Before you start Demo drive, what speed do you expect to see at the top of its simulated journey?
- Run the simulated journey on the published dashboard.
- Click Demo drive in the controls beneath the speed display.
You should see the speed climb smoothly from 0 to exactly 80 km/h. It should then fall back to 0.
That is the first working slice of your dashboard. The same repeatable animation now gives every later visual feature a safe desk test.
Demo Drive Misses 80 km/h?
- Confirm that the unit label shows km/h before starting the test.
- Return to the active Claude Code session.
- Describe the highest displayed value you observed and ask Claude Code to make the Demo drive peak at exactly 80 km/h.
- Help me correct the Demo drive peak.
Your speed screen is live at its own HTTPS address. Next, you will add a moving map that follows the simulated route.
Add the Moving Map
Your speed screen is already live on Netlify, where Demo drive provides a repeatable desk check. The next layer connects that speed to a visible position.
A moving map gives the speed-only screen the location context it currently lacks.
In this step, get ready to:
- Ask Claude Code to add an OpenFreeMap map on the left side. The map has a blue position marker with visible attribution.
- Republish the updated car-dash folder to the existing Netlify project. The same netlify.app address serves the map update.
- Run Demo drive on the HTTPS page. The speed reaches 80 km/h while the position dot moves with visible map attribution.
Ask Claude Code to add the map
MapLibre GL JS renders the interactive map in your browser. OpenFreeMap supplies the dark style without requiring a map API key.
The map keeps its automatic attribution visible. Live location updates use the same position marker as the simulated route.
- Switch back to the Claude Code prompt in your Terminal or PowerShell session.
- Send this request to Claude Code:
Update the existing dashboard. Add a map that uses the ES-module build of MapLibre GL JS 6.19.0, specifically dist/maplibre-gl.mjs with dist/maplibre-gl.css, and OpenFreeMap's current dark style from its official Quick Start guide. Keep MapLibre's automatic attribution control visible. Put the map on the left two thirds of the landscape layout. Add a clear position dot, centre the map on live GPS updates, and make Demo drive move the dot along a short simulated route. Do not remove the speed controls. Show a friendly on-page location status instead of failing silently. Tell me what changed and exactly what I should see after republishing.
What does this prompt do?
- The ES-module request pins MapLibre GL JS to 6.19.0 through dist/maplibre-gl.mjs.
- The stylesheet request loads dist/maplibre-gl.css so the map controls render correctly.
- The OpenFreeMap request keeps the automatic attribution visible.
- The live location request feeds GPS position updates into the map.
- The Demo drive request moves the same marker along a simulated route.
Claude Code should report that it added the pinned MapLibre module, its CSS, a map, a position dot, and a simulated route to index.html.
That gives your speed dashboard a location layer while preserving the existing controls.
Republish the updated car-dash folder to Netlify
Netlify creates another production deployment for the updated folder. The existing site address stays the same.
This deployment stays inside Netlify's Free plan. Its hard limit prevents automatic overage charges.
- Republish the updated car-dash folder to the existing Netlify project.
- Return to the Netlify project dashboard from earlier.
- Select Production deploys.
- Find the drag-and-drop area on that page.
- Drag the updated car-dash folder into the area.
You should see a new production deploy finish. Your existing netlify.app address remains available.
How many credits does this use?
Each production deployment consumes 15 credits. The Netlify Free plan includes 300 credits per month with a hard limit.
Allow location and test Demo drive
The Geolocation API can center the map on the device's reported position. The location permission belongs to the published page you are testing.
- Return to your existing netlify.app address in the browser.
- Grant the browser's request to use your location.
- Choose the option that shares your location with this site in the browser permission prompt.
You should see the dark map fill the left two thirds of the landscape dashboard. A blue position marker should appear with the automatic attribution still visible.
What if the position looks wrong?
A computer or Wi-Fi-only iPad may estimate its position from nearby networks. That estimate can place the marker away from your actual location.
Demo drive remains the reliable desk checkpoint because it follows a repeatable simulated route.
Before you start Demo drive, predict which parts of the dashboard will move.
- Start the test by selecting Demo drive.
- In the controls below the speed display, select Demo drive once.
- Let the Demo drive run until it finishes.
You should see the speed climb to exactly 80 km/h before returning to 0.
Your blue position marker moves along the simulated route. The map follows it while the automatic attribution stays visible.
The right side still has no 3D centerpiece. That visible gap is the intended shortfall.
Map or marker missing?
- Confirm that the newest production deploy shows a completed state in Netlify.
- Use your browser's site controls to grant location access if the marker does not follow your position.
- Republish the entire car-dash folder if the map assets are missing.
- Help me diagnose why my published MapLibre map or position marker is missing.
✔️ Awesome, I've got everything!
Great. Your published dashboard now connects the speed display to a moving map with visible attribution.
ⓧ I'd like to double check the full code
Claude's exact HTML may vary, so compare your full index.html file against these required outcomes.
- Confirm that index.html imports MapLibre GL JS 6.19.0 from dist/maplibre-gl.mjs.
- Confirm that index.html loads dist/maplibre-gl.css.
- Confirm that the map uses the OpenFreeMap dark style.
- Confirm that automatic MapLibre attribution remains visible.
- Confirm that a blue position marker appears on the map.
- Confirm that updatePosition() centers the map on live GPS updates.
- Confirm that Demo drive moves the marker along a simulated route.
- Confirm that Demo drive retains its 0-to-80-to-0 speed animation.
The dashboard now shows where the drive is happening. Next, you'll fill the visible right-side gap with a heading-aware 3D car.
Add the 3D Car
Your published MapLibre map now follows live or simulated movement using an OpenFreeMap style. The empty right-side panel still makes the dashboard feel unfinished.
This step fills the dashboard's deliberate visual gap with a lightweight three.js car.
The car follows the available heading. Its four wheels react to the current speed.
In this step, get ready to:
- Add a low-poly 3D car whose direction follows the dashboard heading. Its four wheels spin faster as speed rises.
- Optionally replace the box-built car with a local model. Every three.js dependency remains on version 0.187.0.
- Republish the complete dashboard. Demo drive turns the car while all four wheels accelerate.
Build the lightweight 3D car
An import map gives browser modules stable names. It also keeps the core library on the same release as its addons.
- Return to the Claude Code session you used to update index.html.
- Choose the body colour for your low-poly car.
- Record the colour here: your colour.
Claude Code may request permission to edit index.html. The request appears after you submit the prompt.
- Add the low-poly car by pasting this request into Claude Code:
Update the existing dashboard. Add a lightweight 3D car below the speed display with three.js 0.187.0 loaded from jsDelivr through an import map. Map three to the 0.187.0 three.module.js file and map three/addons/ to the matching 0.187.0 examples/jsm/ directory. Build a simple low-poly car from boxes and cylinders in [[YOUR_COLOUR="your colour"]] on a dark floor. Turn the car to match GPS heading when heading is available. During Demo drive, turn the car along the simulated route and spin all four wheels faster as speed rises. Optimise for an iPad and preserve the map, speed, unit switch, Demo drive, and visible map attribution. Tell me what changed and exactly what I should see after republishing.
What does this request do?
- The import map pins both three.js paths to version 0.187.0. This prevents the core library from loading a different release than its addons.
- Boxes form the car body and cabin. Four cylinders form the wheels.
- The existing heading value turns the car. The existing metresPerSecond value controls wheel motion.
- Approve any file-edit permission Claude Code requests for index.html.
You should see Claude Code report that it added matching three.js import-map entries. You should also see a low-poly car scene with four animated wheels.
Optionally use a Kenney car model
The Kenney Car Kit provides free CC0 car models. Its current model filenames were not verified for this project.
This route replaces only the box-built car. The existing heading behavior and Demo drive remain in place.
- Open the Kenney Car Kit asset page.
- Download the Car Kit archive from the asset page.
- Use the download control on the asset page to save the archive.
- Extract the downloaded Car Kit archive.
- Find the downloaded archive in Finder on macOS or File Explorer on Windows.
- Use your system's extraction control to unpack the archive.
You should see the extracted model files. The available car models include files ending in .glb.
- Record the exact filename of the .glb car you want to use: your-car.glb.
- Copy that model file into the existing car-dash folder using Finder on macOS or File Explorer on Windows.
You should see your chosen .glb file beside index.html inside car-dash.
- Switch back to your Claude Code session.
- Replace the box-built car by pasting this request into Claude Code:
Replace only the box-built car with the local file [[MODEL_FILE="your-car.glb"]]. Use GLTFLoader from three/addons/loaders/GLTFLoader.js, keep every three.js import on version 0.187.0 from the same jsDelivr import map, scale and centre the model to fit the existing 3D panel, and preserve the existing heading and Demo drive behaviour. If loading fails, show the exact model-loading error in the 3D panel. Tell me what changed and what I should see after republishing.
What does this request do?
The request uses GLTFLoader from the existing addons mapping. It keeps every three.js dependency on version 0.187.0.
The model replaces the primitive meshes while preserving the established movement logic. An on-page message makes a loading failure visible.
You should see Claude Code name the local model file that index.html now loads. Its summary should confirm that the heading and Demo drive behavior remain.
Republish and test the finished dashboard
The published site must include every file the dashboard loads. Republish the complete folder so the module imports and optional local model share the same HTTPS deployment.
- Republish the complete car-dash folder to the existing Netlify project. Keep the chosen .glb file inside the folder if you used the optional model.
- Switch back to the Netlify project dashboard from earlier.
- Open Production deploys.
- Drag the complete car-dash folder into the drag-and-drop area.
You should see a new production deployment finish. The same netlify.app address remains available.
- Return to the same HTTPS netlify.app address from earlier.
Before you start Demo drive, which parts of the car do you expect to react as the simulated route changes?
- Start the simulated route with Demo drive.
- Find Demo drive in the dashboard controls beneath the 3D panel.
- Tap the button once.
You should see the 3D car turn along the simulated route. All four wheels should spin faster while the displayed speed rises toward 80 km/h.
That closes the dashboard's deliberate visual gap. The map and car now respond to the same simulated drive.
- Ask Claude Code to diagnose an empty 3D panel by pasting this request only if the published car does not appear:
The published 3D panel is empty. Keep the current design, add a visible on-page diagnostic for three.js or GLTFLoader failures, verify that every three.js URL uses version 0.187.0 from the same CDN, and verify that any local .glb filename exactly matches the published file. Tell me the cause and what I should see after republishing.
3D panel still empty?
This diagnostic request checks for a mismatched three.js URL. It also checks whether a local model filename differs from the published file.
- Republish the complete car-dash folder after Claude Code corrects the cause.
- Use the visible on-page diagnostic to identify any resource that still fails to load.
- Ask for focused help: Help me diagnose why my published three.js car panel is empty.
You should see Claude Code report a corrected import or filename. If the resource still fails, the 3D panel should display a loading error that identifies it.
✔️ Awesome, I've got everything!
Great. Your published dashboard now contains the moving map and the animated low-poly car.
ⓧ I'd like to double check the full code
Compare your main-path index.html with this cumulative reference. The optional Kenney model is excluded.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@6.19.0/dist/maplibre-gl.css">
<title>Car Dashboard</title>
<style>
:root{color-scheme:dark;font-family:system-ui,sans-serif}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#07111f}body{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}#dashboard{display:grid;grid-template-columns:2fr 1fr;width:100%;height:100%}#map{min-width:0}#panel{display:grid;grid-template-rows:auto auto 1fr auto;gap:10px;padding:14px;background:linear-gradient(#0b1728,#050a12)}#speed{text-align:center;font-size:clamp(72px,15vw,180px);line-height:.85;font-weight:800}#unit{text-align:center;color:#8aa4c5;font-size:clamp(18px,2vw,30px)}#car{min-height:0;border:1px solid #1e3552;border-radius:16px;background:#08111d;overflow:hidden}#controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}button{min-height:52px;border:1px solid #36597d;border-radius:12px;background:#112844;color:white;font-size:18px}#status{grid-column:1/-1;color:#9bb2cc;text-align:center}.maplibregl-ctrl-attrib{font-size:10px}@media(orientation:portrait){#dashboard{grid-template-columns:1fr;grid-template-rows:58% 42%}}
</style>
<script type="importmap">
{"imports":{"three":"https://cdn.jsdelivr.net/npm/three@0.187.0/build/three.module.js","three/addons/":"https://cdn.jsdelivr.net/npm/three@0.187.0/examples/jsm/"}}
</script>
</head>
<body>
<main id="dashboard">
<section id="map" aria-label="Moving map"></section>
<section id="panel">
<div id="speed">--</div><div id="unit">km/h</div>
<div id="car" aria-label="3D car"></div>
<div id="controls"><button id="unitButton">Switch to mph</button><button id="demoButton">Demo drive</button><div id="status">Waiting for location</div></div>
</section>
</main>
<script type="module">
import * as maplibregl from 'https://unpkg.com/maplibre-gl@6.19.0/dist/maplibre-gl.mjs';
import * as THREE from 'three';
const speedEl=document.querySelector('#speed'),unitEl=document.querySelector('#unit'),unitButton=document.querySelector('#unitButton'),demoButton=document.querySelector('#demoButton'),statusEl=document.querySelector('#status');
let unit='km/h',metresPerSecond=null,demoRunning=false,heading=0;
const map=new maplibregl.Map({container:'map',style:'https://tiles.openfreemap.org/styles/dark',center:[13.388,52.517],zoom:15});
const marker=new maplibregl.Marker({color:'#35a7ff'}).setLngLat([13.388,52.517]).addTo(map);
function renderSpeed(){if(metresPerSecond===null){speedEl.textContent='--';return}const value=unit==='km/h'?metresPerSecond*3.6:metresPerSecond*2.236936;speedEl.textContent=String(Math.round(value))}
unitButton.addEventListener('click',()=>{unit=unit==='km/h'?'mph':'km/h';unitEl.textContent=unit;unitButton.textContent=unit==='km/h'?'Switch to mph':'Switch to km/h';renderSpeed()});
const scene=new THREE.Scene();scene.background=new THREE.Color(0x08111d);const camera=new THREE.PerspectiveCamera(42,1,.1,100);camera.position.set(5,3.5,6.5);camera.lookAt(0,.5,0);const renderer=new THREE.WebGLRenderer({antialias:true});renderer.setPixelRatio(Math.min(devicePixelRatio,2));document.querySelector('#car').append(renderer.domElement);scene.add(new THREE.HemisphereLight(0xddeeff,0x182030,2.2));const light=new THREE.DirectionalLight(0xffffff,2.5);light.position.set(4,6,3);scene.add(light);
const car=new THREE.Group(),paint=new THREE.MeshStandardMaterial({color:0x2f8cff,metalness:.45,roughness:.32}),dark=new THREE.MeshStandardMaterial({color:0x10151c,roughness:.8});const body=new THREE.Mesh(new THREE.BoxGeometry(3.2,.7,1.6),paint);body.position.y=.75;car.add(body);const cabin=new THREE.Mesh(new THREE.BoxGeometry(1.7,.65,1.35),paint);cabin.position.set(-.25,1.4,0);car.add(cabin);const wheels=[];for(const x of[-1.1,1.1])for(const z of[-.88,.88]){const wheel=new THREE.Mesh(new THREE.CylinderGeometry(.38,.38,.28,18),dark);wheel.rotation.x=Math.PI/2;wheel.position.set(x,.42,z);wheels.push(wheel);car.add(wheel)}scene.add(car);const floor=new THREE.Mesh(new THREE.CircleGeometry(5,48),new THREE.MeshStandardMaterial({color:0x0e1d2e,roughness:1}));floor.rotation.x=-Math.PI/2;scene.add(floor);
function resizeCar(){const host=document.querySelector('#car'),w=host.clientWidth,h=host.clientHeight;renderer.setSize(w,h,false);camera.aspect=w/Math.max(h,1);camera.updateProjectionMatrix()}new ResizeObserver(resizeCar).observe(document.querySelector('#car'));
(function animate(){requestAnimationFrame(animate);car.rotation.y=THREE.MathUtils.degToRad(-heading);const spin=metresPerSecond===null?0:metresPerSecond*.018;wheels.forEach(w=>w.rotation.z-=spin);renderer.render(scene,camera)})();
function updatePosition(lng,lat,nextHeading=null){marker.setLngLat([lng,lat]);map.easeTo({center:[lng,lat],duration:500});if(Number.isFinite(nextHeading))heading=nextHeading}
if('geolocation'in navigator)navigator.geolocation.watchPosition(p=>{if(demoRunning)return;const{longitude,latitude,speed,heading:gpsHeading}=p.coords;metresPerSecond=speed===null?null:Math.max(0,speed);updatePosition(longitude,latitude,gpsHeading);statusEl.textContent=speed===null?'Location found; speed unavailable':'Live GPS';renderSpeed()},e=>statusEl.textContent=`Location unavailable: ${e.message}`,{enableHighAccuracy:true,maximumAge:1000,timeout:10000});else statusEl.textContent='Location is not supported';
demoButton.addEventListener('click',()=>{if(demoRunning)return;demoRunning=true;demoButton.disabled=true;statusEl.textContent='Demo drive';const start=performance.now(),duration=16000,startLng=13.388,startLat=52.517;function frame(now){const progress=Math.min((now-start)/duration,1),kmh=progress<=.5?progress*160:(1-progress)*160;metresPerSecond=kmh/3.6;heading=progress*90;updatePosition(startLng+progress*.012,startLat+Math.sin(progress*Math.PI)*.004,heading);renderSpeed();if(progress<1)requestAnimationFrame(frame);else{metresPerSecond=0;renderSpeed();demoRunning=false;demoButton.disabled=false;statusEl.textContent='Demo complete'}}requestAnimationFrame(frame)});
</script>
</body>
</html>
What should the reference contain?
The reference preserves the map and automatic attribution. It adds the pinned import map and the complete low-poly car scene.
The animation loop reads heading for direction. It reads metresPerSecond for wheel motion.
Your dashboard now has its moving visual centerpiece. Next up, you will install it on the tablet Home Screen and prepare the mounted display for parked testing.
Install and Mount the Dashboard
Your published page now combines the moving map with the speed display. Its 3D car responds to heading and speed.
This step turns the browser tab into a Home Screen dashboard built for parked setup and passenger-observed use.
In this step, get ready to:
- Make the dashboard a Home Screen web app. A first tap requests Screen Wake Lock when supported.
- Add the published dashboard to a tablet or phone Home Screen. It launches as a standalone app.
- Mount the device in landscape while parked. A passenger confirms that Demo drive works without driver interaction.
Make the dashboard installable
A web app manifest gives the browser the app name, icon, launch address, and standalone display mode. Claude Code can create those files while preserving the dashboard you already built.
- Paste this exact request into the Claude Code session for your car-dash folder:
Make the existing dashboard installable as a Home Screen web app. Create manifest.json with the name Car Dashboard, a relative start URL, display set to standalone, a dark background colour, a dark theme colour, and an icon file that you create. Link the manifest from index.html. After the first user tap, request a screen wake lock only when navigator.wakeLock is supported, show whether wake lock is active, and safely reacquire it when the page becomes visible again. Preserve the complete dashboard and Demo drive. Keep the layout responsive, because the iPad will be mounted physically in landscape instead of relying on manifest orientation or fullscreen. Tell me which files you created and exactly what I should see after republishing.
What does this request do?
- The manifest describes how the dashboard launches from the Home Screen.
- The icon gives the installed dashboard a recognisable Home Screen shortcut.
- The first pointer interaction calls requestWakeLock(). Returning to the visible page calls it again when needed.
- The responsive layout keeps the interface usable when the physical mount holds the device in landscape.
You should see Claude Code report that it created manifest.json plus icon.svg. It should also report updates to index.html for the manifest link, app metadata, and Wake Lock behavior.
- Republish the complete car-dash folder to the existing Netlify project.
- Return to the Netlify project dashboard from earlier.
- Select Production deploys.
- Drag the complete car-dash folder into the drag-and-drop area.
You should see a new production deploy finish. The same netlify.app address should remain available.
- Return to the published netlify.app page on the device you plan to mount.
- Tap the dashboard once to request Wake Lock.
On a supporting device, you should see the status change to Screen awake.
Wake Lock not activating?
- Confirm that you are using the HTTPS netlify.app page.
- Keep the dashboard visible while it requests the lock.
- Check whether the device supports Wake Lock in Home Screen web apps.
- Ask for help with the Wake Lock check.
Use this reference to compare the three finished files before installing the dashboard.
✔️ Awesome, I've got everything!
That is the final software update complete. Confirm that all three files are saved inside car-dash.
ⓧ I'd like to double check the full code
The finished icon.svg should match this reference.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><rect width="512" height="512" rx="96" fill="#07111f"/><path d="M112 302h288l-30-98c-7-23-28-38-52-38H194c-24 0-45 15-52 38l-30 98Z" fill="#2f8cff"/><rect x="82" y="288" width="348" height="112" rx="42" fill="#2f8cff"/><circle cx="156" cy="392" r="44" fill="#10151c"/><circle cx="356" cy="392" r="44" fill="#10151c"/></svg>
The finished manifest.json should match this reference.
{"name":"Car Dashboard","short_name":"Car Dash","start_url":"./","display":"standalone","background_color":"#07111f","theme_color":"#07111f","icons":[{"src":"icon.svg","sizes":"any","type":"image/svg+xml","purpose":"any"}]}
The finished index.html should match this reference.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="theme-color" content="#07111f">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="manifest" href="manifest.json">
<link rel="icon" href="icon.svg" type="image/svg+xml">
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@6.19.0/dist/maplibre-gl.css">
<title>Car Dashboard</title>
<style>
:root{color-scheme:dark;font-family:system-ui,sans-serif}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#07111f}body{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}#dashboard{display:grid;grid-template-columns:2fr 1fr;width:100%;height:100%}#map{min-width:0}#panel{display:grid;grid-template-rows:auto auto 1fr auto;gap:10px;padding:14px;background:linear-gradient(#0b1728,#050a12)}#speed{text-align:center;font-size:clamp(72px,15vw,180px);line-height:.85;font-weight:800}#unit{text-align:center;color:#8aa4c5;font-size:clamp(18px,2vw,30px)}#car{min-height:0;border:1px solid #1e3552;border-radius:16px;background:#08111d;overflow:hidden}#controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}button{min-height:52px;border:1px solid #36597d;border-radius:12px;background:#112844;color:white;font-size:18px}#status{grid-column:1/-1;color:#9bb2cc;text-align:center}.maplibregl-ctrl-attrib{font-size:10px}@media(orientation:portrait){#dashboard{grid-template-columns:1fr;grid-template-rows:58% 42%}}
</style>
<script type="importmap">
{"imports":{"three":"https://cdn.jsdelivr.net/npm/three@0.187.0/build/three.module.js","three/addons/":"https://cdn.jsdelivr.net/npm/three@0.187.0/examples/jsm/"}}
</script>
</head>
<body>
<main id="dashboard">
<section id="map" aria-label="Moving map"></section>
<section id="panel">
<div id="speed">--</div><div id="unit">km/h</div>
<div id="car" aria-label="3D car"></div>
<div id="controls"><button id="unitButton">Switch to mph</button><button id="demoButton">Demo drive</button><div id="status">Waiting for location</div></div>
</section>
</main>
<script type="module">
import * as maplibregl from 'https://unpkg.com/maplibre-gl@6.19.0/dist/maplibre-gl.mjs';
import * as THREE from 'three';
const speedEl=document.querySelector('#speed'),unitEl=document.querySelector('#unit'),unitButton=document.querySelector('#unitButton'),demoButton=document.querySelector('#demoButton'),statusEl=document.querySelector('#status');
let unit='km/h',metresPerSecond=null,demoRunning=false,heading=0,wakeLock=null;
const map=new maplibregl.Map({container:'map',style:'https://tiles.openfreemap.org/styles/dark',center:[13.388,52.517],zoom:15});
const marker=new maplibregl.Marker({color:'#35a7ff'}).setLngLat([13.388,52.517]).addTo(map);
function renderSpeed(){if(metresPerSecond===null){speedEl.textContent='--';return}const value=unit==='km/h'?metresPerSecond*3.6:metresPerSecond*2.236936;speedEl.textContent=String(Math.round(value))}
unitButton.addEventListener('click',()=>{unit=unit==='km/h'?'mph':'km/h';unitEl.textContent=unit;unitButton.textContent=unit==='km/h'?'Switch to mph':'Switch to km/h';renderSpeed()});
const scene=new THREE.Scene();scene.background=new THREE.Color(0x08111d);const camera=new THREE.PerspectiveCamera(42,1,.1,100);camera.position.set(5,3.5,6.5);camera.lookAt(0,.5,0);const renderer=new THREE.WebGLRenderer({antialias:true});renderer.setPixelRatio(Math.min(devicePixelRatio,2));document.querySelector('#car').append(renderer.domElement);scene.add(new THREE.HemisphereLight(0xddeeff,0x182030,2.2));const light=new THREE.DirectionalLight(0xffffff,2.5);light.position.set(4,6,3);scene.add(light);
const car=new THREE.Group(),paint=new THREE.MeshStandardMaterial({color:0x2f8cff,metalness:.45,roughness:.32}),dark=new THREE.MeshStandardMaterial({color:0x10151c,roughness:.8});const body=new THREE.Mesh(new THREE.BoxGeometry(3.2,.7,1.6),paint);body.position.y=.75;car.add(body);const cabin=new THREE.Mesh(new THREE.BoxGeometry(1.7,.65,1.35),paint);cabin.position.set(-.25,1.4,0);car.add(cabin);const wheels=[];for(const x of[-1.1,1.1])for(const z of[-.88,.88]){const wheel=new THREE.Mesh(new THREE.CylinderGeometry(.38,.38,.28,18),dark);wheel.rotation.x=Math.PI/2;wheel.position.set(x,.42,z);wheels.push(wheel);car.add(wheel)}scene.add(car);const floor=new THREE.Mesh(new THREE.CircleGeometry(5,48),new THREE.MeshStandardMaterial({color:0x0e1d2e,roughness:1}));floor.rotation.x=-Math.PI/2;scene.add(floor);
function resizeCar(){const host=document.querySelector('#car'),w=host.clientWidth,h=host.clientHeight;renderer.setSize(w,h,false);camera.aspect=w/Math.max(h,1);camera.updateProjectionMatrix()}new ResizeObserver(resizeCar).observe(document.querySelector('#car'));
(function animate(){requestAnimationFrame(animate);car.rotation.y=THREE.MathUtils.degToRad(-heading);const spin=metresPerSecond===null?0:metresPerSecond*.018;wheels.forEach(w=>w.rotation.z-=spin);renderer.render(scene,camera)})();
function updatePosition(lng,lat,nextHeading=null){marker.setLngLat([lng,lat]);map.easeTo({center:[lng,lat],duration:500});if(Number.isFinite(nextHeading))heading=nextHeading}
if('geolocation'in navigator)navigator.geolocation.watchPosition(p=>{if(demoRunning)return;const{longitude,latitude,speed,heading:gpsHeading}=p.coords;metresPerSecond=speed===null?null:Math.max(0,speed);updatePosition(longitude,latitude,gpsHeading);statusEl.textContent=speed===null?'Location found; speed unavailable':'Live GPS';renderSpeed()},e=>statusEl.textContent=`Location unavailable: ${e.message}`,{enableHighAccuracy:true,maximumAge:1000,timeout:10000});else statusEl.textContent='Location is not supported';
demoButton.addEventListener('click',()=>{if(demoRunning)return;demoRunning=true;demoButton.disabled=true;statusEl.textContent='Demo drive';const start=performance.now(),duration=16000,startLng=13.388,startLat=52.517;function frame(now){const progress=Math.min((now-start)/duration,1),kmh=progress<=.5?progress*160:(1-progress)*160;metresPerSecond=kmh/3.6;heading=progress*90;updatePosition(startLng+progress*.012,startLat+Math.sin(progress*Math.PI)*.004,heading);renderSpeed();if(progress<1)requestAnimationFrame(frame);else{metresPerSecond=0;renderSpeed();demoRunning=false;demoButton.disabled=false;statusEl.textContent='Demo complete'}}requestAnimationFrame(frame)});
async function requestWakeLock(){if(!('wakeLock'in navigator)||wakeLock)return;try{wakeLock=await navigator.wakeLock.request('screen');statusEl.textContent='Screen awake';wakeLock.addEventListener('release',()=>wakeLock=null)}catch(e){statusEl.textContent=`Wake Lock unavailable: ${e.message}`}}document.addEventListener('pointerdown',requestWakeLock,{once:true});document.addEventListener('visibilitychange',()=>{if(document.visibilityState==='visible')requestWakeLock()});
</script>
</body>
</html>
Add the dashboard to the Home Screen
The manifest now gives your device enough information to install the published site. Follow the path for the device you plan to mount.
- Add the published dashboard to your tablet or phone Home Screen.
- Open the netlify.app address in Safari on iPad.
- Tap Share.
- Tap View More if the Home Screen option is hidden.
- Tap Add to Home Screen.
- Turn on Open as Web App.
- Tap Add.
- Open the same address in Chrome on Android if that is your chosen device.
- Select Add to home screen or Install app from the Chrome menu.
You should see a Car Dashboard icon on the Home Screen.
- Launch the installed dashboard from the Home Screen.
- Tap the Car Dashboard icon.
- Grant location access when the device requests it.
- Use the location permission prompt to let the dashboard read the device position.
You should see the dashboard fill the standalone web app window. The map, speed controls, Demo drive, visible attribution, and 3D car should remain available.
On a Wi-Fi-only iPad, live road speed may remain --. Demo drive remains the reliable stationary test.
Mount and test while parked
Keep Every Interaction Parked
Mounting a screen deserves extra care. Complete every setup action while the vehicle is parked where it cannot move.
The mount must leave the road fully visible. A passenger handles every check if the vehicle later moves.
- Park the vehicle before beginning the mounting setup.
- Secure the dashboard or vent mount where it does not block the road or traffic.
- Place the tablet or phone in the mount in landscape orientation.
- Connect power if the mounted device needs it.
- Launch the dashboard from its Home Screen icon.
- Tap the dashboard once to request Wake Lock.
On a supporting device, you should see Screen awake in the dashboard status area.
- Use the device's Auto-Lock setting while parked if Wake Lock is unavailable.
Before you tap Demo drive, do you expect the Home Screen version to behave like the published browser page?
- Ask a passenger to select Demo drive while the vehicle remains parked.
You should see the displayed speed rise to exactly 80 km/h before returning to 0.
The passenger should see the position dot move. The 3D car should turn while all four wheels accelerate with the displayed speed.
Your dashboard is now mounted for hands-free use. Every moving check remains passenger-observed.
Secret mission
Discover a BLE OBD2 Adapter
Can a browser discover what a parked car's Bluetooth Low Energy adapter exposes without sending a vehicle command? Add a Chrome-only panel that lists accessible service UUIDs while keeping the dashboard read-only.
Clean Up Your Resources
Clean Up Your Resources
Netlify Free provides 300 credits each month within a hard limit that prevents automatic charges. Decide whether to keep your dashboard available, pause new publishing, or delete its resources.
Resources you used:
- The local car-dash folder containing index.html, manifest.json, and icon.svg.
- The Netlify project at your HTTPS netlify.app address, including production deploys that consume 15 credits each.
- The Car Dashboard Home Screen web app icon on your tablet.
- The optional Bluetooth Low Energy OBD2 adapter used for parked service discovery.
Keep everything running
No action needed. Choose this if you want the published dashboard to remain available from its Home Screen icon.
- Keep the car-dash folder as your editable local copy.
- Leave the Netlify project online at the same netlify.app address.
- Keep the Car Dashboard icon on your tablet Home Screen.
- Store the optional Bluetooth Low Energy OBD2 adapter for a future parked test.
Pause - I'll come back to this later
Stop publishing new versions while keeping the current site and local files ready for later. The existing static dashboard remains online while the Netlify project stays active.
- Leave the Netlify project online without creating new production deploys.
- Keep the car-dash folder on your computer.
- Keep the Car Dashboard icon on your tablet Home Screen.
- Unplug the optional Bluetooth Low Energy OBD2 adapter while the vehicle is parked.
Delete - I don't want to use this again
Remove the published dashboard and every local copy when you are ready to start fresh. Each resource disappears only after you complete its deletion step.
- In Netlify, delete the project that publishes your dashboard at its netlify.app address.
- Open the previous netlify.app address to confirm the dashboard is no longer available.
- Use your tablet's Home Screen controls to remove the Car Dashboard icon.
- Unplug the optional Bluetooth Low Energy OBD2 adapter while the vehicle is parked.
Delete the local folder using the instructions for your computer:
macOS
- In Finder, locate the car-dash folder you created earlier.
- Drag car-dash to the Trash.
- Empty the Trash to remove the folder permanently.
Windows
- In File Explorer, locate the car-dash folder you created earlier.
- Select the car-dash folder.
- Press Delete to move the folder to the Recycle Bin.
- Empty the Recycle Bin to remove the folder permanently.
Nice Work!
Nice Work!
You did it! You built and published a car dashboard that turns live or simulated location data into a mounted Home Screen experience.
You've learned how to:
- Directed Claude Code with plain-English requests to build a GPS-aware dashboard with unit switching and a repeatable Demo drive that reaches 80 km/h.
- Published the dashboard through Netlify so its speed tracking and Geolocation API features run from a secure HTTPS address.
- Combined MapLibre GL JS, OpenFreeMap, and three.js to show a moving map with visible attribution and a heading-aware 3D car with animated wheels.
- Completed the optional Secret Mission by adding read-only Web Bluetooth discovery that lists accessible GATT services without sending commands to the vehicle.
Ready to quiz yourself?