One of my friend serve by standing to the side of table, before the end line. We think her serve is illegal. When I watch some videos of the pro serving from the side, the angle of the camera make them looks like they also standing in front of end line. Is it legal as long as the contact point behind the end line?
A player can stand anywhere when serving, and the serve is legal, as long as the contact with the ball is behind the end of the table.
You often see professional players standing to the side of the table when serving. They stand in this position so they can recover to a strong forehand dominant position. But the service contact is behind the table. So the serve is legal.
For more information about serving legally, please look at this article, which includes some helpful videos too: How to do a legal table tennis serve