In the early aughts Mindy Kaling was best known as a writer and actor on the workplace comedy “The Office.” Taking that training with her own interest in romantic comedies, she conceived a vehicle for herself that set out to blend the two genres. First premiering on Fox in 2012, “The Mindy Project” went on to 117 episodes, six seasons and one notable network change (to streaming service Hulu mid-way through its run) before Kaling was ready to say good-bye.

“I really fell in love with the format where the main character was very flawed. It was something you had seen countless times on sitcoms with men, but you hadn’t seen with women. And I was so excited to play that part in a bigger capacity than I had,” Kaling says of her earliest pitch for the show.

The character of Mindy Lahiri was born out of Kaling’s desire to explore a woman, who “like many of us, becomes fixated on the things that we don’t have.” So while the show started with her already on her way to being a successful doctor with a killer wardrobe, she was more of a mess personally – in part because of unrealistic expectations set up by the romcom movies she obsessed over in her youth and in part because working 60-70 hours a week didn’t leave her a lot of time to date. But she was also born from Kaling’s studies.

Related

Kaling compares Mindy’s journey to that of Odysseus’ in “The Odyssey.” “Any hero has to face trials in order to get to what they want,” she says. While Odysseus had to be “batted around the Mediterranean for years” before he could reunite with his love, Mindy, too, had to face trials. Never designed to be a conventional “angelic” lead or “moral compass” of the characters, Kaling felt it would not have been authentic to give Mindy a traditional path to love and happiness.

The show centered on the character of Mindy “becoming the best version of herself” through the years and showcased her growth through her relationships with a rotating and equally evolving group of friends, co-workers and lovers. The first three seasons of “The Mindy Project” saw a number of cast changes as executive producers Kaling and Matt Warburton let the show tell them what it should be. While Warburton admits that the changes “bothered some people at the time,” he credits them for also “saving the show” in the long haul.

“We were completely flexible,” Warburton says. “Our one North Star was the POV of this really interesting character in Mindy. As long as we were in the head of that character, it kind of didn’t matter where the rest of the show lived.”

This meant that through the years the show didn’t shy away from turnover at fictional doctors’ office Shulman & Associates, be it doctors including Peter (Adam Pally) and Jody (Garret Dillahunt) joining the practice or a core character like Danny (Chris Messina) leaving, which gave the show a chance to reinvent itself in the latter half of its run. It also meant that some characters, such as Jeremy (Ed Weeks) or Beverly (Beth Grant) revealed different layers of their personalities as time went on.

Although the first three seasons of “The Mindy Project” received full season orders at Fox, Warburton says that they didn’t really feel like they had true job security. “A lot of the time we were shooting the finale and we didn’t know if we were going to come back for the next season,” he recalls.

Ike Barinholtz, who first joined the show as a writer and then went on to star as Mindy’s right-hand nurse Morgan and even direct some later season episodes, says there was a lot of pressure in the first few years because of the episode order and traditional broadcasting model.

“We were still living in that overnight numbers model, so every Wednesday morning, you’d look at Twitter and go, ‘Oh s–t! How did we go from a 1.3 to a 1.2?’ That pressure is very real, and Mindy never wanted to let us down,” Barinholtz says.

“The Mindy Project” started with the wedding of Mindy’s ex and will end with the nuptials of her co-workers.

In those first three seasons, the show burned through story quickly in case there wasn’t another chance. Then in May 2015, the hammer fell: Fox decided not to move forward with a fourth season, leaving the characters dangling in a cliffhanger of Mindy being pregnant with Danny’s baby and Danny making a grand gesture by flying to India to introduce himself to her parents.

Only a week after the broadcast network pulled the plug, Hulu swooped in and ordered a 26-episode fourth season.

“We learned how to put our foot on the gas pedal at Fox because we had to, but then we got to do that in later seasons because we wanted to,” Warburton says. “Once we got to Hulu, we knew how many more seasons we were going to do, and we knew they were going to let us, so we got to really plan.”

Although being on a streaming service that didn’t answer to the same Standards & Practices of a broadcast network provided more freedom, the team took extra care to make sure “The Mindy Project’s” DNA remained intact. “Your show lives long past when you first air it, so it was very important to us that 10 years from now a young woman watching the show isn’t going to know the difference between ‘Oh that was a Hulu episode and that was a Fox episode.’ We really wanted to make sure it was the same show,” Warburton says.

