Skip to content

Latest commit

 

History

History
134 lines (96 loc) · 4.3 KB

README.md

File metadata and controls

134 lines (96 loc) · 4.3 KB


Markdownify
TypeHacker

What is it?

Typehacker (originally named Typefighters) is one of X-Team's internal games developed with Phaser and focused on the web.

📑Contents

📦Tech Stack

🔎Requirements

🚀Project

Let's setup the project!🥹

🔒Environmental Variables

The APP needs some env vars to work properly. You can ask @ccmoralesj for this.

Just grab the .env.example file and copy everything into a new file called .env. It will look something like this at first.

# NOT SO PUBLIC
API_SIGNING_SECRET=

# PUBLIC
VITE_API_HOST="http://127.0.0.1:3000"
VITE_API_CLIENT_SECRET=

# GAMES API LEADERBOARD
VITE_GAMES_API_HIGHEST_LEADERBOARD_ID=

🎮Run The Game

We are almost there with the setup.🥲

Optional: You can run the API to connect the game with. Is not mandatory, but it could be good if you want to login and send data tothe DB. Go to Games API repo and follow the README to setup you own API, or you can connect with the staging API:

VITE_API_HOST=https://gameshq-api-staging.x-team.com

Now let's run the Game. 🎮

First, make sure you're using our recommended version of Node and yarn by running these commands:

nvm use

Following up, we have to install all required dependencies to run the project:

npm i

Finally, run the game with the following command:

npm run dev

# If you want to run "production" mode use npm run build and go to dist/index.html

The Game should be up and running 🎮at port 3000! (or 3001 if you ran the API first)🎮 You can verify by browsing to http://localhost:3000

Let's start game-dev!🤓 Running game

🫂How to contribute

Collaborate in this repo is quite easy.

📊JIRA

You only need to pick up a ticket from the JIRA board (If you don't have access you can ask @ccmoralesj)

Each JIRA ticket has an identifier based on a code and a number like XTG-123 which you will use later.

💾Commits

Each commit you do needs to have the JIRA ticket identifier so it can be related to the board.

You can use this commit format suggestion.

:optional-emoji: XTG-123: New endpoint to handle login

Note: Please don't commit with --no-verify to skip the husky precommit hook

Emoji Description
🚀 New features, or enhancements to code
🐞 Bug fixes
⚙️ Refactors
📦 Build files, dependencies, config files
🔎 Minor fixes, typos, imports, etc
🪄 Others

Commit Example

🕵🏻Pull Requests

Once you're ready. You can create a new Pull Request (PR) by adding the JIRA ticket identifier in the title. The repo will give you a template to fill in the details of your amazing work!

You can use this PR title format suggestion.

XTG-123: Login

You'll need at least 1 review from your teammates to merge the pull request.

🪄Continous Integration

This project is connected to an EC2 instance from AWS.

All code from main branch will be deployed to staging.

To deploy to production you must create a new release and follow the semantic versioning fundamentals. That will trigger an automated deployment to production.