---


[](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/build.yml)
[](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/deploy-to-production.yml)
[](https://GitHub.com/antoinezanardi/werewolves-assistant-web-next/releases/)
[](https://github.com/semantic-release/semantic-release)
[](https://github.com/antoinezanardi/https://img.shields.io/github/license/werewolves-assistant-web-next.svg/blob/main/LICENSE)
[](https://snyk.io/test/github/antoinezanardi/werewolves-assistant-web-next?targetFile=package.json)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
## ๐ Table of Contents
1. ๐บ [What is this app ?](#what-is-this-app)
2. ๐ [Available roles](#available-roles)
3. ๐จ [Installation](#installation)
4. ๐ [Build](#build)
5. ๐ฏ [Tests](#tests)
6. ๐ฟ [Env variables](#env-variables)
7. โ๏ธ [Code analysis and consistency](#code-analysis-and-consistency)
8. ๐ [Releases & Changelog](#versions)
9. ๐ [GitHub Actions](#github-actions)
10. โจ [Misc commands](#misc-commands)
11. ยฉ๏ธ [License](#license)
12. โค๏ธ [Contributors](#contributors)
## ๐บ What is this app ?
Werewolves Assistant Web is a Nuxt Web App using the Werewolves Assistant API. It helps you, the game master, to manage your games of Werewolves Of Millers Hollow.
This is the **next** version of the current **[Werewolves Assistant Web](https://github.com/antoinezanardi/werewolves-assistant-web)**. It is still under development.
#### ๐ค Want to know more about this awesome project ? **Check out the dedicated about page**.
## ๐ Available roles
| 
**Werewolf** | 
**Big Bad Wolf** | 
**Accursed Wolf-Father** | 
**White Werewolf** |
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| 
**Villager** | 
**Villager-Villager** | 
**Seer** | 
**Cupid** |
| 
**Witch** | 
**Hunter** | 
**Little Girl** | 
**Defender** |
| 
**Elder** | 
**Scapegoat** | 
**Idiot** | 
**Two Sisters** |
| 
**Three Brothers** | 
**Fox** | 
**Bear Tamer** | 
**Stuttering Judge** |
| 
**Rusty Sword Knight** | 
**Wild Child** | 
**Wolf-Hound** | 
**Thief** |
| 
**Angel** | 
**Pied Piper** | 
**Scandalmonger** | 
**Prejudiced Manipulator** |
| 
**Actor** | 
**Devoted Servant** | | |
## ๐จ Installation
To install this project, you will need to have on your machine :


We recommend to use the node version specified in the `.nvmrc` file.
**If you don't have `pnpm` installed, you can still use `npm` for all commands below, but we recommend to use `pnpm` for faster and more reliable installs.**
Then, run the following commands :
```bash
# Install dependencies and Husky hooks
pnpm install
# Run the app in dev mode
pnpm run dev
```
The above command will start the app in development mode and watch for changes on local.
## ๐ Build
In order to build the app for production, run the following command :
```bash
# Build the app
pnpm run build
```
## ๐ฏ Tests
### ๐งช Unit tests

### ๐ฝ Mutant testing

[](https://dashboard.stryker-mutator.io/reports/github.com/antoinezanardi/werewolves-assistant-web-next/main)
You can also check the **[mutation testing report](https://dashboard.stryker-mutator.io/reports/github.com/antoinezanardi/werewolves-assistant-web-next/main#mutant)**.
### โถ๏ธ Commands
Before testing, you must follow the **[installation steps](#installation)**.
Then, run one of the following commands :
```bash
# Run unit tests with coverage
pnpm run test:unit:cov
# Run unit tests only on staged files (run on pre-commit)
pnpm run test:unit:staged
# Run mutant tests with coverage
pnpm run test:stryker
# Run mutant tests with coverage from scratch (without using the incremental file)
pnpm run test:stryker:force
```
## ๐ฟ Env variables
Environnement files are available in the **[env directory](https://github.com/antoinezanardi/werewolves-assistant-web-next/tree/main/env)**.
You can create a `.env` file in this directory to override the default values when starting the API locally with `pnpm run dev` command.
Environment variables are :
| Name | Description | Required | Default value | Limitations |
|:-----------------------------------------------:|:-----------------------------------:|:--------:|:-------------:|:-------------------:|
| `NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL` | URL of the Werewolves Assistant API | โ
| โ | Must be a valid URL |
## โ๏ธ Code analysis and consistency
### ๐ Code linting & formatting

In order to keep the code clean, consistent and free of bad TS practices, more than **300 ESLint rules are activated** !
Complete list of all enabled rules is available in the **[eslintrc.config.js file](https://github.com/antoinezanardi/werewolves-assistant-web-next/blob/master/eslintrc.config.js)**.
### โถ๏ธ Commands
Before linting, you must follow the [installation steps](#installation).
Then, run one of the following commands :
```bash
# Lint
pnpm run lint
# Lint and fix
pnpm run lint:fix
# Lint and fix only on staged files (runs on pre-commit)
pnpm run lint:staged:fix
```
### ๐ฅ Project quality scanner
Multiple tools are set up to maintain the best code quality and to prevent vulnerabilities :

You can check the **[CodeQL analysis report here](https://github.com/antoinezanardi/werewolves-assistant-web-next/security/code-scanning)**.

SonarCloud summary is available **[here](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)**.
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
[](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-web-next)
## ๐ Releases & Changelog
Releases on **main** branch are generated and published automatically by :

It uses the **[conventional commit](https://www.conventionalcommits.org/en/v1.0.0/)** strategy.
Each change when a new release comes up is listed in the **CHANGELOG.md file**.
Also, you can keep up with changes by watching releases via the **Watch GitHub button** at the top of this page.
## ๐ GitHub Actions
This project uses **GitHub Actions** to automate some boring tasks.
You can find all the workflows in the **[.github/workflows directory](https://github.com/antoinezanardi/werewolves-assistant-web-next/tree/main/.github/workflows).**
### ๐ข Workflows
| Name | Description & Status | Triggered on |
|:------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------:|
| **[โ๏ธ Build](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/build.yml)** | Various checks for app health, code quality and tests coverage
[](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/build.yml) | `push` on `develop` and all pull requests to `develop` |
| **[๐ Lint PR Name Into Develop Workflow](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/lint-pr-name-into-develop.yml)** | Checks if pull request name respects `conventionnal-commit` rules
[](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/lint-pr-name-into-develop.yml) | `pull-request` `created` or `updated` |
| **[๐๏ธ Upsert PR Release Workflow](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/upsert-pr-release.yml)** | Creates or updates pull request to `main` depending on commits on `develop` since last release
[](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/upsert-pr-release.yml) | `push` on `develop` |
| **[๐ท๏ธ Release Creation Workflow](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/release-creation.yml)** | Creates a new release using `semantic-release` with tag and updated changelog
[](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/release-creation.yml) | `push` on `main` |
| **[๐ Deploy To Production Workflow](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/deploy-to-production.yml)** | Deploys app with last tag version to `Docker Hub` and `GCP`
[](https://github.com/antoinezanardi/werewolves-assistant-web-next/actions/workflows/deploy-to-production.yml) | `tag-creation` |
## โจ Misc commands
### ๐ Create git branch with a conventional name
```shell
pnpm run script:create-branch
```
### โคด๏ธ Create pull request against the `develop` branch from current branch
```shell
pnpm run script:create-pull-request
```
### ๐ฃ To all IntelliJ IDEs users (IntelliJ, Webstorm, PHPStorm, etc.)
All the above commands are available in the **.run directory** at the root of the project.
You can add them as **run configurations** in your IDE.
## ยฉ๏ธ License
This project is licensed under the [MIT License](http://opensource.org/licenses/MIT).
## โค๏ธ Contributors
There is no contributor yet. Want to be the first ?
If you want to contribute to this project, please read the [**contribution guide**](https://github.com/antoinezanardi/werewolves-assistant-web-next/blob/master/CONTRIBUTING.md).