This didn't happen by accident. A retired organic chemist named John Nanci in Eugene, Oregon, had seen the craft-beer and specialty-coffee industries take off, and when he learned about making chocolate from scratch, "it clicked," he said. "I was like, 'I'm not missing this boat.'" In 2005, the year that the first bean-to-bar chocolate maker in the U.S., called Scharffenberger, sold to Hershey for about $50 million, Nanci created a site called Chocolate Alchemy that detailed how to make chocolate at home with little machinery, something that everyone said couldn't be done. He discovered that after roasting the beans in your oven of choice, you can use a Champion brand juicer to crack them open quickly. Then you put the cracked beans in a big bowl and blow air over them with a hairdryer: The light shells blow away, leaving the nibs. (This is a huge improvement over separating nib from husk by hand, a painstakingly labor-intensive method.)

"You'll have about a 6-foot circle of husk around you," Nanci writes on his site, Chocolate Alchemy, about using a hairdryer. "The kitchen is not such a good option."

He also took machines made for different purposes and jury-rigged them to work for small-batch chocolate. For example, he realized that melangeurs (the machines used to grind cocoa nibs) are really just big granite grinders. "I Googled 'granite stone and granite wheels,' and what popped up was an Indian wet grinder," he remembered. Wet grinders are used to grind lentils, among other things. "And I went, 'Oh, that looks similar.'"

So he bought one, found out that it overheated immediately when grinding nibs, and tore it apart. "I learned about what makes motors overheat, modified it and then talked to the company and said, 'I have a new market for you. Are you willing to make these modifications and sell it as chocolate melangeur?'"

"I present it as a chemist, because I am a chemist."

It was, and it did, and now you can buy a variety of Spectra melangeurs on Nanci's site. Other similar melangeurs have popped up as well, such as the aptly named Cocoatown, which you'll find in almost every bean-to-bar chocolate maker's factory.

That's only one of the machines Nanci created, and it's a small piece of his website, which is bursting with beans you can buy (still the only source for people just getting started) and the nitty-gritty about how to make chocolate from scratch. "I present it as a chemist," he explained, "because I am a chemist."

Almost all bean-to-bar makers in the country got their start using Nanci's beans and methods. Some bigger makers like Raaka still use machines that he invented and produced. Meanwhile, on the other end of the spectrum, almost half of his customers buy machines and beans to make chocolate at home for themselves, not to sell.

I say "almost" because there are also those like Amano Chocolate, founded by Art Pollard in that golden year, 2005. Pollard is a trained physicist who was "assisting on nuclear projects" at Brigham Young University and the University of Washington by time he was 13, and his partner, Clark Goble, worked at Los Alamos, focusing on nuclear modeling, among other things.The two have run a search-engine technology company called Lextek International since 1993, with clients like Apple, Prodigy and Motorola. You've most likely used their product, because it's even been incorporated into Adobe Acrobat, starting with version 6.0 to the present.

Pollard invested in vintage machinery for his chocolate factory, like an enormous winnowing machine from the 1920s or 1930s. "Most all of our machines, I've rebuilt myself," he explained. "For a lot of them, parts aren't available anymore, so I had to either make the part from scratch myself or design the parts and have them machined."

Pollard believes "it's critical" to have a background in technology and engineering in order to make chocolate. "I highly recommend designing and building your own machines, because you learn why things are the way they are. If someone just buys a machine, they just know, this machine works." If you buy readymade machines, Pollard says "you lose the whys. It's the whys that are important for making a superior-quality product."

"There was a time when we made an engineering mistake and had to throw out $30,000 worth of chocolate."

That knowledge also helps things run more smoothly. For example, recently, when Pollard bought a new machine, it arrived without the necessary software. Rather than send it back or hire an engineer, both of which would cause him to lose weeks of production, Pollard simply took a weekend and designed and built a control system himself.

That's not to say it's all smooth sailing. "There was a time when we made an engineering mistake and had to throw out $30,000 worth of chocolate," Pollard remembered.

This kind of mistake, and the trial and error that leads to it, has caused chocolate maker Alan McClure, who owns Patric Chocolate and is widely considered one of the best makers in the country, to stop scouring chemistry books on his own and go back to school to pursue his Ph.D. in food science.

If you could cut down on the trial and error inherent in making craft chocolate (figuring out the right roasting temperature for each batch of beans, deciding how long to conche and so on) by understanding the chemistry behind it — well, the sky would be the limit.

"I had to struggle the whole time to understand more about what I'm doing, the levers and dials that you pull as a chocolate maker," McClure said about what it was like to make chocolate before grad school. "Understanding scientific ways of approaching things has allowed me to have more solid results when I'm doing my own R&D," he continued. "My decisions tend to be better, based on facts" rather than on a hunch.

"I had to struggle the whole time to understand more about what I'm doing."

McClure is already using his new knowledge to make a difference. For example, he's spent the past few years of his graduate work analyzing different cocoa samples to evaluate their levels of theobromine, caffeine and epicatechin. Those three compounds, among others, give chocolate its signature bitter taste, one that turns many people off dark chocolate.

"I've been looking at the amounts of those in different origins of cocoa in an effort to learn more about exactly where the bitterness is coming from," he explained. By analyzing the amounts of each in different types of cocoas, he can better understand how to make less-bitter chocolate from all sorts of beans.

This dedication to hard science is part of the craft-chocolate movement's identity. Take Rob Anderson, the owner of Fresco Chocolate. With degrees in computer science and electrical engineering, he works as a senior director of emerging technologies at an industrial-electronics-manufacturing company. "I don't do the typical executive sort of things like play golf and hang out at the country club," he said. "I come home to make chocolate."

For Anderson, much of the fun of chocolate, which he's been making since the early 2000s, comes from building the machines and problem-solving the technical snafus. Take his cocoa-bean roaster, which is made out of a modified commercial clothes dryer ("I was like, 'Oh my gosh, this is perfect,'" he recalls on finding it).

Over 15 years, Anderson's roaster has gone through at least four iterations; his winnower, over a dozen; his conche, four. It turns out it's actually pretty hard to make great chocolate.

And just because you have a good machine doesn't mean you can make good chocolate. It's all about how you use those machines. Anderson roasts beans three different ways (for example, he describes "light" as "just enough to soften raw cocoa's acidic or green edge") and conches the resulting chocolate four different ways (for example, he describes "long" as "flavor peaks and valleys softened to a melodic harmony").

He prints that information on Fresco's labels and lets you choose the style you like the best. Do you want a dark roast and long conche like the Marañón 230 from Peru? A light roast and no conche like the Papua New Guinea 222? Or would you prefer a medium roast and medium conche like the Dominican Republic 224 (which won a gold award at the 2015 International Chocolate Awards)?