Working on projects with people you meet/know isn’t illegal. Getting a real job would be, but not this :)
Unpaid internships are illegal except under some very restrictive conditions.
That said, these things don't seem to make it to court, so you're probably not risking anything by doing them.