From 6cd1cc5b798aae258d76caf3f0acc6d6ef71d1f8 Mon Sep 17 00:00:00 2001 From: otariidae Date: Fri, 14 Oct 2022 00:01:28 +0900 Subject: [PATCH] restruct frontend dir frontend/videoCast -> backend/multicaster, frontend/momo_sender, frontend/skyway_receiver frontend -> frontend/site --- .github/workflows/deploy-frontend.yml | 6 +- ...thon-server.yml => deploy-multicaster.yml} | 8 +- .github/workflows/deploy-sender.yml | 6 +- .github/workflows/deploy-testing-receiver.yml | 6 +- .../{format_frontend.yml => format.yml} | 42 +- .github/workflows/test-frontend.yml | 10 +- ...st-receiver-sender.yml => test-sender.yml} | 8 +- .github/workflows/test-testing-receiver.yml | 22 + .../multicaster}/.gitignore | 159 +- .../multicaster/Dockerfile | 0 .../one_to_multiple_cast_skyway.py | 0 .../multicaster}/requirements-dev.txt | 0 .../multicaster}/requirements.txt | 0 docs/endpoints.md | 8 +- frontend/momo_sender/.gitignore | 144 + frontend/{videoCast => momo_sender}/.nvmrc | 0 .../.prettierignore | 1 - .../Dockerfile} | 4 +- .../index.html} | 2 +- .../momo_sender.js => momo_sender/index.js} | 0 .../package-lock.json | 5 +- .../{videoCast => momo_sender}/package.json | 10 +- .../webpack.config.js | 5 +- frontend/{ => site}/.dockerignore | 0 frontend/{ => site}/.eslintrc.json | 0 frontend/{ => site}/.gitignore | 0 frontend/{ => site}/.nvmrc | 0 frontend/{ => site}/.prettierignore | 1 - frontend/{ => site}/Dockerfile | 0 frontend/{ => site}/README.md | 0 .../{ => site}/components/RailRoadMap.tsx | 0 frontend/{ => site}/components/VideoCast.tsx | 0 .../components/svgParts/Platform.tsx | 0 .../{ => site}/components/svgParts/Rail.tsx | 0 .../components/svgParts/ReverseHandle.tsx | 0 .../components/svgParts/SpeedMeter.tsx | 0 .../components/svgParts/StopPoint.tsx | 0 .../components/svgParts/SwitchPoint.tsx | 0 frontend/{ => site}/next-env.d.ts | 0 frontend/{ => site}/next.config.js | 0 frontend/{ => site}/package.json | 0 frontend/{ => site}/pages/_app.tsx | 0 frontend/{ => site}/pages/index.tsx | 0 frontend/{ => site}/public/kokenLogo.ico | Bin frontend/{ => site}/styles/Home.module.css | 0 frontend/{ => site}/styles/globals.css | 0 frontend/{ => site}/tsconfig.json | 0 frontend/{ => site}/types/control-messages.ts | 0 frontend/{ => site}/types/speed-messages.ts | 0 frontend/{ => site}/types/svgPartsTypes.tsx | 0 frontend/{ => site}/types/webrtc-message.ts | 0 frontend/{ => site}/utils/util.ts | 0 frontend/{ => site}/yarn.lock | 0 frontend/skyway_receiver/.gitignore | 144 + frontend/skyway_receiver/.nvmrc | 1 + frontend/skyway_receiver/.prettierignore | 1 + .../Dockerfile} | 4 +- .../index.html} | 2 +- .../index.js} | 0 frontend/skyway_receiver/package-lock.json | 2942 +++++++++++++++++ frontend/skyway_receiver/package.json | 18 + frontend/skyway_receiver/webpack.config.js | 21 + 62 files changed, 3392 insertions(+), 188 deletions(-) rename .github/workflows/{deploy-python-server.yml => deploy-multicaster.yml} (83%) rename .github/workflows/{format_frontend.yml => format.yml} (59%) rename .github/workflows/{test-receiver-sender.yml => test-sender.yml} (56%) create mode 100644 .github/workflows/test-testing-receiver.yml rename {frontend/videoCast => backend/multicaster}/.gitignore (50%) rename frontend/videoCast/Dockerfile.python => backend/multicaster/Dockerfile (100%) rename {frontend/videoCast => backend/multicaster}/one_to_multiple_cast_skyway.py (100%) rename {frontend/videoCast => backend/multicaster}/requirements-dev.txt (100%) rename {frontend/videoCast => backend/multicaster}/requirements.txt (100%) create mode 100644 frontend/momo_sender/.gitignore rename frontend/{videoCast => momo_sender}/.nvmrc (100%) rename frontend/{videoCast => momo_sender}/.prettierignore (73%) rename frontend/{videoCast/Dockerfile.sender => momo_sender/Dockerfile} (58%) rename frontend/{videoCast/momo_sender.html => momo_sender/index.html} (96%) rename frontend/{videoCast/momo_sender.js => momo_sender/index.js} (100%) rename frontend/{videoCast => momo_sender}/package-lock.json (99%) rename frontend/{videoCast => momo_sender}/package.json (75%) rename frontend/{videoCast => momo_sender}/webpack.config.js (82%) rename frontend/{ => site}/.dockerignore (100%) rename frontend/{ => site}/.eslintrc.json (100%) rename frontend/{ => site}/.gitignore (100%) rename frontend/{ => site}/.nvmrc (100%) rename frontend/{ => site}/.prettierignore (97%) rename frontend/{ => site}/Dockerfile (100%) rename frontend/{ => site}/README.md (100%) rename frontend/{ => site}/components/RailRoadMap.tsx (100%) rename frontend/{ => site}/components/VideoCast.tsx (100%) rename frontend/{ => site}/components/svgParts/Platform.tsx (100%) rename frontend/{ => site}/components/svgParts/Rail.tsx (100%) rename frontend/{ => site}/components/svgParts/ReverseHandle.tsx (100%) rename frontend/{ => site}/components/svgParts/SpeedMeter.tsx (100%) rename frontend/{ => site}/components/svgParts/StopPoint.tsx (100%) rename frontend/{ => site}/components/svgParts/SwitchPoint.tsx (100%) rename frontend/{ => site}/next-env.d.ts (100%) rename frontend/{ => site}/next.config.js (100%) rename frontend/{ => site}/package.json (100%) rename frontend/{ => site}/pages/_app.tsx (100%) rename frontend/{ => site}/pages/index.tsx (100%) rename frontend/{ => site}/public/kokenLogo.ico (100%) rename frontend/{ => site}/styles/Home.module.css (100%) rename frontend/{ => site}/styles/globals.css (100%) rename frontend/{ => site}/tsconfig.json (100%) rename frontend/{ => site}/types/control-messages.ts (100%) rename frontend/{ => site}/types/speed-messages.ts (100%) rename frontend/{ => site}/types/svgPartsTypes.tsx (100%) rename frontend/{ => site}/types/webrtc-message.ts (100%) rename frontend/{ => site}/utils/util.ts (100%) rename frontend/{ => site}/yarn.lock (100%) create mode 100644 frontend/skyway_receiver/.gitignore create mode 100644 frontend/skyway_receiver/.nvmrc create mode 100644 frontend/skyway_receiver/.prettierignore rename frontend/{videoCast/Dockerfile.receiver => skyway_receiver/Dockerfile} (56%) rename frontend/{videoCast/skyway_receiver.html => skyway_receiver/index.html} (93%) rename frontend/{videoCast/skyway_receiver.js => skyway_receiver/index.js} (100%) create mode 100644 frontend/skyway_receiver/package-lock.json create mode 100644 frontend/skyway_receiver/package.json create mode 100644 frontend/skyway_receiver/webpack.config.js diff --git a/.github/workflows/deploy-frontend.yml b/.github/workflows/deploy-frontend.yml index 48e49b50..a87ad1e5 100644 --- a/.github/workflows/deploy-frontend.yml +++ b/.github/workflows/deploy-frontend.yml @@ -2,7 +2,7 @@ name: Deploy WebRTC defaults: run: - working-directory: ./frontend/ + working-directory: ./frontend/site on: push: @@ -28,8 +28,8 @@ jobs: - name: Build uses: docker/build-push-action@v3 with: - context: ./frontend - file: ./frontend/Dockerfile + context: ./frontend/site + file: ./frontend/site/Dockerfile platforms: linux/amd64 push: true tags: ghcr.io/ueckoken/plarail2022-frontend:${{ env.IMAGE_TAG }} diff --git a/.github/workflows/deploy-python-server.yml b/.github/workflows/deploy-multicaster.yml similarity index 83% rename from .github/workflows/deploy-python-server.yml rename to .github/workflows/deploy-multicaster.yml index 5477de95..ccb06fe2 100644 --- a/.github/workflows/deploy-python-server.yml +++ b/.github/workflows/deploy-multicaster.yml @@ -2,12 +2,12 @@ name: Deploy WebRTC python server defaults: run: - working-directory: ./frontend/videoCast + working-directory: ./backend/multicaster on: push: branches: [deployment] - paths: ["./frontend/videoCast/**"] + paths: ["./frontend/multicaster/**"] jobs: build: @@ -30,8 +30,8 @@ jobs: - name: Build uses: docker/build-push-action@v3 with: - context: ./frontend/videoCast - file: ./frontend/videoCast/Dockerfile.python + context: ./backend/multicaster + file: ./backend/multicaster/Dockerfile platforms: linux/amd64 push: true tags: ghcr.io/ueckoken/plarail2022-frontend-python:${{ env.IMAGE_TAG }} diff --git a/.github/workflows/deploy-sender.yml b/.github/workflows/deploy-sender.yml index e9ccc160..6a99582b 100644 --- a/.github/workflows/deploy-sender.yml +++ b/.github/workflows/deploy-sender.yml @@ -2,7 +2,7 @@ name: Deploy WebRTC sender defaults: run: - working-directory: ./frontend/ + working-directory: ./frontend/momo_sender on: push: @@ -29,8 +29,8 @@ jobs: - name: Build uses: docker/build-push-action@v3 with: - context: ./frontend/videoCast/ - file: ./frontend/videoCast/Dockerfile.sender + context: ./frontend/momo_sender/ + file: ./frontend/momo_sender/Dockerfile platforms: linux/amd64 push: true tags: ghcr.io/ueckoken/plarail2022-webrtc-sender:${{ env.IMAGE_TAG }} diff --git a/.github/workflows/deploy-testing-receiver.yml b/.github/workflows/deploy-testing-receiver.yml index d14d1594..1e3290a5 100644 --- a/.github/workflows/deploy-testing-receiver.yml +++ b/.github/workflows/deploy-testing-receiver.yml @@ -2,7 +2,7 @@ name: Deploy WebRTC receiver testing defaults: run: - working-directory: ./frontend/ + working-directory: ./frontend/skyway_receiver on: push: @@ -30,8 +30,8 @@ jobs: - name: Build uses: docker/build-push-action@v3 with: - context: ./frontend/videoCast/ - file: ./frontend/videoCast/Dockerfile.receiver + context: ./frontend/skyway_receiver/ + file: ./frontend/skyway_receiver/Dockerfile platforms: linux/amd64 push: true tags: ghcr.io/ueckoken/plarail2022-receiver-test:${{ env.IMAGE_TAG }} diff --git a/.github/workflows/format_frontend.yml b/.github/workflows/format.yml similarity index 59% rename from .github/workflows/format_frontend.yml rename to .github/workflows/format.yml index e4d14d4e..138c6dcf 100644 --- a/.github/workflows/format_frontend.yml +++ b/.github/workflows/format.yml @@ -3,6 +3,7 @@ on: push: paths: - "frontend/**/*" + - "backend/multicaster/*" branches-ignore: - "main" - "deployment" @@ -13,15 +14,15 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: "frontend/" + working-directory: "frontend/site" steps: - name: checkout uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version-file: ./frontend/.nvmrc + node-version-file: ./frontend/site/.nvmrc cache: yarn - cache-dependency-path: ./frontend/yarn.lock + cache-dependency-path: ./frontend/site/yarn.lock - run: yarn install --frozen-lockfile - run: yarn fmt - name: Count changes @@ -38,19 +39,19 @@ jobs: git push if: steps.changes.outputs.count > 0 - prettier-videocast: + prettier-momo-sender: runs-on: ubuntu-latest defaults: run: - working-directory: "frontend/videoCast" + working-directory: "frontend/momo_sender" steps: - name: checkout uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version-file: ./frontend/videoCast/.nvmrc + node-version-file: ./frontend/momo_sender/.nvmrc cache: npm - cache-dependency-path: ./frontend/videoCast/package-lock.json + cache-dependency-path: ./frontend/momo_sender/package-lock.json - run: npm ci - run: npm run fmt - uses: EndBug/add-and-commit@v9 @@ -59,11 +60,32 @@ jobs: author_email: bot@example.com message: format by prettier - black-videoCast: + prettier-skyway-receiver: runs-on: ubuntu-latest defaults: run: - working-directory: "frontend/videoCast" + working-directory: "frontend/skyway_receiver" + steps: + - name: checkout + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: ./frontend/skyway_receiver/.nvmrc + cache: npm + cache-dependency-path: ./frontend/skyway_receiver/package-lock.json + - run: npm ci + - run: npm run fmt + - uses: EndBug/add-and-commit@v9 + with: + author_name: format BOT + author_email: bot@example.com + message: format by prettier + + black-multicaster: + runs-on: ubuntu-latest + defaults: + run: + working-directory: "backend/multicaster" steps: - name: checkout uses: actions/checkout@v3 @@ -71,7 +93,7 @@ jobs: with: python-version: "3.10" cache: pip - cache-dependency-path: ./frontend/videoCast/requirements-dev.txt + cache-dependency-path: ./backend/multicaster/requirements-dev.txt - run: pip install -r requirements-dev.txt - run: black . - uses: EndBug/add-and-commit@v9 diff --git a/.github/workflows/test-frontend.yml b/.github/workflows/test-frontend.yml index a3c6491e..e1d26c34 100644 --- a/.github/workflows/test-frontend.yml +++ b/.github/workflows/test-frontend.yml @@ -2,7 +2,7 @@ name: Frontend build and test defaults: run: - working-directory: ./frontend + working-directory: ./frontend/site on: push @@ -14,13 +14,13 @@ jobs: - uses: actions/cache@v3 with: path: | - ${{ github.workspace }}/frontend/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('./frontend/**/yarn.lock') }}-${{ hashFiles('./frontend/**.[jt]s', './frontend/**.[jt]sx') }} + ${{ github.workspace }}/frontend/site/.next/cache + key: ${{ runner.os }}-nextjs-${{ hashFiles('./frontend/site/**/yarn.lock') }}-${{ hashFiles('./frontend/site/**.[jt]s', './frontend/site/**.[jt]sx') }} - uses: actions/setup-node@v3 with: - node-version-file: ./frontend/.nvmrc + node-version-file: ./frontend/site/.nvmrc cache: yarn - cache-dependency-path: ./frontend/yarn.lock + cache-dependency-path: ./frontend/site/yarn.lock - name: dependency-install run: yarn install --frozen-lockfile --immutable - name: lint diff --git a/.github/workflows/test-receiver-sender.yml b/.github/workflows/test-sender.yml similarity index 56% rename from .github/workflows/test-receiver-sender.yml rename to .github/workflows/test-sender.yml index ae9032db..d905a044 100644 --- a/.github/workflows/test-receiver-sender.yml +++ b/.github/workflows/test-sender.yml @@ -1,8 +1,8 @@ -name: WebRTC receiver and sender build test +name: WebRTC sender build test defaults: run: - working-directory: ./frontend/videoCast + working-directory: ./frontend/momo_sender on: push @@ -13,9 +13,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version-file: ./frontend/videoCast/.nvmrc + node-version-file: ./frontend/momo_sender/.nvmrc cache: npm - cache-dependency-path: ./frontend/videoCast/package-lock.json + cache-dependency-path: ./frontend/momo_sender/package-lock.json - name: dependency-install run: npm ci - name: build diff --git a/.github/workflows/test-testing-receiver.yml b/.github/workflows/test-testing-receiver.yml new file mode 100644 index 00000000..9e643ba8 --- /dev/null +++ b/.github/workflows/test-testing-receiver.yml @@ -0,0 +1,22 @@ +name: WebRTC receiver build test + +defaults: + run: + working-directory: ./frontend/skyway_receiver + +on: push + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: ./frontend/skyway_receiver/.nvmrc + cache: npm + cache-dependency-path: ./frontend/skyway_receiver/package-lock.json + - name: dependency-install + run: npm ci + - name: build + run: npm run build diff --git a/frontend/videoCast/.gitignore b/backend/multicaster/.gitignore similarity index 50% rename from frontend/videoCast/.gitignore rename to backend/multicaster/.gitignore index 4ea14e6a..e72a96da 100644 --- a/frontend/videoCast/.gitignore +++ b/backend/multicaster/.gitignore @@ -1,131 +1,5 @@ -*_.js - -# Created by https://www.toptal.com/developers/gitignore/api/python,node -# Edit at https://www.toptal.com/developers/gitignore?templates=python,node - -### Node ### -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test -.env.production - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* - -### Node Patch ### -# Serverless Webpack directories -.webpack/ +# Created by https://www.toptal.com/developers/gitignore/api/python +# Edit at https://www.toptal.com/developers/gitignore?templates=python ### Python ### # Byte-compiled / optimized / DLL files @@ -172,6 +46,7 @@ htmlcov/ .nox/ .coverage .coverage.* +.cache nosetests.xml coverage.xml *.cover @@ -185,6 +60,7 @@ cover/ *.pot # Django stuff: +*.log local_settings.py db.sqlite3 db.sqlite3-journal @@ -222,7 +98,22 @@ ipython_config.py # install all needed dependencies. #Pipfile.lock -# PEP 582; used by e.g. github.com/David-OConnor/pyflow +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ # Celery stuff @@ -233,6 +124,7 @@ celerybeat.pid *.sage.py # Environments +.env .venv env/ venv/ @@ -264,6 +156,11 @@ dmypy.json # Cython debug symbols cython_debug/ -# End of https://www.toptal.com/developers/gitignore/api/python,node - +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ +# End of https://www.toptal.com/developers/gitignore/api/python diff --git a/frontend/videoCast/Dockerfile.python b/backend/multicaster/Dockerfile similarity index 100% rename from frontend/videoCast/Dockerfile.python rename to backend/multicaster/Dockerfile diff --git a/frontend/videoCast/one_to_multiple_cast_skyway.py b/backend/multicaster/one_to_multiple_cast_skyway.py similarity index 100% rename from frontend/videoCast/one_to_multiple_cast_skyway.py rename to backend/multicaster/one_to_multiple_cast_skyway.py diff --git a/frontend/videoCast/requirements-dev.txt b/backend/multicaster/requirements-dev.txt similarity index 100% rename from frontend/videoCast/requirements-dev.txt rename to backend/multicaster/requirements-dev.txt diff --git a/frontend/videoCast/requirements.txt b/backend/multicaster/requirements.txt similarity index 100% rename from frontend/videoCast/requirements.txt rename to backend/multicaster/requirements.txt diff --git a/docs/endpoints.md b/docs/endpoints.md index d353eac8..a4a889c9 100644 --- a/docs/endpoints.md +++ b/docs/endpoints.md @@ -9,13 +9,13 @@ - "control.chofufes2022.gotti.dev" `./backend/external`が動いています。クライアントはここにむけてwebsocketを張ってください。`/ws`にwebsocketのエンドポイントがあります。 - "chofufes2022.gotti.dev" -`./frontend`が動いています。ここにメインのページがデプロイされます。 +`./frontend/site`が動いています。ここにメインのページがデプロイされます。 - "webrtc.chofufes2022.gotti.dev" -`./frontend/videoCast/one_to_multiple_cast_skyway.py`が動いています。webrtcのピアリングを行います。 +`./backend/multicaster/one_to_multiple_cast_skyway.py`が動いています。webrtcのピアリングを行います。 - "auth.chofufes2022.gotti.dev" 認証画面です。認証が必要なページに入るには先にここを通ってください。 - "receiver-test.chofufes2022.gotti.dev" -`./frontend/videocast/skyway_receiver.html`が動いています。webrtcの受信側ページです。 +`./frontend/skyway_receiver/index.html`が動いています。webrtcの受信側ページです。 ### 認証あり @@ -26,7 +26,7 @@ prometheusというメトリクス収集ツールが動いています。基本 - "alert.chofufes2022.gotti.dev" 使おうと思いましたがやめました。 - "webrtc-sender.chofufes2022.gotti.dev" -`./frontend/videocast/momo_sender.html`が動いています。webrtcの配信者側ページです。 +`./frontend/momo_sender/index.html`が動いています。webrtcの配信者側ページです。 ## 学内 diff --git a/frontend/momo_sender/.gitignore b/frontend/momo_sender/.gitignore new file mode 100644 index 00000000..3502ef7f --- /dev/null +++ b/frontend/momo_sender/.gitignore @@ -0,0 +1,144 @@ +# Created by https://www.toptal.com/developers/gitignore/api/node +# Edit at https://www.toptal.com/developers/gitignore?templates=node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +### Node Patch ### +# Serverless Webpack directories +.webpack/ + +# Optional stylelint cache + +# SvelteKit build / generate output +.svelte-kit + +# End of https://www.toptal.com/developers/gitignore/api/node diff --git a/frontend/videoCast/.nvmrc b/frontend/momo_sender/.nvmrc similarity index 100% rename from frontend/videoCast/.nvmrc rename to frontend/momo_sender/.nvmrc diff --git a/frontend/videoCast/.prettierignore b/frontend/momo_sender/.prettierignore similarity index 73% rename from frontend/videoCast/.prettierignore rename to frontend/momo_sender/.prettierignore index 68feca34..483a9c42 100644 --- a/frontend/videoCast/.prettierignore +++ b/frontend/momo_sender/.prettierignore @@ -1,2 +1 @@ -*_.js package-lock.json \ No newline at end of file diff --git a/frontend/videoCast/Dockerfile.sender b/frontend/momo_sender/Dockerfile similarity index 58% rename from frontend/videoCast/Dockerfile.sender rename to frontend/momo_sender/Dockerfile index 4edf8c08..991ee7b9 100644 --- a/frontend/videoCast/Dockerfile.sender +++ b/frontend/momo_sender/Dockerfile @@ -8,5 +8,5 @@ COPY *.js /app/ RUN npm run build FROM nginx:1.23.1-alpine -COPY --from=builder /app/momo_sender_.js /usr/share/nginx/html/ -COPY ./momo_sender.html /usr/share/nginx/html/index.html +COPY --from=builder /app/bundle.js /usr/share/nginx/html/ +COPY ./index.html /usr/share/nginx/html/ diff --git a/frontend/videoCast/momo_sender.html b/frontend/momo_sender/index.html similarity index 96% rename from frontend/videoCast/momo_sender.html rename to frontend/momo_sender/index.html index 94e3be90..c8df5b26 100644 --- a/frontend/videoCast/momo_sender.html +++ b/frontend/momo_sender/index.html @@ -63,6 +63,6 @@

