For the begging I think something really simple like this would work:
1) Create your own collection. At that step app will have predefined FFG quick build cards added to its database.
2) Start new squadron build:
- select one faction or multiple factions at the same time
- select threat level per faction
3) Clicking "random squad" will create such squadron from the cards from point 1).
- logic should check availability of cards during this randomize process, so for example if I own core set and x-wing t-65 expansion only, I have access to only one proton torpedoes upgrade card, in that case app should not pick Luke Skywalker and Wedge Antilles in one squadron as both quick build cards have proton torpedoes.
- as an option there can be a flag in settings which will disable such check and allows the logic to pick both Luke and Wedge in the same squadron.
I hope such description is enough