Is okay to pay back family and friends I owe money before filing bankruptcy?
No. Family members and friends are insiders. Payments to insiders within 1 year of filing bankruptcy must be disclosed in your paperwork filed with the court. In addition, you must disclose any payment or transfer of property which was for the benefit of an insider (made within 1 year of filing).
The Trustee in a Chapter 7 case may sue the insider to recover the money or property. Clearly, repaying a friend or family member before filing bankruptcy will cause problems for you and the person repaid.
Wait until after the Bankruptcy case is completed to pay back such people.
Bankruptcy discharges a debt like money owed to family. However, the bankruptcy discharge does not prevent you from paying that person back AFTER the case has been completed. So waiting is a better course of action.