Green beans can easily be found on the Internet and applying heat can be done with an inexpensive air popcorn machine. Put the beans in the machine, turn it on, wait for the beans to crack and voila you have roasted coffee.
Obviously with a kitchen appliance not made for that, there is not much control over the heat profile applied to the beans. This is where the interesting part happens: people have been hacking their pop corn machines for decades to better roast coffee, for example:
- Drilling a hole in the machine to put a temperature sensor in contact with the beans.
- Putting a relay on the heating element to control it electronically.
- Using an Arduino/Raspberry Pi to make the machine follow a predefined temperature profile.
Lots of fun ways to turn a machine into something completely different.