Where does IPFS keep the data in a Node.js application?

A couple of days ago I asked this question. It was about where does ipfs keep data in the browser. One person responded that it might keep the data in the browsers indexed db, and other said that browsers aren’t really that reliable. Both answers helped me, and I decided to move my app to desktop with Electron.js. To summarize, I want to create a streaming/sharing music application using ipfs. The app is simple: when a user wants to “upload” a song, ipfs is adding the song, then if some other user wants to play that song, they will get it from the first user. To my knowledge, if someone adds something to ipfs, that data will be stored in their ipfs node, and others can get it from that node. But here are my questions:

  1. I know that if a user has ipfs installed locally, let’s say they installed it with the command line and then ran “ipfs daemon”, their node is activated, and if they add something to ipfs, that data will be stored in a designated folder in their file system. In my app, I use js-ipfs (ipfs-core package). When the app starts, I create a node with ipfs.create(), and when I want to add something I use ipfs.add(). When I add something with ipfs.add() in a Node.js environment or I retrieve some data with ipfs.cat(), where does js-ipfs store that data specifically?

  2. Let’s say that I finish my app, and I distribute the executable to my app. Someone that doesn’t have any ipfs daemon running on their machine locally or anything like that executes my app, and adds something to ipfs through my app or retrieves some some data with ipfs.cat(). Does that executable create an ipfs node inside the running app? Where does the data get stored, somewhere in the running app? (I know that question 1 and 2 are very similar, but I thought that there might be some differences in development and production).

  3. I tried to test if ipfs works through my app. I added a simple buffer resembling a simple random text with ipfs.add(). I successfully got back the CID of the added content, and I kept my app running. Then I tried to retrieve that data with a public gateway, like ipfs. io or dweb.link or others, and I got back 504 gateway timeout. Then I tried to retrieve that data from my local ipfs deamon, and got back the same: nothing. This means that the data I just added through my app is unreachable. Why is that? The whole point in my app is for users to share data, but it seems like I can’t share any data with js-ipfs. What might be the problem?