Goal: Create the basic project scaffold and confirm everything runs locally.
index.htmlchatbot.jshelpers-full.js (download from class repository)secret-variables.js (to hold your Hugging Face API token; globals only)README.md (copy from EXAMPLE_README.md template).gitignore (to keep secret files out of Git)<!DOCTYPE html>, <html>, <head>, <body>.helpers-full.jssecret-variables.jschatbot.jsgit init).chore: initial project setup.npx live-server in your project folder.npx live-server and open your browser. Open DevTools (F12) and check the Console tab - if there are no red errors, you’re good to go!index.html, chatbot.js, helpers-full.js, secret-variables.js, README.md, .gitignoresecret-variables.js (starter template)// secret-variables.js
// Store secret keys or tokens here.
// ⚠️ Do not commit this file to a public repo.
HF_TOKEN = "your-huggingface-api-token-goes-here";
<!-- Example script order in index.html -->
<script src="helpers-full.js"></script>
<script src="secret-variables.js"></script>
<script src="chatbot.js"></script>
.gitignore (starter template)# Secret files (⚠️ do not push secrets!)
secret-variables.js
Download helpers-full.js from the class repo:
https://github.com/rmccrear/codex-lv2-may-2025/tree/main/guides/week5-event-driven-apps/other-dev-files
Place it in your project folder before linking it in index.html.
When you’ve completed this step, commit your work with a meaningful message like:
git add .
git commit -m "feature: complete step 1 - initial project setup"