[verb た-form] + ばかり + だ [verb た-form] + ばかり + の + [noun]
たばかり means "have just done": the action happened a short while ago, as the speaker sees it. ばかり goes after a verb's た-form, and the whole phrase then works like a noun: it takes だ or です to end the sentence and の before a noun.
How recent "just" is depends on the speaker. A month, or even a year, still counts if it feels recent.
Most sentences with たばかり go on to say what follows from it. で, なので or だから give it as a reason; なのに complains that something has already gone wrong.
ばかり is a noun here, so it takes な before のに and ので, as a noun does.