On a recent afternoon, Desiree Akhavan was having chicken soup at a diner in Times Squares and marveling over what could be her big break. At 29, her first feature, “Appropriate Behavior,” which she directed and stars in, had been accepted into the Sundance Film Festival (it premieres on Saturday night).

When a festival’s programming director emailed her in November to set a time to talk, Akhavan immediately thought it was with bad news. She even prepared herself for how to handle the call so she wouldn’t start to bawl on the other line.

“So many people make films that don’t get seen that they love as much as I love my film,” Akhavan says, her eyes welling up–this time, with happy tears. “Why would I be so lucky? I still don’t know.”

Akhavan could be one of the breakout stars of the festival. “Appropriate Behavior,” is a focused, artfully rendered comedy about what it means to fit in. Its protagonist Shirin (played by Akhavan) is an Iranian-American bisexual Brooklynite in her 20s who is trying to get past a bad breakup with her girlfriend and struggling to find a job. Akhavan says she was inspired by directors like Woody Allen, Noah Baumbach and Sarah Polley.

But a different source material also comes to mind — HBO’s “Girls.” Akhavan, who considers herself a fan of the Lena Dunham comedy series, has a way of honestly capturing the rhythms and speech patterns of her generation that feels unscripted. As her character drifts aimlessly between career paths and stranger’s beds, she struggles with telling her parents about her sexuality.

This is familiar terrain for Akhavan. The daughter of two immigrants from Iran, who fled during the Revolution of 1979, she too struggled with telling her family that she’s bisexual until just a few years ago.

“None of those things have happened to me exactly, but I felt those feelings coming out to my family,” Akhavan said. “I wanted to paint a picture that reflected sexuality as I knew it, which was more fluid, but also reflected coming out as I knew it, which was more gradual or subtle.”

And like “Girls,” “Appropriate Behavior” offers a similarly candid depiction of sex. “I feel like a lot of scenes graze over sex and make it this silky smooth thing,” she said. “Even the best sex, there’s the mechanics of it. I didn’t want to gloss over it with anything cheesy. And I didn’t want it to be one-note. I wanted to show the messy gray matter that happens.”

“I didn’t want to be gratuitous,” Akhavan added, “but I also felt if I weren’t naked this wouldn’t be a real love scene. I have a real point of view when it comes to them and I wanted it to be just right.”

Akhavan grew up in upstate New York, and she knew she wanted to be an artist early on. “I started writing plays when I was 10,” she said. “My first was a variety show called ‘Friday Night Live.’ I had sketches for different shows. I took ads. I had a product named vomelette, the omelette made of vomit.”

As she got older, she integrated some of her real-life experiences into her writing. Some of the bullies in her eighth-grade class voted her “ugliest girl in school” in an online poll. “That was one of the first things that happened to me, where I was like, oh I’m going to use this,” Akhavan said.

At Smith College, she studied theater and film. “I fell in love with this guy and we were together for years,” she said. It was only later that she identified as bisexual. “It wasn’t a deep dark secret. I knew not to talk about it at first. Then I fell in love with a woman.”

“Appropriate Behavior” started out as her thesis as a graduate student at NYU. She wrote the script over a year and was able to finance it independently through the London-based Parkville Pictures. The shoot took only 18 days in Brooklyn.

Being the star of the film, she said, allowed her to relate to her actors better.

“I’ve been on endless shitty shoots,” Akhavan said. “I made some things really clear — I don’t want to be miserable, I don’t want to be hungry. And I don’t want everyone working exhausted. Let’s work around those parameters and I’ll make compromises as I sit fit.”

As a young female director, Akhavan is something of an anomaly in the industry. Only two of the top-100 grossing films of last year were directed by women. But this statistic doesn’t deter Akhavan, who already has an idea for her second feature.

“People are complaining about women aren’t making decisions in Hollywood and there’s something scary about that,” she said. “But I also think the work female directors are doing it doesn’t apologize for itself and it doesn’t make any compromise. To do that, I’m guessing, it seems like maybe you have to work outside the system.”

“The most exciting voices in my class in film school were coming from women,” Akhavan added. “That said, I’d like to see where we all are in five or 10 years.”

Even though she’s done editing her film, she intends to make a special director’s cut — just for her dad, with toned-down loved scenes. “My brother is the one most grossed out,” she mused. “My mom, I think she’ll be ok. She read the script.”

And as she prepared for Sundance, she had another pressing problem on her mind.

“What am I going to wear?” Akhavan asked. “Who has clothes size 10? Nobody! It’s like Larry’s Big and Tall and JCPenney. I need a team.” After Sundance, she could have one soon enough.