P2P配信用サイト

/> カメラwidth(ideal) カメラheight(ideal) - + diff --git a/frontend/videoCast/momo_sender.js b/frontend/momo_sender/index.js similarity index 100% rename from frontend/videoCast/momo_sender.js rename to frontend/momo_sender/index.js diff --git a/frontend/videoCast/package-lock.json b/frontend/momo_sender/package-lock.json similarity index 99% rename from frontend/videoCast/package-lock.json rename to frontend/momo_sender/package-lock.json index 67b9d824..9c89eb3f 100644 --- a/frontend/videoCast/package-lock.json +++ b/frontend/momo_sender/package-lock.json @@ -1,8 +1,7 @@ { - "name": "webrtc", - "version": "1.0.0", - "lockfileVersion": 1, + "name": "chofusai-plarail2022-momo-sender", "requires": true, + "lockfileVersion": 1, "dependencies": { "@discoveryjs/json-ext": { "version": "0.5.7", diff --git a/frontend/videoCast/package.json b/frontend/momo_sender/package.json similarity index 75% rename from frontend/videoCast/package.json rename to frontend/momo_sender/package.json index bb22f237..bbdbbfcf 100644 --- a/frontend/videoCast/package.json +++ b/frontend/momo_sender/package.json @@ -1,8 +1,6 @@ { - "name": "webrtc", - "version": "1.0.0", - "description": "", - "main": "main.js", + "name": "chofusai-plarail2022-momo-sender", + "private": true, "dependencies": { "@open-ayame/ayame-web-sdk": "^2022.0.0", "skyway-js": "^4.4.1" @@ -17,7 +15,5 @@ "build": "webpack", "fmt": "prettier --no-semi --write .", "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC" + } } diff --git a/frontend/videoCast/webpack.config.js b/frontend/momo_sender/webpack.config.js similarity index 82% rename from frontend/videoCast/webpack.config.js rename to frontend/momo_sender/webpack.config.js index 6bd9da6c..a32eefab 100644 --- a/frontend/videoCast/webpack.config.js +++ b/frontend/momo_sender/webpack.config.js @@ -3,11 +3,10 @@ const webpack = require("webpack") module.exports = { entry: { - skyway_receiver: "./skyway_receiver.js", - momo_sender: "./momo_sender.js", + index: "./index.js", }, output: { - filename: "[name]_.js", + filename: "bundle.js", path: path.resolve(__dirname), }, plugins: [ diff --git a/frontend/.dockerignore b/frontend/site/.dockerignore similarity index 100% rename from frontend/.dockerignore rename to frontend/site/.dockerignore diff --git a/frontend/.eslintrc.json b/frontend/site/.eslintrc.json similarity index 100% rename from frontend/.eslintrc.json rename to frontend/site/.eslintrc.json diff --git a/frontend/.gitignore b/frontend/site/.gitignore similarity index 100% rename from frontend/.gitignore rename to frontend/site/.gitignore diff --git a/frontend/.nvmrc b/frontend/site/.nvmrc similarity index 100% rename from frontend/.nvmrc rename to frontend/site/.nvmrc diff --git a/frontend/.prettierignore b/frontend/site/.prettierignore similarity index 97% rename from frontend/.prettierignore rename to frontend/site/.prettierignore index c9b33c93..fd91d997 100644 --- a/frontend/.prettierignore +++ b/frontend/site/.prettierignore @@ -1,4 +1,3 @@ -videoCast package-lock.json # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. diff --git a/frontend/Dockerfile b/frontend/site/Dockerfile similarity index 100% rename from frontend/Dockerfile rename to frontend/site/Dockerfile diff --git a/frontend/README.md b/frontend/site/README.md similarity index 100% rename from frontend/README.md rename to frontend/site/README.md diff --git a/frontend/components/RailRoadMap.tsx b/frontend/site/components/RailRoadMap.tsx similarity index 100% rename from frontend/components/RailRoadMap.tsx rename to frontend/site/components/RailRoadMap.tsx diff --git a/frontend/components/VideoCast.tsx b/frontend/site/components/VideoCast.tsx similarity index 100% rename from frontend/components/VideoCast.tsx rename to frontend/site/components/VideoCast.tsx diff --git a/frontend/components/svgParts/Platform.tsx b/frontend/site/components/svgParts/Platform.tsx similarity index 100% rename from frontend/components/svgParts/Platform.tsx rename to frontend/site/components/svgParts/Platform.tsx diff --git a/frontend/components/svgParts/Rail.tsx b/frontend/site/components/svgParts/Rail.tsx similarity index 100% rename from frontend/components/svgParts/Rail.tsx rename to frontend/site/components/svgParts/Rail.tsx diff --git a/frontend/components/svgParts/ReverseHandle.tsx b/frontend/site/components/svgParts/ReverseHandle.tsx similarity index 100% rename from frontend/components/svgParts/ReverseHandle.tsx rename to frontend/site/components/svgParts/ReverseHandle.tsx diff --git a/frontend/components/svgParts/SpeedMeter.tsx b/frontend/site/components/svgParts/SpeedMeter.tsx similarity index 100% rename from frontend/components/svgParts/SpeedMeter.tsx rename to frontend/site/components/svgParts/SpeedMeter.tsx diff --git a/frontend/components/svgParts/StopPoint.tsx b/frontend/site/components/svgParts/StopPoint.tsx similarity index 100% rename from frontend/components/svgParts/StopPoint.tsx rename to frontend/site/components/svgParts/StopPoint.tsx diff --git a/frontend/components/svgParts/SwitchPoint.tsx b/frontend/site/components/svgParts/SwitchPoint.tsx similarity index 100% rename from frontend/components/svgParts/SwitchPoint.tsx rename to frontend/site/components/svgParts/SwitchPoint.tsx diff --git a/frontend/next-env.d.ts b/frontend/site/next-env.d.ts similarity index 100% rename from frontend/next-env.d.ts rename to frontend/site/next-env.d.ts diff --git a/frontend/next.config.js b/frontend/site/next.config.js similarity index 100% rename from frontend/next.config.js rename to frontend/site/next.config.js diff --git a/frontend/package.json b/frontend/site/package.json similarity index 100% rename from frontend/package.json rename to frontend/site/package.json diff --git a/frontend/pages/_app.tsx b/frontend/site/pages/_app.tsx similarity index 100% rename from frontend/pages/_app.tsx rename to frontend/site/pages/_app.tsx diff --git a/frontend/pages/index.tsx b/frontend/site/pages/index.tsx similarity index 100% rename from frontend/pages/index.tsx rename to frontend/site/pages/index.tsx diff --git a/frontend/public/kokenLogo.ico b/frontend/site/public/kokenLogo.ico similarity index 100% rename from frontend/public/kokenLogo.ico rename to frontend/site/public/kokenLogo.ico diff --git a/frontend/styles/Home.module.css b/frontend/site/styles/Home.module.css similarity index 100% rename from frontend/styles/Home.module.css rename to frontend/site/styles/Home.module.css diff --git a/frontend/styles/globals.css b/frontend/site/styles/globals.css similarity index 100% rename from frontend/styles/globals.css rename to frontend/site/styles/globals.css diff --git a/frontend/tsconfig.json b/frontend/site/tsconfig.json similarity index 100% rename from frontend/tsconfig.json rename to frontend/site/tsconfig.json diff --git a/frontend/types/control-messages.ts b/frontend/site/types/control-messages.ts similarity index 100% rename from frontend/types/control-messages.ts rename to frontend/site/types/control-messages.ts diff --git a/frontend/types/speed-messages.ts b/frontend/site/types/speed-messages.ts similarity index 100% rename from frontend/types/speed-messages.ts rename to frontend/site/types/speed-messages.ts diff --git a/frontend/types/svgPartsTypes.tsx b/frontend/site/types/svgPartsTypes.tsx similarity index 100% rename from frontend/types/svgPartsTypes.tsx rename to frontend/site/types/svgPartsTypes.tsx diff --git a/frontend/types/webrtc-message.ts b/frontend/site/types/webrtc-message.ts similarity index 100% rename from frontend/types/webrtc-message.ts rename to frontend/site/types/webrtc-message.ts diff --git a/frontend/utils/util.ts b/frontend/site/utils/util.ts similarity index 100% rename from frontend/utils/util.ts rename to frontend/site/utils/util.ts diff --git a/frontend/yarn.lock b/frontend/site/yarn.lock similarity index 100% rename from frontend/yarn.lock rename to frontend/site/yarn.lock diff --git a/frontend/skyway_receiver/.gitignore b/frontend/skyway_receiver/.gitignore new file mode 100644 index 00000000..3502ef7f --- /dev/null +++ b/frontend/skyway_receiver/.gitignore @@ -0,0 +1,144 @@ +# Created by https://www.toptal.com/developers/gitignore/api/node +# Edit at https://www.toptal.com/developers/gitignore?templates=node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +### Node Patch ### +# Serverless Webpack directories +.webpack/ + +# Optional stylelint cache + +# SvelteKit build / generate output +.svelte-kit + +# End of https://www.toptal.com/developers/gitignore/api/node diff --git a/frontend/skyway_receiver/.nvmrc b/frontend/skyway_receiver/.nvmrc new file mode 100644 index 00000000..6b0b80f8 --- /dev/null +++ b/frontend/skyway_receiver/.nvmrc @@ -0,0 +1 @@ +14.20.1 \ No newline at end of file diff --git a/frontend/skyway_receiver/.prettierignore b/frontend/skyway_receiver/.prettierignore new file mode 100644 index 00000000..483a9c42 --- /dev/null +++ b/frontend/skyway_receiver/.prettierignore @@ -0,0 +1 @@ +package-lock.json \ No newline at end of file diff --git a/frontend/videoCast/Dockerfile.receiver b/frontend/skyway_receiver/Dockerfile similarity index 56% rename from frontend/videoCast/Dockerfile.receiver rename to frontend/skyway_receiver/Dockerfile index f333cf96..01b387c7 100644 --- a/frontend/videoCast/Dockerfile.receiver +++ b/frontend/skyway_receiver/Dockerfile @@ -8,5 +8,5 @@ COPY *.js /app/ RUN npm run build FROM nginx:1.23.1-alpine -COPY --from=builder /app/skyway_receiver_.js /usr/share/nginx/html/ -COPY ./skyway_receiver.html /usr/share/nginx/html/index.html +COPY --from=builder /app/bundle.js /usr/share/nginx/html/ +COPY ./index.html /usr/share/nginx/html/ \ No newline at end of file diff --git a/frontend/videoCast/skyway_receiver.html b/frontend/skyway_receiver/index.html similarity index 93% rename from frontend/videoCast/skyway_receiver.html rename to frontend/skyway_receiver/index.html index f3e58d06..1113ab87 100644 --- a/frontend/videoCast/skyway_receiver.html +++ b/frontend/skyway_receiver/index.html @@ -3,7 +3,7 @@ Hand Signaling - +