+1 to the other comments recommending Zulip over Mattermost. The threading model is fantastic.
Also, for a non-profit teaching coding note that they regularly have interns under the Google Summer of Code program and it's open source, so the students can even help with it.
https://summerofcode.withgoogle.com/programs/2025/organizati...
replies(2):