Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

audio-engineer/chess-teacher-front-end

Repository files navigation

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)

...