Architecture of Online Chess (2-player web-based board game)?

I’d like to try to create an application where 2 players can play chess online. The (possibly) novel feature would be that the process for joining a game would be similar to how Typeracer works. The first player creates a lobby then shares a link. The friend can then click the link to join the session immediately.

However, I’m a beginner when it comes to how information is shared over the internet. I’ve only created a few REST APIs and games in Java/Python so a lot of this would be new to me.

The first question I have is how/where would I actually implement the logic for this game? Would everything be done client-side (I’d probably use React so I’d then have a js library to hold all game rules) Or is everything done on the server?

Also, how would I keep the player’s game clients in sync? I’ve heard about websockets but any elaboration would be helpful.

Lastly, how could I go about implementing the feature where users can share their game link to get the other player to join?

For context, I have quite a bit of experience with React for UI, I’ve used NodeJS on the server, and I’m currently learning about how to create web APIs with ASP.NET web API (C#). I figure that I’ll be able to create the board UI in React and handle any animations with CSS. If that’s not a good idea let me know!

Overall I’m not really sure how I’ll tie this all together so a big picture view might help; and I’ve love to hear about any frameworks or tools that might make this job easier; thanks for the help in advance!

Go to Source
Author: Brad Stevanus