https://github.com/audio-engineer/chess-teacher-front-end
Next.js front end for ChessTeacher project
https://github.com/audio-engineer/chess-teacher-front-end
chess-game docker nextjs typescript university-project webapp
Last synced: about 2 months ago
JSON representation
Next.js front end for ChessTeacher project
- Host: GitHub
- URL: https://github.com/audio-engineer/chess-teacher-front-end
- Owner: audio-engineer
- Created: 2024-02-08T11:34:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-29T14:41:35.000Z (about 2 years ago)
- Last Synced: 2024-05-31T06:41:14.846Z (about 2 years ago)
- Topics: chess-game, docker, nextjs, typescript, university-project, webapp
- Language: TypeScript
- Homepage: https://chess-teacher-front-end.vercel.app
- Size: 4.3 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# 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`](./.env.local.sample) into `.env.local` and [`.env.sample`](./.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](http://localhost:4000/).
### Running the local development environment
To start the Docker Compose project, run:
```shell
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:
```shell
docker exec -it chess-teacher-front-end-server-1 /bin/zsh
```
The first time the project is cloned, or when dependencies in [`package.json`](./package.json)
or [`package-lock.json`](./package-lock.json) have changed, in the `server` container run:
```shell
npm install
```
Now the development server can be started in the `server` container:
```shell
npm run dev
```
The front end is now accessible at [localhost:3000](http://localhost:3000/).
When code is pushed to the remote repository, the
[Formatting And Linting](./.github/workflows/formatting-and-linting.yml) workflow is run.
Therefore, check your code for errors before committing and pushing by running the tools in the `server` container
first:
```shell
npm run prettier && npx eslint .
```
To check whether the project can be compiled for production, run the `build` command:
```shell
NODE_ENV=production npm run build
```
Then, start the production server with:
```shell
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:
```shell
docker compose down
```
### Development Containers (Visual Studio Code)
...