[verb て-form] + いるところだ [verb て-form] + いるところです
ているところだ says you are in the middle of an action at this moment. It goes after the て-form of a verb, and the usual reason to say it is that someone has asked what you are doing or interrupted you.
It only works with an action that is under way. A ている that describes a resulting state – まど窓がひらいている開いている, けっこん結婚している – does not take ところ.
The form of the verb before ところだ sets the moment. The dictionary form is just before the action, ている is in the middle of it, and the た-form is just after.
In a past sentence ところだ becomes ところだった, which says what you were in the middle of when something else happened.