While being on Hulu allowed “The Mindy Project” to take some larger storytelling swings in fantasy episodes such as the fourth season premiere “While I Was Sleeping,” in which Mindy imagines her life if she had never fallen in love with Danny, as well as the fifth season’s “Mindy Lahiri Is a White Man” or “Hot Mess Time Machine,” the core of the show remained Mindy’s character growth.

“We wanted to evolve Mindy from the person you saw in the pilot, but still be the person you loved before you knew too much about her,” Warburton says.

After all, over the course of the seasons, Mindy’s dogged determination to have it all, and her unwillingness to compromise on the way she got it all – whether it meant pounding two bear claws every morning, giving up her beloved walk-in closet so her infant son could have a real space of his own, or getting divorced when she realized her marriage wasn’t her true happily ever after – inspired viewers across demographics.

“As a minority woman in media and entertainment, you were only allowed to be a role model. That’s the only way you could be portrayed on TV and in film, certainly six years ago,” Kaling says. “If you’re anything but, then there’s enormous amount of pushback and pressure for you to be that way. But the biggest thing the show has managed to do is never compromise. And I think the thing I’m most excited about with the show is to watch it stand the test of time and see young women – particularly young women of color – watch the show in five years and see she didn’t have to be perfect.”

In wrapping up the series with a sixth and final season, therefore, the most important thing was to “protect the character and pay off what the audience has been rooting for,” Warburton says. And this meant striking a balance of “hard jokes and comedy with real emotion” in order to deliver “earnest moments and character epiphanies.”

“I’m a little bit of a traditionalist,” Kaling admits. “It doesn’t have to be a happy, saccharine ending, but I want you to feel closure.”

But it was also important to be able to “live in the moment and have fun with” the show, per Barinholtz. “We felt so lucky to have this thing that we created that people responded to, and we wanted to enjoy it as much as possible,” he says. “The mood of the set comes from who fills it, and very early on we realized we were very lucky to be making each other laugh. Between the cast and the crew and the production staff there were more than 100 people, and I’ll work with them again, but we’ll never have the exact same group doing the exact same thing, and that camaraderie is extremely special. You hope for it, but you don’t get it that often.”

Sign Up for Daily Insider Newsletter

Neil Gaiman has spent two years working on the TV adaptation of his and Terry Pratchett’s novel “Good Omens” and told an international TV crowd this week he dedicated himself to the task to honor a request from his friend and co-writer, who died in 2015. “I didn’t in any real sense of the word [...]

The stars of Showtime’s new late-night series “Desus & Mero” stand ready to unite a bitterly divided nation with rapier wit delivered with Bronx flair. Desus Nice and the Kid Mero were revved up Thursday night as the they gathered with friends, family and crew members in at the Clocktower in Manhattan for the premiere [...]

Three months after Endemol Shine told its management it was calling off the sales process, talks are again underway with French company Banijay Group over a possible sale, Variety has confirmed. Banijay had previously made a bid to acquire Endemol Shine, the joint venture between 21st Century Fox and Apollo Global Management that is behind [...]

Jussie Smollett has been removed from the final Season 5 episodes of the Fox series “Empire” in the wake of his arrest Thursday morning. “The events of the past few weeks have been incredibly emotional for all of us” said series executives Lee Daniels, Danny Strong, Brett Mahoney, Brian Grazer, Sanaa Hamri, Francie Calfo and [...]

Emmy winner and Oscar nominee Ava DuVernay is among the six notable industry figures who have been appointed to the Television Academy’s executive committee by new chairman/CEO Frank Scherma. DuVernay, whose recent TV credits include the documentary “13th” and drama “Queen Sugar,” will be joined on the committee by HBO programming president Casey Bloys; former [...]

The BBC has greenlit “The Goes Wrong Show,” a new series based on Mischief Theatre’s popular “The Play That Goes Wrong” stage production about a troupe that puts on disastrous plays. The stage show has transferred from London’s West End to Broadway for a J.J. Abrams-produced version described by Variety as “a broad, silly and [...]

As the Jussie Smollett saga continues to unravel, late night hosts are echoing the incredulity expressed by many by poking fun at the “Empire” actor’s alleged attempt to fake a hate crime, reportedly because he was dissatisfied with his salary. “This dude may have faked a hate crime just to get a raise?” asked Trevor [...]