Put on your rose-colored glasses, and envision the most romanticized version of New York City possible. One that’s hospitable enough for naïve 22-year-olds to move there overnight; one where the dive bars and cockroach-infested kitchens are in fact charmingly gritty; one where there's a worldly mentor always available to assure them, whenever their optimism begins to fade, that “New York is never a mistake."

To be sure, it's a fictional world, seen in many cliché-filled Sex and the City derivatives that have come and gone. But once in a while, New York offers some actual magic. In 2014, Stephanie Danler, then a 26-year-old waitress, had been working on her bildungsroman—an ultra-naïve young woman named Tess makes an impulsive overnight move to New York, and becomes immersed in the chaos of the restaurant industry—for 10 years, before she got the chance to slip a manuscript to a regular who happened to be a senior VP at Penguin Random House. Before she knew it, art had become life, just as it had for Tess: Danler landed a six-figure two-book deal with Knopf, becoming the buzz of the publishing world well before her novel was even published.

Though she’s insisted time and time again that it's not a memoir, the novel, which the the Times called the "Kitchen Confidential of our time" and made bestseller lists when it was published in 2016, is undeniably based on Danler’s experience working at Union Square Cafe in New York. (Which, Danler proudly noted on a recent afternoon, now keeps a signed copied behind the bar.) Now things are getting even more meta: Starz has adapted Danler’s story into a six-episode TV series, premiering Sunday. In fact, Tess would have noticed the ads for the show all over the New York subway.

These days, Danler, who’s now 34 and primarily based in L.A., is the show’s creator, writer, and executive producer, but prefers to sum up her role as simply having done “everything—everything—24 hours a day for seven months.” She's become, in a way, the woman who has all the answers—especially when it comes to her relationship with Ella Purnell, the 21-year-old actress who plays Tess (she has also played younger versions of both Keira Knightley and Angelina Jolie), who is a self-described real-life Tess who’d never been to New York before suddenly moving to Williamsburg, the same neighborhood her character lands in. It was when she first met Danler for lunch at neighborhood standby Marlow & Sons that Purnell learned that, in fact, she liked avocado.

“I can’t even talk about her eating habits,” Danler said recently, bursting into laughter. “What does she eat? Bread. She doesn’t eat vegetables; she doesn’t eat green things; she doesn’t eat fish.” And, most perplexingly to Danler: “She doesn’t even really drink wine!”

If you’ve read Sweetbitter (not a prerequisite for the show, according to Danler), this outburst will sound familiar. It’s precisely the type of reaction that Tess would elicit from Simone, the restaurant veteran who eventually becomes Tess’s mentor (and played by Caitlin Fitzgerald in the show) and object of fascination for her poise and encyclopedic wine knowledge, as well as her connection to the bartender Jake, Tess’s all-consuming crush, played by Tom Sturridge. Having written this dynamic, Danler was the first to recognize it. When I told her that Purnell had described her to me as being “totally my Simone!”, she did not seem at all surprised.

Still, Danler added that “the teaching went both ways”—especially as she “hadn’t been around a real live 21-year-old in a long time.” All that was a happy accident: The team was looking “for a young woman who wasn’t too strong, who was more in the direction of naïve” when casting the role of Tess, whom Danler had expected to be someone a bit “blank,” and even “submissive,” rather than an actress who “has a real pushback with authority.” In the end, though, that’s exactly what made Purnell a perfect fit: “What we know about Tess from the book is that she leaves her house in the middle of the night and moves to New York City without a friend in the world. And of the 200-plus actresses we saw, Ella was the only one I believed could do that—and survive.”

Caitlin FitzGerald (Simone) and Ella Purnell (Tess) in season 1 of Sweetbitter.

Macall Polay, courtesy of Starz

As they got to know each other, Danler started writing the character to be more like Purnell. Even as she increasingly sought the actress’s input, though, it didn’t escape Purnell’s notice that “certain lines from the book were like [Danler’s] baby.” Danler insisted, for example, on getting the restaurant industry right, helping design a set that was “entirely authentic” by not only building a three-level, full-scale restaurant and kitchen, but then also getting the crew to spend two days “aging it—scraping the wooden floors, greasing it up in the kitchen, and kicking doors where the servers would kick them.”

“It ended up looking remarkably like my memories, if those can even be trusted,” Danler said, adding that she didn’t need the show to be true to her life. Instead, her concerns were mainly below surface level. “I felt such loyalty to the book—to its focus on the female journey not being corrupted, and to the sensuality that’s integral to this awakening and education, without ever becoming, at least in my opinion, gratuitously sexual. And as a creator-author, those things have not been tampered with. I think that’s where the show gets it right for me.”

Her care to preserve Sweetbitter’s core is all the more understandable as the last few years have seen the story has morph into one that’s not just based on her life, but also one that’s come to define her very existence. “I’ve been working for Sweetbitter for a very, very, very long time, and it’s forever going to cast a big shadow over my life and my work,” Danler said. She paused, reflecting for the first time over the course of an interview that started with her saying she “knows all the answers.”

“There are two different stories at work: One of them is my career in restaurants, which I drew off of for Sweetbitter, and the other is a story about a waitress who sold a novel, and whose life changed really quickly and dramatically,” she continued. “And I don’t really talk about the latter story too much.”

Tom Sturridge (Jake), Evan Jonigkeit (Will), Caitlin FitzGerald (Simone), Jasmine Mathews (Heather), Eden Epstein (Ari), Daniyar (Sasha), and Ella Purnell (Tess) in season 1 of Sweetbitter.

Jason Bell, courtesy of Starz

She may not be talking about it, but she’s definitely been thinking about it lately, especially as she’s already about to head back into the writers’ room for a 10-episode season 2—all while, of course, finishing up that second book in her Knopf deal. This one, Danler said, “is a collection of personal essays about being raised by addicts, the inheritance of damage, and moving back to California”—pre-Sweetbitter periods of her life that Danler has found herself “increasingly fascinated by, because I can barely remember it.”

Indeed, though she’s forever “very proud” of Sweetbitter, she’s also firm in saying she’s “mined [her] personal experiences so many times for [her] writing,” and is now itching to get back to another novel. As for Purnell? She’s now been approved by the Wing. How quickly they grow up in New York.

Stephanie Danler and Ella Purnell.

Michael Kovac/Getty Images for Starz

Related: The 10 New Young Adult Books You May See Coming to a Theater Near You