How to Create Simple Calender App

I’m thinking of creating a simple calendar scheduling app similar to Calendly, but I’m trying to figure out how to structure the data storage in the solana program.

For instance, say each available time-slot in my calendar was a separate account, that had the year, month, day, time, and duration of the time slot. It would be simple, then, to have a transaction that will create time-slots, but how I can I have may app list all of the time slots created by a particular user?

There’s no way for me to create an account with an unbounded size, so that I could have one account that has the list of all the time slots for a particular user is there?

I think I just found a hint. It looks like I can use getProgramAccounts() to get a list of all the accounts created by a program, but what if I just want to get all the accounts created by a program that have a certain field in their data?

Do I have to have my app pull down the list of every single account ever created by the program over all time, and then filter on the values in the account? It seems like there would have to be a better way than that.

Edit: Oh, I just found the filters argument, that might work. So then I getProgramAccounts() with a filter that matches only on the accounts that I’m interested in.