TRIGGER WARNING** about helping drug addicted friend

My bestfriend met a guy a few months ago and sadly started smoking crack with him.. She's since gave her son up to her mom because of fear he'd get taken away(and selfishness of choosing the drug over him).. She messaged me today upset because she's now apparently homeless. She wanted her and this new boyfriend of hers to come stay here .. I told her I'll always be there for her but I don't feel comfortable with that guy coming in my house because I don't know him whatsoever and I have a 3 year old daughter and pregnant. Luckily she got her dad to pick her up so we'll see how that goes but I'm planning on going to talk to her in person asap. I'm going to talk to her and offer to help find her a good way to get some help. She knows my home is open to her if she wants me to help her and it's her and her alone(unless she had her son) . I'm wondering if she were to come stay here, is it possible for me to help her detox from crack from the comfort of my home? Or does she need to be in the care of a doctor while detoxing? If it's possible to help her while staying at my house, what are some things I need to do to keep her comfortable while she goes through withdrawals?

Please no negative comments , I just want to help her. I just want to know if that's a possible backup plan she might feel more comfortable with instead of going to an actual rehab.. I know counselling will be an important factor as well but maybe she could do both, stay here and go to counselling sessions I don't know, it's just sad to see this happening to her and I know she loves her son, she just needs to get back on her feet and see that her life can be better than this.