Play video content Exclusive Details TMZ.com

Amber Portwood went after her boyfriend with a machete ... he wasn't the worse for wear, but their door sure was.

It was like a scene right out of "The Shining" ... Amber and Andrew Glennon got in a heated argument that escalated big time, and according to court documents, she wielded the machete and struck a door with Glennon on the other side.

The machete didn't hit him but Amber allegedly found another way to inflict injury ... by striking him with a shoe while he was holding their one-year-old son, James.

Amber was arrested on 3 felony charges, including domestic battery and criminal recklessness with a deadly weapon, and a judge just slapped her with a restraining order. She can't go near Glennon or their son until the criminal case is resolved.

We broke the story ... Portwood was arrested last week in Indianapolis after Glennon contacted police claiming his and James' lives were in danger.

Glennon claims she also assaulted him with a shoe while he was holding James, and cops noticed marks on his neck when they arrived. He told officers this was not the first time she had struck him. Police contacted Children's Services.

Glennon has filed for an emergency hearing to obtain sole custody of their son too.