There are many online sources for primary documents, some freely available on the web and others by library subscription only. For a long list of library-subscribed resources, see the Historical Sources subject guide.
Here are some good online digital library collections: