You may have heard about this I dont know .
Lily has a crush on james all along but pretends otherwise because she has high hopes about him in all aspects and he doesnt reach them . Maybe in studies , like in transfiguration , he reaches them occassionally. And at the end of 5th year , he stops with the "romantic gestures" and all . He may go a step further and just tries to be far from her . And he sort of learns to be himself. In 6 th year lily falls hard for him . And the boys and girls of 6th year gryffindors become close .pretty close . Then comes sirius x marlene who are similar in many ways than they care to admit . James and lily have to be friends since all of their friends are friends . But soon after that they become closer. He sort of helps lily with her problems with petunia dearest and severus 'lovely' snape . And 7th year happens and they start flirting openly ( a bit more if they havent done that in 6th year) . Then the 1st hogsmeade trip happens they go with all their friends together and the remaining firends leave them because of a plan sirius and marlene thought of . And the plan pays off well . And rest is yours Lily establishing her relation with marauders , peter being quite stiff about all of it , severus' secret warnings, patrol duties