As of today, there is no known literary sources explaining how the Bible was written by eyewitnesses. There are many theories ranging from God inspired to the creativity without the aid of the divine. Until today, We knew more about how the Biblical text was copied from one century to another than we know about how the Bible was written.
We now know the tools, literary method, and the mechanical process how the vast majority of the Bible was written. The knowledge of how the Bible was written provides us with a different way of looking at scripture. Instead of looking at the published work we can now reconstruct the prior drafts that the author created to form his work. This is largely thanks to the book of Revelation which was never a finished work and as a result many clues were left in how it was constructed.
The book, How John Wrote the Book of Revelation: From Concept to Publication, provides a detailed description of how John wrote the book of Revelation. It is the closest thing to looking over his shoulders as he wrote Revelation. While the hyperlinks below will provide the basic description of how the scriptures were written. The result is that with that knowledge on can understand the literary technique known as Genetic Literary Reconstruction.