The Uniform Code of Military Justice (UCMJ) is the U.S. military’s legal canon. It establishes laws that you must abide by if you are a service member in any one of the branches of the armed forces. Altogether, the UCMJ contains over 100 unique punitive offenses, each with its potential maximum sentence and some with a mandatory minimum sentence.
The Manual for Courts-Martial is the official handbook of the UCMJ. It describes the elements required to convict a service member of an offense, as well as a range of possible sentencing options if a soldier is convicted. The manual is freely available online for service members.