Did James and Lily live there before Peter became their Secret Keeper? I think they did but couldn't one of their friends told someone that they lived there before? Or did they already preform the spell like a year before they died but chose the Secret Keeper a week before they died?

Could James leave the house in October before they died to get food or something like that? Or did they have to stay within their property all the times?

I'm really confused with this so if someone could explain this to me, that would be great. I need it for my story .