{"id":13546968,"url":"https://github.com/antoinezanardi/werewolves-assistant-api-next","last_synced_at":"2025-04-02T19:32:09.546Z","repository":{"id":91991946,"uuid":"607133348","full_name":"antoinezanardi/werewolves-assistant-api-next","owner":"antoinezanardi","description":"🐺 Werewolves Assistant API provides over HTTP requests a way of manage Werewolves games to help the game master.","archived":false,"fork":false,"pushed_at":"2024-11-27T11:13:39.000Z","size":36669,"stargazers_count":41,"open_issues_count":3,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-27T11:34:12.966Z","etag":null,"topics":["assistant","nestjs","nodejs","typescript","werewolves-of-millers-hollow"],"latest_commit_sha":null,"homepage":"https://werewolves-assistant.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antoinezanardi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"buy_me_a_coffee":"antoinezanardi","github":["antoinezanardi"]}},"created_at":"2023-02-27T11:38:19.000Z","updated_at":"2024-11-26T09:50:21.000Z","dependencies_parsed_at":"2024-02-05T07:37:00.631Z","dependency_job_id":"fc6b4462-9935-4710-ab6a-40ce180ddf75","html_url":"https://github.com/antoinezanardi/werewolves-assistant-api-next","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinezanardi%2Fwerewolves-assistant-api-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinezanardi%2Fwerewolves-assistant-api-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinezanardi%2Fwerewolves-assistant-api-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinezanardi%2Fwerewolves-assistant-api-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoinezanardi","download_url":"https://codeload.github.com/antoinezanardi/werewolves-assistant-api-next/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246880140,"owners_count":20848819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assistant","nestjs","nodejs","typescript","werewolves-of-millers-hollow"],"created_at":"2024-08-01T12:00:48.952Z","updated_at":"2025-04-02T19:32:09.278Z","avatar_url":"https://github.com/antoinezanardi.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/antoinezanardi","https://github.com/sponsors/antoinezanardi"],"categories":["Examples"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/logo/full/werewolves-logo.png?raw=true\" width=\"400\" alt=\"logo\"/\u003e\n\u003c/p\u003e\n\n---\n\n![TypeScript](https://img.shields.io/badge/-TypeScript-black?style=for-the-badge\u0026logoColor=white\u0026logo=typescript\u0026color=2F73BF)\n![Nest](https://img.shields.io/badge/-NestJs-black?style=for-the-badge\u0026logo=nestjs\u0026color=E0234D)\n![Mongoose](https://img.shields.io/badge/-MongoDB-black?style=for-the-badge\u0026logoColor=white\u0026logo=mongodb\u0026color=127237)\n\n[![⚙️ Build Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/build.yml/badge.svg)](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/build.yml)\n[![🚀 Deploy To Production Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/deploy-to-production.yml/badge.svg)](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/deploy-to-production.yml)\n\n[![GitHub release](https://img.shields.io/github/release/antoinezanardi/werewolves-assistant-api-next.svg)](https://GitHub.com/antoinezanardi/werewolves-assistant-api-next/releases/)\n[![semantic-release: conventional commits](https://img.shields.io/badge/semantic--release-conventional%20commits-Æ1A7DBD?logo=semantic-release\u0026color=1E7FBF)](https://github.com/semantic-release/semantic-release)\n[![GitHub license](https://img.shields.io/github/license/antoinezanardi/werewolves-assistant-api-next.svg)](https://github.com/antoinezanardi/https://img.shields.io/github/license/werewolves-assistant-api-next.svg/blob/main/LICENSE)\n![Dependencies](https://img.shields.io/badge/-dependencies-black?style=flat-square\u0026logoColor=white\u0026logo=pnpm\u0026color=B76507)[![Known Vulnerabilities](https://snyk.io/test/github/antoinezanardi/werewolves-assistant-api-next/badge.svg?targetFile=package.json\u0026style=flat-square)](https://snyk.io/test/github/antoinezanardi/werewolves-assistant-api-next?targetFile=package.json)\n\n[![Tests count](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/tests-count)](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/tests-count)\n[![Scenarios](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/scenarios)](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/scenarios)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fantoinezanardi%2Fwerewolves-assistant-api-next%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/antoinezanardi/werewolves-assistant-api-next/main)\n\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n\n## 📋 Table of Contents\n\n1. 🐺 [What is this API ?](#what-is-this-api)\n2. ✨ [Production and development links](#production-and-development-links)\n3. 🃏 [Available roles](#available-roles)\n4. 🔨 [Installation](#installation)\n5. 🚀 [Build](#build)\n6. 🐳 [Docker](#docker)\n7. 💯 [Tests](#tests)\n8. 🌿 [Env variables](#env-variables)\n9. ☑️ [Code analysis and consistency](#code-analysis-and-consistency)\n10. 📈 [Releases \u0026 Changelog](#versions)\n11. 🐙 [GitHub Actions](#github-actions)\n12. ✨ [Misc commands](#misc-commands)\n13. ©️ [License](#license)\n14. ❤️ [Contributors](#contributors)\n\n## \u003ca name=\"what-is-this-api\"\u003e🐺 What is this API ?\u003c/a\u003e\nWerewolves Assistant API provides over HTTP requests a way of manage Werewolves games to help the game master.\n\nThis is the **next** version of the deprecated **[Werewolves Assistant API](https://github.com/antoinezanardi/werewolves-assistant-api)**.\n\nThis API is used by the **[Werewolves Assistant Web App](https://github.com/antoinezanardi/werewolves-assistant-web-next)**.\n\n#### 🤔 Want to know more about this awesome project ? \u003ca href=\"https://werewolves-assistant.com/about\" target=\"_blank\"\u003e**Check out the dedicated about page**\u003c/a\u003e.\n\n## \u003ca name=\"production-and-development-urls\"\u003e✨ Production and development links\u003c/a\u003e\n\n### 🌐 Production\n\nThe production version of this API is available at **[api.werewolves-assistant.com](https://api.werewolves-assistant.com/docs)**.\n\nThis API is used by the **[Werewolves Assistant Web App](https://werewolves-assistant.com)**.\n\nThe production server is updated automatically with the latest version of the API when a new release is created. (When a new tag is pushed on the `main` branch)\n\n### 🛠️ Development\n\nThe development version of this API is available at **[preprod.api.werewolves-assistant.com](https://preprod.api.werewolves-assistant.com/docs)**.\n\nThis API is used by the **[Werewolves Assistant Web App](https://preprod.werewolves-assistant.com)**.\n\nThe development server is updated automatically when a commit is pushed on the `develop` branch.\n\n## \u003ca name=\"available-roles\"\u003e🃏 Available roles\u003c/a\u003e\n\n**30 different official roles** are available to play :\n\n|                \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/werewolf/werewolf-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Werewolf**                |         \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/big-bad-wolf/big-bad-wolf-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Big Bad Wolf**         | \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/accursed-wolf-father/accursed-wolf-father-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Accursed Wolf-Father** |             \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/white-werewolf/white-werewolf-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**White Werewolf**             |\n|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n|                \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/villager/villager-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Villager**                | \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/villager-villager/villager-villager-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e **Villager-Villager** |                         \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/seer/seer-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Seer**                         |                          \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/cupid/cupid-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Cupid**                           |\n|                    \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/witch/witch-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Witch**                     |                  \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/hunter/hunter-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Hunter**                  |              \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/little-girl/little-girl-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Little Girl**               |                      \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/defender/defender-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Defender**                      |\n|                    \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/elder/elder-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Elder**                     |             \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/scapegoat/scapegoat-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Scapegoat**              |                       \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/idiot/idiot-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Idiot**                        |                 \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/two-sisters/two-sisters-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Two Sisters**                  |\n|       \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/three-brothers/three-brothers-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Three Brothers**       |                      \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/fox/fox-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Fox**                       |                \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/bear-tamer/bear-tamer-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Bear Tamer**                |          \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/stuttering-judge/stuttering-judge-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Stuttering Judge**          |\n| \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/rusty-sword-knight/rusty-sword-knight-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Rusty Sword Knight** |            \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/wild-child/wild-child-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Wild Child**            |                \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/wolf-hound/wolf-hound-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Wolf-Hound**                |                          \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/thief/thief-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Thief**                           |\n|                    \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/angel/angel-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Angel**                     |            \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/pied-piper/pied-piper-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Pied Piper**            |           \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/scandalmonger/scandalmonger-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Scandalmonger**            | \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/prejudiced-manipulator/prejudiced-manipulator-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Prejudiced Manipulator** |\n|                    \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/actor/actor-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Actor**                     |    \u003cimg src=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/public/assets/images/roles/devoted-servant/devoted-servant-small.jpeg?raw=true\" width=\"40\"/\u003e\u003cbr/\u003e**Devoted Servant**     |                                                                                                                                                                                                                         |                                                                                                                                                                                                                               |\n\n\n## \u003ca name=\"installation\"\u003e🔨 Installation\u003c/a\u003e\n\nTo install this project, you will need to have on your machine :\n\n![Node](https://img.shields.io/badge/-nodejs-black?style=for-the-badge\u0026logoColor=white\u0026logo=node.js\u0026color=366A31)\n![PNPM](https://img.shields.io/badge/-pnpm-black?style=for-the-badge\u0026logoColor=white\u0026logo=pnpm\u0026color=B76507)\n![Docker](https://img.shields.io/badge/-Docker-black?style=for-the-badge\u0026logoColor=white\u0026logo=docker\u0026color=004EA2)\n\nWe recommend to use the node version specified in the `.nvmrc` file.\n\n**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.**\n\nThen, run the following commands :\n\n```bash\n# Install dependencies and Husky hooks\npnpm install\n\n# Run the app in dev mode\npnpm run start:dev\n```\n\nThe above command will start the app in development mode and watch for changes on local.\n\nYou can also run the app in development mode with Docker, more information in the **[Docker section](#docker)**.\n\n## \u003ca name=\"build\"\u003e🚀 Build\u003c/a\u003e\n\nIn order to build the app for production, run the following command :\n\n```bash\n# Build the app\npnpm run build\n\n# Run the app in production mode\npnpm run start:prod\n```\n\nYou can also run the app in production mode with Docker, more information in the **[Docker section](#docker)**.\n\n## \u003ca name=\"docker\"\u003e🐳 Docker\u003c/a\u003e\n\nThis app is Docker ready !\n\nThe Dockerfile is available at the root of the project. It uses a multi-stage build to optimize the image size and distroless image to reduce the attack surface.\n\n### 🔨 Development mode\n\nTo run the app in development mode with Docker, multiple commands are available :\n\n```bash\n# Run the app in development mode with Docker\npnpm run docker:dev:start\n\n# Stop the app in development mode with Docker\npnpm run docker:dev:stop\n\n# Reset the app in development mode with Docker (stop, remove image, containers and volumes, then start)\npnpm run docker:dev:reset\n```\n\nWhen starting the app in development mode with Docker, a container for the API and a container for the MongoDB database are created.\n\nDocker compose will use the `development` step of the Dockerfile to build the image.\n\nFor more information, please check the **[docker-compose.yml file](https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/docker/werewolves-assistant-api-dev/docker-compose.yml)**.\n\n### 🚀 Production mode\n\nTo run the app in production mode with Docker, multiple commands are available :\n\n```bash\n# Run the app in production mode with Docker\npnpm run docker:production:start\n\n# Stop the app in production mode with Docker\npnpm run docker:production:stop\n\n# Reset the app in production mode with Docker (stop, remove image, containers and volumes, then start)\npnpm run docker:production:reset\n```\n\nWhen starting the app in production mode with Docker, a container for the API and a container for the MongoDB database are created.\n\nDocker compose will use the `production` step of the Dockerfile to build the image.\n\nFor more information, please check the **[docker-compose.yml file](https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/docker/werewolves-assistant-api-production/docker-compose.yml)**.\n\n### 🧪 Test mode\n\nTo run the tests available in this project thanks to Docker, multiple commands are available :\n\n```bash\n# Deploy test containers (4 databases are created to parallelize tests)\npnpm run docker:test:start\n\n# Stop test containers\npnpm run docker:test:stop\n\n# Reset test containers (stop, remove image, containers and volumes, then start)\npnpm run docker:test:reset\n```\n\nFor more information, please check the **[docker-compose.yml file](https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/main/docker/werewolves-assistant-api-test/docker-compose.yml)**.\n\n## \u003ca name=\"tests\"\u003e💯 Tests\u003c/a\u003e\n\n### 🧪 Unit and E2E tests\n\n![Jest](https://img.shields.io/badge/-Jest-black?style=for-the-badge\u0026logoColor=white\u0026logo=jest\u0026color=BF3B14)\n\n[![Tests count](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/tests-count)](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/tests-count)\n\n[![Covered Statements](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/covered-statements)](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/covered-statements)\n\n[![Covered Branches](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/covered-branches)](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/covered-branches)\n\n[![Covered Functions](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/covered-functions)](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/covered-functions)\n\n[![Covered Lines](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/covered-lines)](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/covered-lines)\n\n### 🥒 Acceptance tests\n\n![Cucumber](https://img.shields.io/badge/-Cucumber-black?style=for-the-badge\u0026logoColor=white\u0026logo=cucumber\u0026color=169652) \n\n[![Scenarios](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/scenarios)](https://byob.yarr.is/antoinezanardi/werewolves-assistant-api-next/scenarios)\n\nClick on the badge below 👇 to see the **[reports](https://reports.cucumber.io/report-collections/9a53c3ab-ff98-43ce-977d-4b6ba9f9ae18)**. \n\n[![ScenariosReports](https://messages.cucumber.io/api/report-collections/9a53c3ab-ff98-43ce-977d-4b6ba9f9ae18/badge)](https://reports.cucumber.io/report-collections/9a53c3ab-ff98-43ce-977d-4b6ba9f9ae18)\n\n### 👽 Mutant testing\n\n![Stryker](https://img.shields.io/badge/-Stryker-black?style=for-the-badge\u0026logoColor=white\u0026logo=stryker\u0026color=7F1B10) \n\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fantoinezanardi%2Fwerewolves-assistant-api-next%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/antoinezanardi/werewolves-assistant-api-next/main)\n\nYou can also check the **[mutation testing report](https://dashboard.stryker-mutator.io/reports/github.com/antoinezanardi/werewolves-assistant-api-next/main#mutant)**.\n\n### ▶️ Commands\n\nBefore testing, you must follow the **[installation steps](#installation)**.\n\nThen, run one of the following commands :\n\n```bash\n# Assure you started test Docker containers (4 databases are created to parallelize tests)\npnpm run docker:test:start\n\n# Run unit tests with coverage\npnpm run test:unit:cov\n\n# Run e2e tests with coverage\npnpm run test:e2e:cov\n\n# Run both unit and e2e tests with coverage\npnpm run test:cov\n\n# Run both unit and e2e tests only on staged files (run on pre-commit)\npnpm run test:staged\n\n# Run acceptance tests\npnpm run test:cucumber\n\n# Run acceptance tests and publish the report\npnpm run test:cucumber:publish\n\n# Run mutant tests with coverage\npnpm run test:stryker\n\n# Run mutant tests with coverage from scratch (without using the incremental file)\npnpm run test:stryker:force\n```\n\n## \u003ca name=\"env-variables\"\u003e🌿 Env variables\u003c/a\u003e\n\nEnvironnement files are available in the **[env directory](https://github.com/antoinezanardi/werewolves-assistant-api-next/tree/main/env)**.\n\nYou can create a `.env` file in this directory to override the default values when starting the API locally with `pnpm run start` command.\n\nEnvironment variables are :\n\n|        Name         |               Description               | Required | Default value |                   Limitations                    |\n|:-------------------:|:---------------------------------------:|:--------:|:-------------:|:------------------------------------------------:|\n|       `HOST`        | Host on which the API will be available |    ❌     |  `127.0.0.1`  |          If set, can't be empty string           |\n|       `PORT`        | Port on which the API will be available |    ❌     |    `8080`     | If set, must be a number between `0` and `65535` |\n|   `ENVIRONNEMENT`   |  Environment in which the API will run  |    ✅     |       ❌       |  Must be `development`, `production` or `test`   |\n|   `DATABASE_HOST`   |        MongoDB database host URL        |    ✅     |       ❌       |              Can't be empty string               |\n|   `DATABASE_PORT`   |          MongoDB database port          |    ❌     |  `undefined`  | If set, must be a number between `0` and `65535` |\n|   `DATABASE_NAME`   |          MongoDB database name          |    ✅     |       ❌       |              Can't be empty string               |\n| `DATABASE_USERNAME` |          MongoDB database user          |    ✅     |       ❌       |              Can't be empty string               |\n| `DATABASE_PASSWORD` |        MongoDB database password        |    ✅     |       ❌       |              Can't be empty string               |\n|    `CORS_ORIGIN`    |           CORS allowed origin           |    ❌     |      `*`      |          If set, can't be empty string           |\n\n\n## \u003ca name=\"code-analysis-and-consistency\"\u003e☑️ Code analysis and consistency\u003c/a\u003e\n\n### 🔍 Code linting \u0026 formatting\n\n![ESLint](https://img.shields.io/badge/-ESLint-black?style=for-the-badge\u0026logoColor=white\u0026logo=eslint\u0026color=341BAB)\n\nIn order to keep the code clean, consistent and free of bad TS practices, more than **300 ESLint rules are activated** !\n\nComplete list of all enabled rules is available in the **[.eslintrc.js file](https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/master/.eslintrc.js)**.\n\n### ▶️ Commands\n\nBefore linting, you must follow the [installation steps](#installation).\n\nThen, run one of the following commands :\n\n```bash\n# Lint \npnpm run lint\n\n# Lint and fix\npnpm run lint:fix\n\n# Lint and fix only on staged files (runs on pre-commit)\npnpm run lint:staged:fix\n\n# Display all configs and rules used in browser using @eslint/config-inspector\npnpm run lint:inspect-config\n```\n\n### 🥇 Project quality scanner\n\nMultiple tools are set up to maintain the best code quality and to prevent vulnerabilities :\n\n![CodeQL](https://img.shields.io/badge/-CodeQL-black?style=for-the-badge\u0026logoColor=white\u0026logo=github\u0026color=2781FE)\n\nYou can check the **[CodeQL analysis report here](https://github.com/antoinezanardi/werewolves-assistant-api-next/security/code-scanning)**.\n\n![SonarCloud](https://img.shields.io/badge/-SonarCloud-black?style=for-the-badge\u0026logoColor=white\u0026logo=sonarcloud\u0026color=F37A3A)\n\nSonarCloud summary is available **[here](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)**.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=antoinezanardi_werewolves-assistant-api-next\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=antoinezanardi_werewolves-assistant-api-next)\n\n## \u003ca name=\"versions\"\u003e📈 Releases \u0026 Changelog\u003c/a\u003e\n\nReleases on **main** branch are generated and published automatically by :\n\n![Semantic Release](https://img.shields.io/badge/-Semantic%20Release-black?style=for-the-badge\u0026logoColor=white\u0026logo=semantic-release\u0026color=000000)\n\nIt uses the **[conventional commit](https://www.conventionalcommits.org/en/v1.0.0/)** strategy.\n\nEach change when a new release comes up is listed in the **\u003ca href=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/master/CHANGELOG.md\" target=\"_blank\"\u003eCHANGELOG.md file\u003c/a\u003e**.\n\nAlso, you can keep up with changes by watching releases via the **Watch GitHub button** at the top of this page.\n\n#### 🏷️ \u003ca href=\"https://github.com/antoinezanardi/werewolves-assistant-api-next/releases\" target=\"_blank\"\u003eAll releases for this project are available here\u003c/a\u003e.\n\n## \u003ca name=\"github-actions\"\u003e🐙 GitHub Actions\u003c/a\u003e\n\nThis project uses **GitHub Actions** to automate some boring tasks.\n\nYou can find all the workflows in the **[.github/workflows directory](https://github.com/antoinezanardi/werewolves-assistant-api-next/tree/main/.github/workflows).**\n\n### 🎢 Workflows\n\n|                                                                             Name                                                                             |                                                                                                                                                                          Description \u0026 Status                                                                                                                                                                           |                      Triggered on                      |    \n|:------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------:|\n|                         **[⚙️ Build](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/build.yml)**                          |                                   Various checks for app health, code quality and tests coverage\u003cbr/\u003e\u003cbr/\u003e[![⚙️ Build Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/build.yml/badge.svg)](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/build.yml)                                    | `push` on `develop` and all pull requests to `develop` |\n| **[🔃 Lint PR Name Into Develop Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/lint-pr-name-into-develop.yml)** |    Checks if pull request name respects `conventionnal-commit` rules\u003cbr/\u003e\u003cbr/\u003e[![🔃 Lint PR Name Into Develop Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/lint-pr-name-into-develop.yml/badge.svg)](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/lint-pr-name-into-develop.yml)    |         `pull-request` `created` or `updated`          | \n|       **[⛵️ Push On Develop Branch Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/push-on-develop.yml)**        |                       Uploads app with `develop` version to `Docker Hub`\u003cbr/\u003e\u003cbr/\u003e[![⛵️ Push On Develop Branch Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/push-on-develop.yml/badge.svg)](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/push-on-develop.yml)                       |                  `push` on `develop`                   |\n|        **[🔃️ Upsert PR Release Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/upsert-pr-release.yml)**         | Creates or updates pull request to `main` depending on commits on `develop` since last release\u003cbr/\u003e\u003cbr/\u003e[![🔃️ Upsert PR Release Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/upsert-pr-release.yml/badge.svg)](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/upsert-pr-release.yml) |                  `push` on `develop`                   | \n|         **[🏷️ Release Creation Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/release-creation.yml)**          |           Creates a new release using `semantic-release` with tag and updated changelog\u003cbr/\u003e\u003cbr/\u003e[![🏷️ Release Creation Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/release-creation.yml/badge.svg)](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/release-creation.yml)           |                    `push` on `main`                    | \n|      **[🚀 Deploy To Production Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/deploy-to-production.yml)**      |              Deploys app with last tag version to `Docker Hub` and `GCP`\u003cbr/\u003e\u003cbr/\u003e[![🚀 Deploy To Production Workflow](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/deploy-to-production.yml/badge.svg)](https://github.com/antoinezanardi/werewolves-assistant-api-next/actions/workflows/deploy-to-production.yml)               |                     `tag-creation`                     | \n\n## \u003ca name=\"misc-commands\"\u003e✨ Misc commands\u003c/a\u003e\n\n### 🌳 Animated tree visualisation of the project's evolution with **[Gource](https://gource.io/)**\n```shell\n# Please ensure that `gource` is installed on your system.\npnpm run gource\n```\n\n### 🔀 Create git branch with a conventional name\n```shell\npnpm run script:create-branch\n```\n\n### ⤴️ Create pull request against the `develop` branch from current branch\n```shell\npnpm run script:create-pull-request\n```\n\n### 📣 To all IntelliJ IDEs users (IntelliJ, Webstorm, PHPStorm, etc.)\n\nAll the above commands are available in the **.run directory** at the root of the project. \n\nYou can add them as **run configurations** in your IDE.\n\n## \u003ca name=\"license\"\u003e©️ License\u003c/a\u003e\n\nThis project is licensed under the [MIT License](http://opensource.org/licenses/MIT).\n\n## \u003ca name=\"contributors\"\u003e❤️ Contributors\u003c/a\u003e\n\nThere is no contributor yet. Want to be the first ?\n\nIf you want to contribute to this project, please read the [**contribution guide**](https://github.com/antoinezanardi/werewolves-assistant-api-next/blob/master/CONTRIBUTING.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoinezanardi%2Fwerewolves-assistant-api-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoinezanardi%2Fwerewolves-assistant-api-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoinezanardi%2Fwerewolves-assistant-api-next/lists"}