Skip to content

A website for playing various 1v1 games with friends (chopsticks, tic tac toe, etc.)

Notifications You must be signed in to change notification settings

SVWEFSBRWHWBCOTSEID/game-website

Repository files navigation

game-website

Website for playing silly games online.

About

The design of this website was heavily inspired by lichess.org. The concept of Pokemon Chess was borrowed from pokemonchess.com.

Running locally

Make sure you have a compatible version of Node installed. If you haven't already, install the required dependencies with

npm install

This website is built with TypeScript, TailwindCSS, and Next.js 13. To run the website locally,

npm run dev

will start the Next.js development server on 127.0.0.1:3000.

Many parts of the website expect the backend server to be running on 127.0.0.1:8080. See the backend README for how to set up and run the development server.

Architecture

Backend fetches are cached using Next 13's data fetching API to eliminate unnecessary queries. Specifically,

  • User objects from /api/user/{username} are cached under the user-{username} tag and revalidated on-demand when the user object changes (when that user registers for an account, starts or finishes a game, edits their profile, etc.)
  • Game info from /api/game/{id} is cached under the game-{id} tag and revalidated on-demand when a new game under that id is created.

About

A website for playing various 1v1 games with friends (chopsticks, tic tac toe, etc.)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages