I suppose you know
-- the CDA section 230 safe harbor provision, under which you are not responsible for copyright infringements by people who post in an open forum
-- the legal nature of an open forum, which is basically that you don't moderate based on opinion (only for topic, tone, or spam)
-- the fair use provisions of copyright doctrine (Wikipedia has an excellent summary)
-- the rule that if you get a DMCA notice, you are required to notify the person who actually posted the material, take down the material, and wait for their response
-- the "counter notice" provisions of the DMCA which you should use if you get a bogus DMCA notice, stating that the notice is invalid and specifying why the material was not infringing (whether this is due to fair use, DMCA-notice-submitter not owning the copyright, etc.)
-- the international law rules which mean that you are usually only subject to copyright lawsuits in your jurisdiction of publication (where your servers are)
This is about the limits of my knowledge (I've never needed more).
And of course I'm assuming you know the difference between copyright, trademarks, and secrets.
If your situation is more complicated than that, you really need to hire a specialist lawyer.