Creating new project and i want to integrate home assistant device discovery

Hello there!
Please help me!!!
I have a big project for my degree: ‘Home Automation App’ using a Raspberry Pi 400 and a cloud server in js.
I wanted to integrate the device discovery manually, but it is very hard. And then I found out about Home Assistant integration through API or Websocket and I don’t know how to do it.
Please, if anyone can help me.