SPOILER ALERT: Do not read if you have not watched “Harlem,” streaming now on Amazon Prime Video.

Tracy Oliver’s “Harlem,” a 10-episode half-hour series for Amazon Prime Video, is the latest in her signature line of comedies that center on a group of Black female friends. But this is the one that started it all, according to the “Girls Trip” screenwriter, and the one that is most personal to her.

“I wrote it before ‘Girls Trip’ came out. This is why this is such a passion project and so close to me. I wrote this for free; I wrote this because I had to — at that moment there was just something in me that needed to write something so personal,” Oliver tells Variety.

Although “Harlem” follows a quartet of characters (played by Meagan Good, Grace Byers, Shoniqua Shandai and Jerrie Johnson), it is Good’s Camille who is most modeled after Oliver’s own life, both personally and professionally. In the series, Camille is struggling to win over her new boss (Whoopi Goldberg) in order to receive a promotion for which she feels she was a shoo-in under the old regime (Andrea Martin). She is also having a hard time letting go of complicated feelings for her ex (Tyler Lepley), who is not only engaged to someone else, but also the chef at a newly gentrified restaurant in the neighborhood.

“With Camille and myself as well, I really thought that everything would just work out the way you wanted — and I don’t know where that entitlement came from because my mom, especially, is not very nice,” Oliver says with a laugh. “She was always a realist and never romanticized anything, so I truly don’t know where I got this idea from. Maybe getting lost in rom-coms. I really thought I was going to have a Julia Roberts or Sandra Bullock, except Black, existence. And it blew my mind when it was imploding so epically.”

When Oliver first penned the script, she was used to facing rejection professionally: She had never sold a show, let alone signed an overall deal. “There was nothing that said I would have a steady check coming in. I felt just uncertain and insecure and unstable,” she recalls. She also had her own complicated relationship timing issues with an ex who ended up engaged to someone else, leaving her wondering why “I don’t have any of the shit Julia Roberts said I’m supposed to have, and I’m not even close.” While those specific examples found their way into Camille’s arc for the first season of “Harlem,” on a broader level, she wanted the show to feature women who are “still figuring it out in their 30s” and to show that it’s OK to do so.

When she first wrote the script for “Harlem,” she remembers receiving acknowledgement that it “was a beautiful writing sample” but nothing more. So she tucked it away until “Girls Trip” came out in July 2017. “All of a sudden people are like, ‘What happened to that script?'” Oliver says. “‘Girls Trip’ needed to happen to let me do the thing that I really felt the closest to.”

It hasn’t been a straight shot between the two projects, though. Just a few months after “Girls Trip” premiered, Oliver was tapped to write a redeveloped television pilot adaptation of the 1996 film “First Wives Club.” Her version received a series order in April 2018, and she went to work on those 10 scripts. She also wrote two feature films, “Little” and “The Sun Is Also A Star,” before selling 10 episodes of “Harlem” to Amazon in July 2019.

Even though so much time has passed since she had the initial idea for the show, Oliver says she kept the majority of the story intact from her original vision. She did set it in present-day Harlem, New York.

“I grew up on the East Coast; I spent a lot of time back and forth in New York; and my best memories, my best moments romantically, creatively were inspired by the city,” she says. “I lived in Harlem and just thought it was just so culturally rich. I fell in love with the people and I just felt like everyone was just so effortlessly cool [and] unapologetically who they are. I was still struggling to find myself in that period, but also I really loved the place and it pushed me to grow.”

Oliver wanted to capture her authentic experience in “Harlem” through the friends of her surrogate, Camille, as well. It was especially important to her to tell queer stories within the show because “from the time that I remember having friends until now, I’ve always had someone queer in my social circle,” she explains. “It just felt weird to do a show with women and not have a queer character. That was maybe the only mandate that I had for myself, and that wasn’t to satisfy some box that networks have; it [would have been] just disrespectful and weird to my actual relationships to not include that.”

While Tye (Johnson) is a proudly queer — and boasts being the creator of the only queer dating app — Quinn (Byers) realizes feelings for another woman later in the season. That, too, was drawn from Oliver’s real life: “That particular storyline came about from two real relationships that I have. The guy friend was one that I was like, ‘When you’re ready to talk to me and have that conversation, I’m ready for it.’ The woman friend, I’ve known her since I was 18 years old, and I’ve known her one as one thing and it was really compelling to me that you can meet somebody, have an instant connection, be shocked by that connection, and there was a little bit of shame in it too, I think because she grew up in a certain background that didn’t necessarily encourage that,” she says. “I was just like, ‘Go with what your heart feels’ because I’m corny and romantic like that. But at the same time, I was like, ‘This is this is really interesting that we can have those shifts and allow ourselves to have the courage to go after something that may be repressed in the past.'”

Even the show-within-the-show — a stage musical of “Get Out” that Angie (Shandai) is cast in was inspired by something in Oliver’s life: her expertise with reimaginings. Beyond “First Wives Club,” she was once working on a new version of “Clueless” and was also approached about turning “Girls Trip” into a musical.

“At that point, we hit the point where I was like, ‘No,'” she says. But the experience sparked an idea for her show when she was just spitballing ideas about the next musical and because “Get Out” was so big, she figured they’d bring it to Broadway.

“Mimi Valdes, who’s Pharrell’s producing partner, was like, ‘I kind of love that. And I am going to call my guys who did “La La Land” and see if they want to do it.’ And then they did; they sent sample songs. Once we got them back and were like, ‘These are hysterical,’ we did it,” she says. (It helped that Universal was the studio behind both the film and series so they were able to acquire the rights relatively easily.)

Although it has been a long road to “Harlem,” Oliver is proud to see it come to life and offer a different perspective than the many “New York-set shows were literally gentrifying Black characters out of them” that she remembers from when she was first working on the project.

“There’s a breadth of experience and diversity within even the Black communities. It’s so enormous that you can’t do it all,” she says. “I hope that more creators get the opportunity to tell their own unique stories.”

“Harlem” is streaming now on Amazon Prime Video.