Jessica Mah descends onto the carpet in a pair of Ugg slippers. With no permanent desk at inDinero headquarters, the financial firm's co-founder and CEO seems to adapt herself to whatever space she finds herself in. She's in the midst of a video­conference with her four offices, including those on the other side of the globe in the Philippines. Splayed on the ground, propped up only by her elbows, Mah digests the metrics being rattled off as if they were as soothing as guided meditation.

Mah's vibe has become more centered since four years ago, when her company appeared to be taking its last breath. In 2010, when she launched the "Mint.com for small business"--as she positioned it--the Y Combinator-backed startup offered a financial dashboard for business owners to track their cash flow. But Mah discovered that her product was flawed and its business model wasn't sustainable. To complicate matters, she was powering inDinero with seven of her closest friends from UC Berkeley, inclu­ding her co-founder, Andy Su, 24. As the company began to unravel, so did her relationships. After one particular blowout, Su gave her an ultimatum, threatening to leave: "I don't forgive you until you agree to do counseling with me." The two suddenly found themselves in couples therapy, of all places.

A failing business and an organizational headache was hardly the trajectory Mah imagined for herself when the precocious overachiever conceived of inDinero. Growing up with an engineer father and entrepreneur mother in New York City and Westchester County, she was coding by the time she was 8 years old. Mah hatched her first tech business at 12 (a web hosting services company), dropped out of high school at 15, and launched inDinero at 19. Other than a college internship, the computer science grad had never before worked for a company. She graduated from Y Combinator's summer 2010 class with $1.2 million in funding, while being hailed by the tech press as "the closest we've got to a female Mark Zuckerberg." (In 2011, she was included among Inc.'s 30 Under 30.)

But a year after starting inDinero, cracks began to show. Most of inDinero's 30,000 mom-and-pop-shop customers were using the site for free, rather than paying for premium tools. Investors had cautioned against hiring buddies, but the young founder ignored their warnings. Now she was tangled in heated spats with her best friend over mundane issues like whether to put sales reps' performances on a white board. "Suddenly I'm screaming at her, and she's screaming at me," says Mah. "We stopped hanging out." The startup was burning through $80,000 a month, with only $150,000 left in the bank, and Mah had to lay off all her friends (except two, including Su). "We were racing our Ferrari into a brick wall," she admits. In one of her darkest moments, she confessed to her father in an email: "I feel like I'm Bernie Madoff--rich on the outside, but completely broken on the inside."

To salvage what was left, Mah needed to pivot the company, but she didn't know in what direction. She and Su moved the remains of inDinero into their apartment, with rent subsidized by their parents. The co-founders used their personal networks for market research, ultimately discovering their new product: software for small businesses to outsource back-office tasks, like taxes. The pair quickly learned bookkeeping, and this time around, as they started to staff up, hiring friends was off the table. "Unless I'm willing to sacrifice the relationship 100 percent, I shouldn't let a friend even come into my interview process, period," says Mah.

But the reality was, she and Su were friends, roommates, and business partners--an overly complex dynamic. Even as the company began its turnaround, their relationship was devolving because of contrasting communication styles. "A lot of times Jess comes in and bombards people with a ton of ideas, going a million miles a minute," says Su. "If I'm thinking about a problem, I might say, 'Here's the best way to go about it.'"

Last summer, the platonic partners' relationship came to a head. Su gave Mah the therapy ultimatum, which turned out to be transformational. First, she hired an executive coach, but the two soon upgraded to a marriage counselor, who has helped them adopt new rituals, like no fighting in front of the kids (employees) and mandatory date nights, often in the form of hitting golf balls at the driving range or watching a movie. The understood rule: No talking about work problems. "Marriage counseling has been golden," says Mah.

Today, the newly incarnated inDinero has become a force in the small-to-medium-size-business software space. Customers--primarily businesses with two to 100 employees--pay three to four figures monthly for the startup's proprietary software, which handles all accounting and taxes. With another $8.8 million in funding, the company now boasts a staff of 150. In 2014, inDinero hit $2.9 million in revenue with a growth rate of 2,685.6 percent. "I think a year from now we'll be doubled in everything-- revenue, customers, head count," says Mah of her company's rapid turnaround.

Along with that feat is another that's just as critical to her: becoming a wiser, more grounded CEO. Mah's been fueling her managerial self-help journey with lessons from books--she devoured 100 last year (from volumes on business management to political memoirs), and she plans to finish another 50 by the end of 2015. She's even repaired some of the friendships she lost in the initial inDinero meltdown. "At the end of the day," says Mah, "all we have is our health, our family, and our friends. That's it."