Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

major #1511

Merged
merged 24 commits into from
Aug 10, 2023
Merged

major #1511

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .github/workflows/pr-main-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ name: Main (PR) Build CI

env:
DOCKER_IMAGE: 'scores_web'
PORT: ${{ secrets.PORT }}
VITE_FIREBASE_DB_PROJECT_ID: ${{ secrets.VITE_FIREBASE_DB_PROJECT_ID }}
VITE_REDIS_PORT: ${{ secrets.VITE_REDIS_PORT }}
VITE_REDIS_HOST: ${{ secrets.VITE_REDIS_HOST }}
VITE_FIREBASE_DB_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_DB_STORAGE_BUCKET }}
VITE_DISCORD_OAUTH_URL: ${{ secrets.VITE_DISCORD_OAUTH_URL }}
VITE_HASURA_DB_TOKEN: ${{ secrets.VITE_HASURA_DB_TOKEN }}
VITE_REDIS_BULL_DB: ${{ secrets.VITE_REDIS_BULL_DB }}
VITE_REDIS_CACHE_DB: ${{ secrets.VITE_REDIS_CACHE_DB }}
VITE_PROD_LOGS: ${{ secrets.VITE_PROD_LOGS }}
VITE_FIREBASE_DB_API_KEY: ${{ secrets.VITE_FIREBASE_DB_API_KEY }}
VITE_HASURA_DB_URL: ${{ secrets.VITE_HASURA_DB_URL }}
VITE_REDIS_PASS: ${{ secrets.VITE_REDIS_PASS }}
VITE_FIREBASE_DB_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_DB_AUTH_DOMAIN }}
VITE_FIREBASE_DB_DATABASE_URL: ${{ secrets.VITE_FIREBASE_DB_DATABASE_URL }}
SENTRY_ENVIRONMENT: ${{ secrets.SENTRY_ENVIRONMENT }}

jobs:

Expand All @@ -40,12 +56,12 @@ jobs:
npm install
npm run build

docker-image-build:
needs: npm-build-check
name: 🐳 Docker Image Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Build docker image
run: |
docker build . --file ./docker/prod.Dockerfile --tag ${{ env.DOCKER_IMAGE }}:$(date +%s)
# docker-image-build:
# needs: npm-build-check
# name: 🐳 Docker Image Build
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v3
# - name: Build docker image
# run: |
# docker build . --file ./docker/prod.Dockerfile --tag ${{ env.DOCKER_IMAGE }}:$(date +%s)
16 changes: 16 additions & 0 deletions .github/workflows/pr-main-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ env:
PATCH_WORDING: 'PATCH,patch,fix,hotfix,add'
MINOR_WORDING: 'MINOR,minor,feat'
MAJOR_WORDING: 'MAJOR,major,BREAKING'
PORT: ${{ secrets.PORT }}
VITE_FIREBASE_DB_PROJECT_ID: ${{ secrets.VITE_FIREBASE_DB_PROJECT_ID }}
VITE_REDIS_PORT: ${{ secrets.VITE_REDIS_PORT }}
VITE_REDIS_HOST: ${{ secrets.VITE_REDIS_HOST }}
VITE_FIREBASE_DB_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_DB_STORAGE_BUCKET }}
VITE_DISCORD_OAUTH_URL: ${{ secrets.VITE_DISCORD_OAUTH_URL }}
VITE_HASURA_DB_TOKEN: ${{ secrets.VITE_HASURA_DB_TOKEN }}
VITE_REDIS_BULL_DB: ${{ secrets.VITE_REDIS_BULL_DB }}
VITE_REDIS_CACHE_DB: ${{ secrets.VITE_REDIS_CACHE_DB }}
VITE_PROD_LOGS: ${{ secrets.VITE_PROD_LOGS }}
VITE_FIREBASE_DB_API_KEY: ${{ secrets.VITE_FIREBASE_DB_API_KEY }}
VITE_HASURA_DB_URL: ${{ secrets.VITE_HASURA_DB_URL }}
VITE_REDIS_PASS: ${{ secrets.VITE_REDIS_PASS }}
VITE_FIREBASE_DB_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_DB_AUTH_DOMAIN }}
VITE_FIREBASE_DB_DATABASE_URL: ${{ secrets.VITE_FIREBASE_DB_DATABASE_URL }}
SENTRY_ENVIRONMENT: ${{ secrets.SENTRY_ENVIRONMENT }}

