Git Product home page Git Product logo

chess-teacher-front-end's Introduction

ChessTeacher Front End

This is the main frontend repository for the software part of a P2 project created by SW2 group 8 at Aalborg University Copenhagen.

Local Development

Copy .env.local.sample into .env.local and .env.sample into .env, and add the credentials obtained from the Firebase project admin to it.

Firebase Emulators

The Firebase Emulator Suite UI can be accessed at localhost:4000.

Running the local development environment

To start the Docker Compose project, run:

docker compose up -d

or, when using JetBrains WebStorm, by running the Docker Compose run configuration.

Then, start a new shell session in the server container:

docker exec -it chess-teacher-front-end-server-1 /bin/zsh

The first time the project is cloned, or when dependencies in package.json or package-lock.json have changed, in the server container run:

npm install

Now the development server can be started in the server container:

npm run dev

The front end is now accessible at localhost:3000.

When code is pushed to the remote repository, the Formatting And Linting workflow is run. Therefore, check your code for errors before committing and pushing by running the tools in the server container first:

npm run prettier && npx eslint .

To check whether the project can be compiled for production, run the build command:

NODE_ENV=production npm run build

Then, start the production server with:

NODE_ENV=production npm run start # WARNING: THIS WILL USE THE PRODUCTION FIREBASE RESOURCES!

After a finished development cycle, exit the server container and run:

docker compose down

Development Containers (Visual Studio Code)

...

chess-teacher-front-end's People

Contributors

audio-engineer avatar madsheilmann avatar danar435 avatar texwo avatar sebastianmygind avatar

Watchers

 avatar  avatar

Forkers

bearnard

chess-teacher-front-end's Issues

Online multiplayer

As much as I like playing against a bot that does random moves (the only way I can win (sometimes)), the game needs to be played by two REAL people

Move Stockfish image development to new repository

The Dockerfile in the stockfish/ directory and related files/logic should be moved to a new repository dedicated to Stockfish API development. Furthermore, the Docker Compose stack and documentation should be updated to accomodate this new setup, and a simple sample code should be added.

Update Prettier configuration

The Prettier configuration should be updated to only include the file types and directories that are actually relevant

Remove changelog

It was decided to remove the changelog again. Please remove changelog.

Configure/fix board orientation

When a game is running, the black player should see the board upside down, while the white player should keep the current board orientation.

As for selecting a color, there are two options:

  1. Assume that no games are running and the first player logs in - they should be able to open a new game from the lobby and select which color they want to play. When another player logs in, they should be forced to play the other side.
  2. A color is chosen at random when the first player opens a new game.

Basic lobby functionality

Using a button to join the temporary '123' lobby and handle logic when it comes to who's playing and who's spectating

Set up debugging

Currently, no debugging capabilities are enabled, but are necessary for the project to proceed. Debugging should therefore be enabled.
Unfortunately, debugging Next.js on Docker is currently broken. See e.g. vercel/next.js#53127. Therefore, a temporary patch should be created to work around some of the issues.

Improve `README.md`

The project README.md should include more information about how to start, run and develop the project, and general information about the project.

Add Stockfish image

There should be a simple Stockfish image so the developers can play with the software in a containerized environment before it gets deployed as a service to the cloud.

Update development container configuration

The development container configuration should be updated to use the mcr.microsoft.com/devcontainers/typescript-node:20 image instead and select the correct TypeScript version in the workspace. Also, support for Live Share should be added.

Update Stockfish image

The Stockfish image should be updated. It should include a variety of usage modes, e.g.:

  1. Run Stockfish over TCP
  2. Access container over SSH
  3. Run Stockfish directly

Add chat components

A chat component library should be added and some simple interaction with the chat made possible

Update documentation

The project documentation should give more insight into local development, especially the Stockfish image, Docker Compose and formatters/linters

User Supervisord in Stockfish container

Since we are running two or three processes in the container (stockfish, sshd and tcpserver), it makes sense to use Supervisor to manage them.
Supervisor should be set up to manage the processes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.