In spring 2005, Brooklyn high-school sophomore Julia Mayer noticed a poster at her school advertising a summer novel-writing program for teens at 826NYC, a branch of 826 National, a nonprofit organization founded by Dave Eggers that operates writing labs and tutoring centers for students across the country. Since the application deadline was fast approaching, she scrambled to compile the required materials: the first 15 pages of a novel and an outline for the rest of the plot. Mayer, who was one of just 15 teens accepted into the program, finished the novel during the eight-week workshop. Six years later, Eyes in the Mirror is being published this month by Sourcebooks Fire. Here’s how that happy ending came to be.

After learning about the 826NYC program, Mayer immediately perused some short stories she had written. “I realized I didn’t have time to write something new for the application, and remembered that my Dad has always said that my short stories are really outlines for novels,” says the now 22-year-old. “I found a story that I really loved, and decided to expand that. I wrote the first two chapters and submitted them with my application, and was thrilled when I got a phone call saying they’d love to have me in the program. I was also concerned, since I really had no idea where the story was going.”

At 826NYC, Mayer was one of five students assigned to work with Daniel Ehrenhaft, author of several books for many children and teens, who had helped mastermind the writing program. He is currently editorial director of SoHo Teen, a new imprint of SoHo Press, scheduled to launch in 2013. “Julia was a shining star from the beginning,” says Ehrenhaft. “I loved her overall attitude about writing and what it takes.”

Eyes in the Mirror, the novel Mayer completed during the summer program, centers on two girls living in alternative universes who decide to switch lives after meeting as reflections in a mirror. “I loved the premise of the story—I think it’s brilliant,” Ehrenhaft observes. “I think the idea of an alternative reality where another version of yourself exists will especially resonate with teens. Julia has such an interesting and unique take on that theme.”

Nine of the writers in the 826NYC’S 2005 summer writing workshop completed novels, which were anthologized in Nine Novels by Young Americans, released by 826NYC Books in 2007. Mayer attended Boston University and in 2009—in just two and half years—received a double degree in philosophy and psychology. During her high school and college years, she kept in touch with Ehrenhaft, and was especially pleased to receive one special call from him in the summer of 2009.

Ehrenhaft had recently joined Sourcebooks to help the company start up a new YA imprint, called Fire. “I was looking to fill my list, and on a whim looked through Nine Novels by Young Americans,” he recalls. “I hadn’t read Julia’s novel in a while, and when I reread it I realized how awesome it is. I called her and told her I wanted to publish it.”

Mayer recalls being “completely stunned” by the news. “I had kind of forgotten about the novel—it wasn’t in the front of my mind,” she says. That summer while interning at the Department of Education in D.C. she was able to work out her schedule to begin revising the novel—once again under Ehrenhaft’s editorial guidance.

Mayer, who is now working in Harvard’s alumni affairs department, says she is writing some short stories and “starting to think about a sequel to Eyes in the Mirror. I definitely left space for a sequel in the book. I miss the characters and want to hang out with them again.”

Ehrenhaft has high expectations for the newly minted author, whose novel was recently included in Teen Vogue’s list of 25 “must-read” books for summer “I think Julia will do amazing things,” he says of the young writer. “I think she can do whatever she wants, but it would definitely be nice for fans of YA fiction if she keeps writing.”

Eyes in the Mirror by Julia Mayer. Sourcebooks Fire, $9.99 paper Aug. ISBN 978-1-4022-4040-9