Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 22, 2025. It is now read-only.

Werewolves Assistant API provides over HTTP requests a way of manage Werewolves games in order to help the game master in his task.

License

NotificationsYou must be signed in to change notification settings

antoinezanardi/werewolves-assistant-api

Repository files navigation

GitHub releaseGitHub licenseBuild StatusKnown VulnerabilitiesContributions are welcome

ForTheBadge open-sourceForTheBadge built-with-loveForTheBadge uses-js

📋 Table of Contents

  1. 🐺What is this API ?
  2. 🔍Let's try !
  3. 🃏Roles available
  4. 📚API Documentation
  5. 📈Versions & changelog
  6. ☑️Code analysis and consistency
  7. 🔨Installation
  8. 🔌Let's go
  9. ⚙️Other useful commands
  10. ©️License
  11. ❤️Contributors

Werewolves Assistant API provides over HTTP requests a way of manage Werewolves games in order to help the game master in his task.

This is the project's API used byWerewolves Assistant Web, the main webVueJS client.

🤔 Want to know more about this awesome project ?Check out the dedicated about page.

Two versions are available for testing this API:

Main API(Base URL:https://werewolves-assistant-api.antoinezanardi.fr)

🔧Sandbox API(Base URL:https://sandbox.werewolves-assistant-api.antoinezanardi.fr)

Sandbox API may contain some bugs and unexpected behaviors as its purpose is to test new features before deploying onmain API.

Both APIs are running on a server with the following configuration:

  • OS:Debian GNU/Linux 10 (buster)
  • NodeJS:v14.16.1
  • NPM:v6.14.12
  • MongoDB shell version:v4.4.5

The MongoDB database is protected under username and password authentication.

🚀🧑‍🚀 Fan of Postman ? Try out theofficial public collection for your tests !

On this current versionGitHub release,27 different roles are available to play:

  • The Werewolf
  • The Big Bad Wolf
  • The Vile Father Of Wolves
  • The White Werewolf
  • The Villager
  • The Villager-Villager
  • The Seer
  • The Cupid
  • The Witch
  • The Hunter
  • The Little Girl
  • The Guard
  • The Ancient
  • The Scapegoat
  • The Idiot
  • The Two Sisters
  • The Three Brothers
  • The Fox
  • The Bear Tamer
  • The Stuttering Judge
  • The Rusty Sword Knight
  • The Wild Child
  • The Dog-Wolf
  • The Thief
  • The Angel
  • The Pied Piper
  • The Raven

Please check thePlayer role section on API documentation or theAvailable Roles section on the official website for more details about each role.

Documentation is available for both versions:

Note that contributors try their best to maintain documentations up to date. If you find any typos or oversights, please open an issue, or a pull request.

Each change when a new version comes up is listed in theCHANGELOG.md file placed at project's root.

Also, you can keep up with changes by watching releases with theWatch GitHub button at the top of this page.

Current release onmain API isGitHub release.

Main API is updated when commits are merged into themaster branch.

🔧Sandbox API is updated when commits are merged into thestaging branch.

Travis helps the project to be automatically updated by deploying new versions for bothSandbox andMain APIs. Please refer to the.travis.yml file for more details.

In order to keep the code clean, consistent and free of bad JS practises,ESLint is installed with more than220 rules activated !

Complete list of all enabled rules is available in the.eslintrc.js file.

  1. Install dependencies withnpm install (add--production to omit dev dependencies).
  2. Copy.env.example and paste it as.env.
  3. Replace environment values in the fresh new.env file if necessary (When⚠️️ Required is specified):
    • DB_USER: User for authenticating into the MongoDB database.
      • ⚠️ Required if MongoDB auth is enabled
    • DB_PASSWORD: Password for authenticating into the MongoDB database.
      • ⚠️ Required if MongoDB auth is enabled
    • DB_NAME: Name of the MongoDB database.
      • Not required - Default value:werewolves-assistant
    • BASIC_USERNAME: Username for basic authentication.
      • Not required - Default value:root
    • BASIC_PASSWORD: Password for basic authentication.
      • Not required - Default value:secret
    • PORT: Which port the API must run.
      • Not required - Default value:4202
    • JWT_SECRET: Encryption key used for JSON Web Token.
      • Not required - Default value:somethingsecret
    • SENTRY_ENABLED: Enable if errors are caught and sent to Sentry.
      • Not required
    • SENTRY_PROJECT_ID: Sentry project's ID.
      • Not required
    • SENTRY_KEY: Sentry secret key.
      • Not required
    • FACEBOOK_APP_ID: Facebook application ID if you want to enable Facebook authentication.
      • Not Required
    • GOOGLE_CLIENT_ID: Google client ID if you want to enable Google authentication.
      • Not Required

To start the APIon development mode, simply runnpm start.

To start the APIon production mode, runnpm run start_sandbox ornpm run start_production.

  • Tests:npm run test runs various tests to check API endpoints.
  • Lint:npm run lint checks for code style. Based on AirBnB configuration with many more rules.
  • Doc:npm run doc generates doc for API.

This project is licensed under theMIT License.

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

Thank you to all the contributors:


Thomas Deschamps

About

Werewolves Assistant API provides over HTTP requests a way of manage Werewolves games in order to help the game master in his task.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp