From here you can start ,We can create our own custom document library programmatically, here is the code shown below
SPSite site = SPContext.Current.Site as SPSite;
SPWeb web = site.RootWeb as SPWeb;
//Create a new library as the permanent library
Guid customListID = web.Lists.Add("CUSTOM DOCUMENT LIBRARY", "CUSTOM DOCUMENT LIBRARY", SPListTemplateType.DocumentLibrary);
let me know if you need more assistance on this!!