Appearance
First run
This takes about two minutes on a normal connection.
1. Open the project folder in a terminal
bash
cd path/to/<slug>Shortcut
In VS Code, choose File → Open Folder…, pick the template folder, then open the built-in terminal with Ctrl + ` (Cmd + ` on macOS). It opens in the right folder.
2. Install dependencies
bash
npm installThis downloads React, Tailwind CSS, Vite and the icon library into node_modules/. It only needs to be done once (and again after an update that changes package.json).
A few npm warn lines are normal. If you see npm error, check Troubleshooting.
3. Start the dev server
bash
npm run devYou'll see something like:
text
VITE v8.x ready in 480 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to exposeOpen http://localhost:5173 in your browser. The template looks exactly like the live preview.
Leave this terminal running while you work. Every time you save a file, the browser updates instantly. Stop the server with Ctrl + C.
Test on your phone
Run npm run dev -- --host. Vite prints a Network address such as http://192.168.1.20:5173. Open it on a phone connected to the same Wi-Fi.
4. Build for production
When you are ready to publish:
bash
npm run buildVite writes an optimised, minified site into dist/:
text
dist/
├── index.html
└── assets/
├── index-3f9a2c1b.js
├── index-8d1e04aa.css
└── hero-5b2c9e10.webpdist/ is the only folder you upload to a host. See Deploy.
5. Preview the production build
bash
npm run previewThis serves dist/ at http://localhost:4173 so you can check the real production build before uploading it.
Don't double-click dist/index.html
Opening dist/index.html straight from your file manager shows a blank page: browsers block JavaScript modules loaded from file://. Always use npm run preview, or upload dist/ to a host.
The three commands
| Command | What it does |
|---|---|
npm run dev | Dev server with instant reload at localhost:5173 |
npm run build | Production build into dist/ |
npm run preview | Serves the production build at localhost:4173 |
Next
- Project structure: find your way around the code.
- Edit content: change text, prices and links.