Roasting changes green coffee into the aromatic material used for brewing, but the appeal of doing it at home is the opportunity to observe those changes. The source describes several approaches, including pan roasting, small handheld devices and dedicated electric roasters. They give very different levels of control, so a time or temperature copied from one device should not be treated as a recipe for another.
Begin with a small quantity of identifiable green coffee and follow the equipment maker's instructions. Record the batch weight, heat settings, elapsed time and visible changes. Keep the beans moving where the method requires it, and pay attention to sound as well as color. The cracking stages provide useful observations, but neither a single sound nor a dark surface proves that the whole batch developed evenly.
Cooling is part of the process, not an afterthought: beans continue changing while they remain hot. Plan for chaff, smoke and safe handling before heating the first batch. Compare the resulting cups only after recording how they were roasted, and change one part of the process at a time. A repeatable, modest batch teaches more than an ambitious roast with no useful notes.

The conversation
A good question can make a better brew.