Want to add a new tutorial to help people learn nojs? Great! Here's how:
Each tutorial lives on its own branch in this repo. Use a descriptive name:
git checkout -b todos-tutorialCreate a minimal, self-contained project following this structure:
counter-tutorial/
├── internal/app/components/
│ └── (add your components here)
├── wwwroot/
│ ├── index.html
│ ├── core.js
│ └── (wasm_exec.js — users copy this)
├── main.go
├── go.mod
├── go.sum
├── Makefile
└── README.md
Key principles:
- Minimal scope — Focus on one feature (counter, todos, routing, etc.)
- Stubs with TODOs — Users fill in the blanks while reading the guide
- Standalone — No dependencies other than
github.com/ForgeLogic/nojs - Clear Makefile —
make installandmake fullmust work out of the box
Create a new file in docs/:
docs/your-tutorial-name.md
Structure:
- Introduction — What you'll build and learn
- Prerequisites — Go version, etc.
- Step-by-step instructions — Each step has code examples and explanations
- What Happened — The "magic" explained
- Next Steps — Links to more advanced features
See docs/create-first-counter.md as a template.
Add your tutorial to the README.md under "Available Tutorials".
- Push your branch to GitHub
- Open a PR against
main - Include a description of the tutorial and what it teaches
- Link to the tutorial guide in your PR description
✅ Run it yourself — Make sure all code actually works before submitting
✅ Test from a fresh clone — Verify a brand new user can follow it without confusion
✅ Use concrete examples — Show real code, not pseudocode
✅ Explain the "why" — Not just "do this", but "here's why"
✅ Link forward — Point to the Quick Guide for deeper learning
✅ Keep it focused — One feature per tutorial; save advanced topics for later
Open an issue on the main nojs repo if you have questions.