Can't seem to find my controller class or any file related to the doctype i created

I have created a doctype with the UI. But where is the model json file and controller located so that I can write custom hooks. Driving me crazy, I have checked the entire codebase. But still no luck