Development Workflow when working with data in Craft?

Hey guys,

I’d like to build an extension that helps me edit data within Craft. Therefore it needs to grab the current selection and do something with it.

I started with using GitHub - craftdocs/craft-extension-project-templates: Craft Extension Project Templates and know that there is something like npm run dev in order to have a browser view for the extension.

My only problem is that I don’t know how to work with Craft data e.g. getSelection within that browser cause it will always return nothing.

Is there a good way to mock data or can I even test my extension ongoing within Craft to be able to grab real data?

Thanks for any help!