'on':
pull_request:
Expand Down
195 changes: 195 additions & 0 deletions .vscode/snippets.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
{
// Place your scores workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }

// ### SEE:
// ### https://code.visualstudio.com/docs/editor/userdefinedsnippets

// ◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️
// BETARENA DEBUG OVERRIDE LOGS
// ◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️

"scores-debug":
{
"scope": "svelte,html,javascript,typescript",
"prefix": "debug",
"body":
[
"// [🐞]",
"dlog",
"(",
"\t`${1|🚏,🔹|} ${2|checkpoint,[var]|} ➤ ${3:debugTagOrVarName} ${$4}`,",
"\t${5|true,false|}",
");",
],
"description": "Betarena - Scores Platform Debug Override"
},

// ◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️
// SVELTE-FILE SVELTE / HTML SNIPPETS
// ◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️

"scores-html-img-tag":
{
"scope": "svelte",
"prefix": "img",
"body":
[
"<img",
"\tid=''",
"\tsrc='$0'",
"\talt='$1'",
"\ttitle='$2'",
"\tloading='lazy'",
"/>"
],
"description": "Betarena - Scores Platform image tag"
},

"scores-svelte-html-each-block":
{
"scope": "svelte",
"prefix": "each",
"body":
[
"{#each $0 ?? [] as ${1:item}",
"\t",
"{/each}"
],
"description": "Betarena - Scores Platform Each-Loop HTML Block tag"
},

// ◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️
// SVELTE-FILE STRUCTURE SNIPPETS & COMMENTS
// ◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️◾️

"scores-region-import-comment":
{
"scope": "svelte,html,javascript,typescript",
"prefix": "scriptimport",
"body":
[
"// #region ➤ 📦 Package Imports",
"\n$0\n",
"// #endregion ➤ 📦 Package Imports"
],
"description": "Betarena - Scores Platform Pacakge Imports init."
},

"scores-region-variables-comment":
{
"scope": "svelte,html,javascript,typescript",
"prefix": "scriptvar",
"body":
[
"// #region ➤ 📌 VARIABLES",
"\n$0\n",
"// #endregion ➤ 📌 VARIABLES"
],
"description": "Betarena - Scores Platform Variables init."
},

"scores-region-methods-comment":
{
"scope": "svelte,html,javascript,typescript",
"prefix": "scriptmethods",
"body":
[
"// #region ➤ 🛠️ METHODS",
"\n$0\n",
"// #endregion ➤ 🛠️ METHODS"
],
"description": "Betarena - Scores Platform Variables init."
},

"scores-region-one-off-comment":
{
"scope": "svelte,html,javascript,typescript",
"prefix": "scriptoneoff",
"body":
[
"// #region ➤ 🚏 ONE-OFF CONDITIONS",
"\n$0\n",
"// #endregion ➤ 🚏 ONE-OFF CONDITIONS"
],
"description": "Betarena - Scores Platform Region One-Off init."
},

"scores-region-reactive-comment":
{
"scope": "svelte,html,javascript,typescript",
"prefix": "scriptreactive",
"body":
[
"// #region ➤ 🔥 REACTIVIY [SVELTE]",
"\n$0\n",
"// #endregion ➤ 🔥 REACTIVIY [SVELTE]"
],
"description": "Betarena - Scores Platform Region One-Off init."
},

"scores-region-lifecycle-comment":
{
"scope": "svelte,html,javascript,typescript",
"prefix": "scriptlifecycle",
"body":
[
"// #region ➤ 🔄 LIFECYCLE [SVELTE]",
"\n$0\n",
"// #endregion ➤ 🔄 LIFECYCLE [SVELTE]"
],
"description": "Betarena - Scores Platform Region Lifecycle init."
},

"scores-style-responsive-comment":
{
"scope": "svelte,html,css",
"prefix": "stylerescom",
"body":
[
"/*",
"=============",
"⚡️ RESPONSIVNESS",
"=============",
"*/"
],
"description": "Betarena - Scores Platform Style Responsive Comment"
},

"scores-style-type-style-comment":
{
"scope": "svelte,html,css",
"prefix": "stylestylecom",
"body":
[
"/* 🎨 style */"
],
"description": "Betarena - Scores Platform Style Style Comment"
},

"scores-style-type-position-comment":
{
"scope": "svelte,html,css",
"prefix": "styleposcom",
"body":
[
"/* 📌 position */"
],
"description": "Betarena - Scores Platform Style Position Comment"
}

}
34 changes: 25 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,22 @@ update-scores-web:
# DEVELOPMENT
# ===========

dev-start:
echo 'Starting DEV Environment'
npm run dev
echo 'Removing Old DEV Logs'
-rm -r ./datalog/*
echo 'DEV Ready!'
heroku-prod-deploy-current:
@echo \
"\n**************************************\
\n🚀 Pushing current branch to Heroku-Dev\
\n**************************************\
\n"
@git push heroku-prod $$(git branch --show-current):main -f
#

heroku-dev-deploy-current:
@echo \
"\n**************************************\
\n🚀 Pushing current branch to Heroku-Dev\
\n**************************************\
\n"
@git push heroku-dev $$(git branch --show-current):main -f
#

dev-docker-start:
Expand All @@ -42,9 +52,15 @@ dev-docker-start:
echo 'DEV Ready!'
#

dev-clean:
echo 'Removing Old DEV Logs'
rm -r ./datalog/
dev-1-click-spin:
-rm -r ./.svelte-kit/
npm run dev
#

preview-1-click-spin:
-rm -r ./build
npm run build
npm run preview
#

git-post-main-pr:
Expand Down
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: npm run start:heroku
web: npm run start
69 changes: 68 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1177,4 +1177,71 @@ paths:
responses:
200:
description:
Target player SEO widget data
Target player SEO widget data
post:
description:
Optional extended description in CommonMark or HTML.
tags:
- User
requestBody:
description:
⚠️❗️ IMPORTANT
Please read carefully
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/USER-WITHDRAW-REQUEST'
summary:
Endpoint dealing with User Updates.
responses:
200:
description:
User Updated!

components:

schemas:

USER-WITHDRAW-REQUEST:
type: object
properties:
asset:
type: string
example: USD
quantity:
type: integer
example: 53
amount:
type: integer
example: 10
type:
type: string
example: Withdraw
status:
type: string
example: Pending
Gateway:
type: string
example: Stripe
first_name:
type: string
example: M
last_name:
type: string
example: B
payment_email:
type: string
example: '@newEmail'
iban:
type: string
example: 12124123asd12
bic_swift:
type: string
example: asdqwe123123
wallet_address_erc20:
type: string
example: 0xqwe123dasd
uid:
type: string
example: 213210412321sad
Loading