This is a full-stack chess application built with the MERN stack (MongoDB, Express, React, Node), Socket.io, Passport.js, and Stockfish.
- User authentication
- Online chess against other users using Socket.IO
- Games against Stockfish bots
- Engine analysis using Stockfish
- Friend system
This app is currently hosted here. The backend is hosted with a free service, so loading could take up to a minute.
- Clone the repository
- Add dependencies to backend:
cd backend
npm i- Add dependencies to frontend:
cd frontend
npm iCreate a .env file in the backend and frontend and add each of the following variables with their respective values:
VITE_BACKEND_URL: the base url of your backend server
DB_URI: the uri of your mongodb clusterBACKEND_URL: the base url of your backend serverSESSION_SECRET: any secure hexidecimal key used for express session storageGOOGLE_CLIENT_ID: client id for Google Passport authentication Learn MoreGOOGLE_CLIENT_SECRET: clicent secret for Google Passport authentication Learn MoreCLIENT_URL: the base url of your frontend serverNODE_ENV: the environment of your backend server, set to "development" on localhost.
- Start the backend:
cd backend
npm run dev- Start the frontend:
cd frontend
npm run dev