There were actually four HUGE causes for WW1, treaties and alliances brought many countries into war, the imperialism of some countries scared other countries, and they were "defending" themselves, there was a lot of weapons stocking, and countries were creating gigantic armies, and that threatened other countries, and then we have plain old nationalism.
Charlemagne's friend knew him directly therefore the biography written by his friend would be an example of a primary source being that the author directly experienced him.