Basic workflow (The answer was not specific to you for general users)
-
Make a bezier curve
-
Set the handles to vector
-
Model a mesh to extrude along the curve
-
Convert the extrusion to a curve
-
Set the bezier curves’ bevel object to the extrusion
-
Check fill caps
-
Set the bezier shape to 2D in the object data tab
-
Extrude corners