How to rebuild a good friendship with an Ex

Breakups can be hurtful, it messes with your emotional well being and sometimes your mental wellness, it is not easy getting over someone you trust so much and you can't imagine life without initially. Now that your life does not revolve around them any more there are things you can do to have them close to you as just good friends without any form of intimacy, that is if you really can't picture your life without them around you.
Though some people would close every form of communication once the relationship
ends, while some will ghost for a while to heal before coming back stronger. Irrespective of how we all handle Breakups, I feel there should be a sense of maturity in handling it, it is okay to cry, it is okay to rant to your friends, it's fine to be silent about it, and it is also fine if you don't want to be friends with that person any more, because some people are naturally toxic and having them around you or in your space will only damage you. For those that will appreciate still being good friends with their ex; The best way you can go about it is;