Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #46 from nxzq/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nxzq authored Jan 18, 2024
2 parents ccfe2da + 09dde33 commit a36a39d
Show file tree
Hide file tree
Showing 65 changed files with 11,537 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
build/
dist/

postcss.config.js
tailwind.config.js
29 changes: 29 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'react'],
rules: {},
}
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: deploy

on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- name: Install and Build 🔧
run: |
npm ci --ignore-scripts --no-audit --no-fund --no-progress --prefer-offline
npm install esbuild # temp fix (https://github.com/evanw/esbuild/issues/1819#issuecomment-1680244804)
cd modules
cd generator
npm run build
cd ..
cd app
npm ci --ignore-scripts --no-audit --no-fund --no-progress --prefer-offline
npm link ../generator
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: modules/app/build
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: test

on:
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- name: Test 🧪
run: |
npm ci --ignore-scripts --no-audit --no-fund --no-progress --prefer-offline
npm install esbuild # temp fix (https://github.com/evanw/esbuild/issues/1819#issuecomment-1680244804)
cd modules
cd generator
npm run test:coverage
- name: Bundle 📦
run: |
cd modules
cd generator
npm run build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.DS_Store
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no lint-staged
7 changes: 7 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd modules/generator
npm run test:coverage
cd ../..
npm run lint -- --max-warnings=0
22 changes: 22 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# dependencies
node_modules
/.pnp
.pnp.js

# testing
coverage

# production
build
dist

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "semi": false, "singleQuote": true }
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 nxzq

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# inhouse-scrims

