[READ-ONLY] Mirror of https://github.com/danielroe/werewolves-assistant-web-next.
0

Configure Feed

Select the types of activity you want to include in your feed.

JavaScript 64.0%
TypeScript 24.9%
Shell 6.9%
Vue 3.6%
SCSS 0.5%
Gherkin 0.2%
Other 0.1%
40 4 3

Clone this repository

https://git.vm.fail/danielroe.dev/werewolves-assistant-web-next https://git.vm.fail/did:plc:7y2juyxwqd5xbsoxumbsfghn
ssh://git@knot1.tangled.sh:2222/danielroe.dev/werewolves-assistant-web-next ssh://git@knot1.tangled.sh:2222/did:plc:7y2juyxwqd5xbsoxumbsfghn

For self-hosted knots, clone URLs may differ based on your setup.


README.md

logo


TypeScript Nuxt

⚙️ Build Workflow 🚀 Deploy To Production Workflow

GitHub release semantic-release: conventional commits GitHub license DependenciesKnown Vulnerabilities

Technical Debt Duplicated Lines (%) Code Smells

📋 Table of Contents#

  1. 🐺 What is this app ?
  2. 🃏 Available roles
  3. 🔨 Installation
  4. 🚀 Build
  5. 💯 Tests
  6. 🌿 Env variables
  7. ☑️ Code analysis and consistency
  8. 📈 Releases & Changelog
  9. 🐙 GitHub Actions
  10. Misc commands
  11. ©️ License
  12. ❤️ 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. 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 :

Node PNPM

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 :

# 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 :

# Build the app
pnpm run build

💯 Tests#

🧪 Unit tests#

Vitest

👽 Mutant testing#

Stryker

Mutation testing badge

You can also check the mutation testing report.

▶️ Commands#

Before testing, you must follow the installation steps.

Then, run one of the following commands :

# Assure you started test Docker containers (4 databases are created to parallelize tests)
pnpm run docker:test:start

# Run unit tests with coverage
pnpm run test:unit:cov

# Run unit tests only on staged files (run on pre-commit)
pnpm run test:staged # TODO: Fix this command

# 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.

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#

ESLint

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.

▶️ Commands#

Before linting, you must follow the installation steps.

Then, run one of the following commands :

# 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 :

CodeQL

You can check the CodeQL analysis report here.

SonarCloud

SonarCloud summary is available here.

Coverage Duplicated Lines (%) Quality Gate Status

Technical Debt Vulnerabilities Code Smells

Reliability Rating Security Rating Bugs

📈 Releases & Changelog#

Releases on main branch are generated and published automatically by :

Semantic Release

It uses the conventional commit 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.

🎢 Workflows#

Name Description & Status Triggered on
⚙️ Build Various checks for app health, code quality and tests coverage

⚙️ Build Workflow
push on develop and all pull requests to develop
🔃 Lint PR Name Into Develop Workflow Checks if pull request name respects conventionnal-commit rules

🔃 Lint PR Name Into Develop Workflow
pull-request created or updated
🔃️ Upsert PR Release Workflow Creates or updates pull request to main depending on commits on develop since last release

🔃️ Upsert PR Release Workflow
push on develop
🏷️ Release Creation Workflow Creates a new release using semantic-release with tag and updated changelog

🏷️ Release Creation Workflow
push on main
🚀 Deploy To Production Workflow Deploys app with last tag version to Docker Hub and GCP

🚀 Deploy To Production Workflow
tag-creation

✨ Misc commands#

🔀 Create git branch with a conventional name#

pnpm run script:create-branch

⤴️ Create pull request against the develop branch from current branch#

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.

❤️ Contributors#

There is no contributor yet. Want to be the first ?

If you want to contribute to this project, please read the contribution guide.