A 17 year old girl named Madeline Whittier has a rare disease that causes her to have to stay indoors 24/7 with her filtered air. Her whole life is basically books, her mom, and Carla(her nurse). One day, a moving truck pulls in next door. There she sees Olly. Olly Bright is Maddy’s new neighbor. They get to know each other through emails. The more they get to know each other, the more they fall in love. Olly starts to make Maddy realize that she isn’t really living. This starts the adventures of Maddy’s new life.
The opening scene shows Madeline "Maddy" Whittier (Amandla Stenberg) sitting in what she considers her favorite room in the house. It gives her a nice view of the outside, as she enjoys imagining what it would be like to set foot out there, particularly in the ocean.Maddy explains that she has always lived with a rare condition called severe combined immunodeficiency (SCID), meaning her antibodies are not able to properly fight off infection. Her mother (Anika Noni Rose) has kept her in the house for most of her life after she was a child and suffered multiple ear infections and cases of pneumonia. Maddy's brother and father also died in a car accident years earlier. Her only friends are her nurse Carla (Ana de la Reguera) and Carla's daughter Rosa (Danube R. Hermosillo), who are the only other people allowed in the house. Maddy is part of an online support group where she talks to other people with SCID. She spends most of her time immersing herself in books and writing reviews on them, as well as watching movies with her mom, or building models with an astronaut figure inside.One day, Maddy spots new neighbors moving in next door. She sees Oliver "Olly" Bright (Nick Robinson) riding his skateboard down the street. He looks up at Maddy's window and smiles at her. She smiles back.That night, Olly and his sister Kara (Taylor Hickson) walk over to the Whittier home to give them a bundt cake that their mom made. Dr. Whittier opens the door and politely declines the cake since it's coming from outside. When Olly asks if Maddy is around, Dr. Whittier firmly states she's not and then shuts the door.Over the next few days, Olly gets Maddy's attention from their windows. He fools around with bundt cake at first before writing his number down on the window. Maddy starts texting him and then imagines their conversation as though she were sitting in her model diner. They talk about their backgrounds, including Maddy's sickness and the deaths of her father and brother, as well as Maddy's desire to see the ocean.Both Carla and Rosa know that Maddy is into Olly. While her mother is away, Carla invites Olly to go to the house, but he must maintain a distance from Maddy so he can't get her sick. The two talk for a while and hang out.Later on, Maddy sees Olly in a fight with his father. Olly strikes the first blow before his father hits him back harder. Maddy runs outside with concern toward him. Dr. Whittier sees this and runs after Maddy. She pulls Maddy back into the house after she Maddy tries to help Olly. Dr. Whittier scolds Maddy, and then Maddy starts to throw up in the sink. Her mom puts her to rest and then gently tells her that she can't see Olly again.Dr. Whittier fires Carla for letting Olly in the house. She tearfully says goodbye to Maddy. Dr. Whittier hires a new, stricter nurse to care for Maddy. She and Olly continue to communicate privately. One afternoon, Maddy goes into her favorite room and sees that Olly taped dozens of pictures of the ocean, with a note saying that every ocean deserves to be seen by her.Maddy writes a letter to her mother saying she will be gone. She goes over to Olly's house and says she bought two plane tickets to Hawaii. Olly tells her to go back home for her safety, but Maddy claims that she's been taking a medication that is keeping her well for now. Convinced, Olly drives them both to the airport.Dr. Whittier finds Maddy's note. She spots Kara walking down the street and asks her where Maddy and Olly are, but Kara knows just as little as she does.Maddy and Olly make it to Hawaii. They drive to a shack they've rented out, and Maddy goes to buy a swimsuit. They go to the ocean where Maddy swims for the first time. They then try out cliff-diving. Maddy has the time of her life. Later that night, Maddy and Olly make love for the first time.The next day, Maddy gets sick and she passes out. Olly takes her to the hospital, and Maddy wakes up back home. Dr. Whittier is not angry, because she feels that Maddy has learned her lesson from this experience. Maddy is then forced to cut Olly out of her life, feeling it is best for both of them to stop seeing each other.Olly moves back to New York City with his mother and sister to leave his father behind for good. Maddy doesn't get a chance to say goodbye. Later, she receives a phone call from a doctor that treated her in Hawaii. When Maddy mentions she has SCID, the doctor suggests that there is no indication of that disease in Maddy's system. Maddy then goes through her mother's files to find anything on SCID. When Dr. Whittier gets home, Maddy asks her if she really is sick. Dr. Whittier continues to dodge the question. Maddy runs outside, and her mom only tries to get her to go back without ever answering Maddy. Maddy runs away from her.Maddy goes to see a doctor to confirm that she never had SCID. Her immune system is only weak because it hasn't been properly exposed to regular viruses or infections. Angry, Maddy stays with Carla and Rosa. When she finally sees her mom again, Dr. Whittier tearfully admits that she lied to Maddy because she didn't want to lose her the same way she lost her husband and son.Maddy decides to go to New York City to visit Olly. She suggests that she will eventually forgive her mother. As Maddy hops on the plane, we see Dr. Whittier talking to Carla, presumably to apologize to her. Maddy sends Olly a message to meet her in a book store the following morning.Maddy goes to the book store. Sure enough, Olly is there reading a book. The two reunite and kiss before heading out for an adventure in the city.