<p>Not a lot is ever explained in the anime. (Hopefully, Season 2 remedies some of that)
</p><p>I think Rui is a self educated guy, he learned coding from other hackers and managed to make his own software to build his social network empire, which made him rich enough to own that apartment we see him in.
</p><p>It's not that far fetched an idea, as kid genius prodigies who make millions do exist in the real world. Heck, just last night I read about a 17 year old kid who got a triple major in college and will go on to complete med school at the age of 22
</p><p>He's also trilingual and managed to keep his identity hidden from the world.
</p><p>Not an easy thing to pull off in The Internet Age considering world governments wiretapping the web, credit card transactions, security cameras, GPS, biometrics and everybody and their mother having access to a camera small enough to fit in their pocket to be a paparazzi mob when he walks down the street.
</p><p>I think that's why he dresses in drag, it keeps unwanted attention away from him and he's still in puberty so people can't tell if he's a boy or a girl yet if he hides it well enough.
</p><p>.
</p>