- Notifications
You must be signed in to change notification settings - Fork3
Werewolves Assistant API provides over HTTP requests a way of manage Werewolves games in order to help the game master in his task.
License
antoinezanardi/werewolves-assistant-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- 🐺What is this API ?
- 🔍Let's try !
- 🃏Roles available
- 📚API Documentation
- 📈Versions & changelog
- ☑️Code analysis and consistency
- 🔨Installation
- 🔌Let's go
- ⚙️Other useful commands
- ©️License
- ❤️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 version,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 is.
✨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.
- Install dependencies with
npm install
(add--production
to omit dev dependencies). - Copy
.env.example
and paste it as.env
. - 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
- Not required - Default value:
- BASIC_USERNAME: Username for basic authentication.
- Not required - Default value:
root
- Not required - Default value:
- BASIC_PASSWORD: Password for basic authentication.
- Not required - Default value:
secret
- Not required - Default value:
- PORT: Which port the API must run.
- Not required - Default value:
4202
- Not required - Default value:
- JWT_SECRET: Encryption key used for JSON Web Token.
- Not required - Default value:
somethingsecret
- Not required - Default value:
- 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
- DB_USER: User for authenticating into the MongoDB database.
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
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.