Categorise and roughly ...
Published by Jeremy Biddle, Engineering Director at Bluewater Bio
Categorise and roughly quantify the sources of water considering the levels of contamination. How easy is it to separate toilet waste and any other highly contaminated waters from relatively clean water like shower waste.
Second consider the uses for that water and the critical quality parameters that must be maintained. Uses include irrigation of crops or non-food plants, toilet flushing, watering animals, etc.
Then look at how easy and costly it would be to match source against use using the necessary level of treatment which might be nothing, a sand filter or simple disinfection using bleach or other low tech methods.
Do NOT try to treat all the wastewater as others have suggested unless water scarcity is a major issue. It will be costly and create significant health risks for your community.