[![GitHub Pages](https://img.shields.io/badge/pages%20-nxzq.github.io/inhouse--scrims-%23222222?logo=github&style=flat-square)](https://nxzq.github.io/inhouse-scrims)

[![react](https://img.shields.io/badge/React-%23545455?logo=react&style=flat-square)](https://reactjs.org/)
[![tailwindcss](https://img.shields.io/badge/Tailwind-%23545455?logo=tailwindcss&style=flat-square)](https://tailwindcss.com/)
[![javascript](https://img.shields.io/badge/JavaScript-%23545455?logo=javascript&style=flat-square)](https://www.javascript.com/)
[![typescript](https://img.shields.io/badge/TypeScript-%23545455?logo=typescript&style=flat-square)](https://www.typescriptlang.org/docs/)
[![vite](https://img.shields.io/badge/Vite-%23545455?logo=vite&style=flat-square)](https://vitejs.dev/)
[![vitest](https://img.shields.io/badge/Vitest-%23545455?logo=vitest&style=flat-square)](https://vitest.dev/)
[![prettier](https://img.shields.io/badge/Prettier-%23545455?logo=prettier&style=flat-square)](https://prettier.io/)
[![eslint](https://img.shields.io/badge/ESLint-%23545455?logo=eslint&style=flat-square)](https://eslint.org/)
[![husky](https://img.shields.io/badge/husky-%23545455?logo=git&style=flat-square)](https://typicode.github.io/husky/#/)
[![commitlint](https://img.shields.io/badge/commitlint-%23545455?logo=commitlint&style=flat-square)](https://commitlint.js.org/#/)

![demo](/demo.gif)

League of Legends inhouse matchmaking solution. Attempts to honor role preference while also minimizing team MMR Δ & lane MMR Δ (Lane Diff). Learn more about the [algorithm here](/modules/generator/README.md)
Binary file added demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions modules/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
24 changes: 24 additions & 0 deletions modules/app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# inhouse-scrims-app

[![GitHub Pages](https://img.shields.io/badge/pages%20-nxzq.github.io/inhouse--scrims-%23222222?logo=github&style=flat-square)](https://nxzq.github.io/inhouse-scrims)

[![react](https://img.shields.io/badge/React-%23545455?logo=react&style=flat-square)](https://reactjs.org/)
[![tailwindcss](https://img.shields.io/badge/Tailwind-%23545455?logo=tailwindcss&style=flat-square)](https://tailwindcss.com/)
[![javascript](https://img.shields.io/badge/JavaScript-%23545455?logo=javascript&style=flat-square)](https://www.javascript.com/)
[![vite](https://img.shields.io/badge/Vite-%23545455?logo=vite&style=flat-square)](https://vitejs.dev/)
[![prettier](https://img.shields.io/badge/Prettier-%23545455?logo=prettier&style=flat-square)](https://prettier.io/)
[![eslint](https://img.shields.io/badge/ESLint-%23545455?logo=eslint&style=flat-square)](https://eslint.org/)
[![husky](https://img.shields.io/badge/husky-%23545455?logo=git&style=flat-square)](https://typicode.github.io/husky/#/)
[![commitlint](https://img.shields.io/badge/commitlint-%23545455?logo=commitlint&style=flat-square)](https://commitlint.js.org/#/)

Web (React app) interface for inhouse-scrims

## Getting Started

To get started locally:

```bash
npm ci
npm link ../generator
npm start
```
53 changes: 53 additions & 0 deletions modules/app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#1e293b" />
<meta
name="description"
content="League of Legends inhouse scrims matchmaking. Algorithm accounts for elo and role preference."
/>
<meta
name="description"
content="League of Legends inhouse scrims matchmaking. Algorithm accounts for elo and role preference."
/>

<!-- Google / Search Engine Tags -->
<meta itemprop="name" content="LoL Scrim Matchmaking" />
<meta
itemprop="description"
content="League of Legends inhouse scrims matchmaking. Algorithm accounts for elo and role preference."
/>
<meta itemprop="image" content="hero.png" />

<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://nxzq.github.io/inhouse-scrims" />
<meta property="og:type" content="website" />
<meta property="og:title" content="LoL Scrim Matchmaking" />
<meta
property="og:description"
content="League of Legends inhouse scrims matchmaking. Algorithm accounts for elo and role preference."
/>
<meta property="og:image" content="hero.png" />

<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="LoL Scrim Matchmaking" />
<meta
name="twitter:description"
content="League of Legends inhouse scrims matchmaking. Algorithm accounts for elo and role preference."
/>
<meta name="twitter:image" content="hero.png" />

<link rel="apple-touch-icon" href="/bot.png" />
<link rel="manifest" href="/manifest.json" />
<title>LoL Scrim Matchmaking</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="./src/index.jsx"></script>
</body>
</html>
48 changes: 48 additions & 0 deletions modules/app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "inhouse-scrims-app",
"version": "0.0.0",
"homepage": "nxzq.github.io/inhouse-scrims/",
"private": false,
"dependencies": {
"clsx": "^1.1.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-tippy": "^1.4.0",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "vite",
"build": "vite build",
"preview": "vite preview",
"deploy": "gh-pages -d build"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@vitejs/plugin-react": "^2.1.0",
"autoprefixer": "^10.4.0",
"gh-pages": "^3.2.3",
"postcss": "^8.4.31",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^7.1.0",
"tailwindcss": "^3.0.8",
"vite": "^3.1.3",
"vite-plugin-svgr": "^2.2.1"
},
"peerDependencies": {
"prettier": "^2.5.1"
}
}
6 changes: 6 additions & 0 deletions modules/app/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Binary file added modules/app/public/bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions modules/app/public/bot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/app/public/favicon.ico
Binary file not shown.
Binary file added modules/app/public/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions modules/app/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "inhouse scrim generator",
"name": "Open-Source League of Legends inhouse scrims matchmaking. Algorithm accounts for elo and role preference.",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "bot.png",
"type": "image/png",
"sizes": "96x96"
},
{
"src": "bot.svg",
"type": "image/svg",
"sizes": "144x144"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#1e293b",
"background_color": "#1e293b"
}
3 changes: 3 additions & 0 deletions modules/app/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
Loading

0 comments on commit a36a39d

Please sign in to comment.