Integrating Blocks with Custom PHP Development

I am stuck on a problem integrating Blocs with custom php development. The problems arises when we need to update a Blocs project, which has been previously exported and integrated into our custom php app. When we push changes through any of the Blocs projects we used to put our app together, we have to go through significant rework to re-apply the changes we made to the exported code from blocs.

Here is an example, input element as it is exported from Blocs:

<input class="form-control" id="input_2323" placeholder="Book title" />

The change we made when using this as part of our custom php app was to add a value attribute, pre-filled with a value our app has in $_SESSION in the context of where this is used. That looks like this:

<input class="form-control" id="input_2323" placeholder="Book title" value="<?= $_SESSION['book_title']?>" />

It would be awesome if we could add the value attribute with the embedded php into the Blocs project. This would save us an immense amount of work and allow us to make a lot more upgrades to our app.

What is the best solution to this scenario?

Any information you can provide will be very much appreciated.

Thank you.