The 'best' way to do it depends on what you are looking for!
How often are these scans going to be run?
How often is the API built and updated with the same frontend, and vice versa?
My first instinct is to do all of it at once, but the scans may be prohibitively long depending on what kind of release schedule you are trying to support!