LAB GUIDE / SECTION 09
What's next
What you built#
YOUR WORKSHOP, CONNECTEDOne push. One Student Worker.
| Concept | You used it for |
|---|---|
| Workers | Your Student Page, your API, your Droid |
| Wrangler | dev, tail |
| Workers Builds | git push → live in ~30 s |
| vars | Config vs code: name, tagline, emoji, Character |
| fetch + cache | Two chained SWAPI calls with a fallback, cached at the edge |
| Workers AI + bindings | env.AI on your own account for your Droid |
| Observability | wrangler tail, the logs in the dashboard |
| Coding Agent + Cloudflare Skills | Building and fixing your Droid from a prompt, then reviewing it before it shipped |
Behind the scenes#
The Hub is also just a Worker, on the teacher's account. It uses a Durable Object: one object that coordinates Registration, Rounds and the live Directory. Because there's only one of it, it handles one thing at a time, so two students registering at the same moment can't step on each other. Its data sits in SQLite, right next to the code.
During this part we'll open the Hub's database live in the Cloudflare dashboard. You'll see the students and answers tables fill up as you registered and as the Rounds ran. Your Card is one of those rows.
After today#
- Your Student Page and your Droid keep running on your free account. Share the link!
- Your Droid runs on your own Workers AI and fetches SWAPI by itself, so it keeps answering after today. The Hub freezes the Directory and stops running Rounds, but your Worker doesn't care.
- The free plan includes 100,000 requests/day and 10,000 Workers AI "Neurons"/day, which is plenty for a personal project.
- Your
/api/chatis open: anyone who finds your URL can call it and use your free Workers AI quota. That's fine for a class. Ideas 1 and 2 below fix it.
What next? Bonus ideas#
| Idea | You'll learn |
|---|---|
Protect /api/chat with a rate limit | Rate Limiting binding, securing an API |
Require a key on /api/chat and keep it as a secret (the sidebar in Mission 2 shows how) | Secrets, locally and in production |
| Ask your agent for an "Ask my Droid" box or a films panel on your page, if you haven't yet | Full-stack Workers: page and API in one |
| Add a second route, for example a random planet or starship from SWAPI | Routing, more fetch and caching |
Your own domain instead of *.workers.dev | Custom domains |
| Connect your agent to your account with the Cloudflare MCP server (Agent setup) | Agents that read logs, check builds and manage resources for you |
| Remember the questions your Droid got | Storage bindings (KV / D1). Covered in a separate presentation! |