Goal: Our Org has multiple apps that I would like to extract each app into its own individual package. The goal is to retrieve this package to push to a scratch org and then make it an unlocked package.
Main Problem: I am unable to create a solid package or package.xml that would mimic a specific app and successfully push to a Scratch-Org.
Current progress: Currently I am using "package manager" to select the necessary items that the app requires, however, after retrieving and converting the package, I get a "Push failed" with a bunch of dependency errors while "pushing" to the Scratch-Org.
Questions:
1) What is the best way to create a managed/ unmanaged package or package.xml that will assure a successful full mimic of the targeted app?
2) Are there any decent articles or sources on how to successfully break apart multiple apps, which share resources in an org, into their own individual unlocked package?