Automatically uploading code to Photon

I have an app made by the company I work for that allows you to claim your photon and connect it to a wifi network just like the particle app does. As far as I know, the only way to program the photon is by programming it through the particle web IDE. What we want to do is get the app to automatically program the photon once it is connected to the network. This would also give us the ability to give the photon updates every now and then. This is probably a long process and I have no idea how to go about this. Does anyone have an idea of the steps needed to take in order to do this? Thanks for the help in advance.

Nope, there are other ways to build a project and also wired ways to upload binaries to the devices.
There are also API endpoints to upload a pre-built binary OTA.
And if you/your company is intending to be a organizational product creator the Particle Dashboard for Creators will provide defered update features too.
Otherwise you could look in this thread to see the answers to a similar question
Installing update from a sketch