From c8be5658bae95b94198dc00bd206ba324d9404e0 Mon Sep 17 00:00:00 2001 From: realtradam Date: Thu, 27 Jun 2024 12:41:26 -0400 Subject: add frontend to repo --- .dockerignore | 31 - .gitignore | 37 - .ruby-version | 1 - .tool-versions | 1 + Dockerfile | 63 - Gemfile | 52 - Gemfile.lock | 226 -- README.md | 10 - Rakefile | 6 - app/channels/application_cable/channel.rb | 4 - app/channels/application_cable/connection.rb | 4 - app/controllers/api/v1/auth_controller.rb | 109 - app/controllers/api/v1/games_controller.rb | 167 -- app/controllers/api/v1/tags_controller.rb | 15 - app/controllers/api/v1/users_controller.rb | 10 - app/controllers/application_controller.rb | 4 - app/controllers/concerns/.keep | 0 app/controllers/platform_tags_controller.rb | 8 - app/jobs/application_job.rb | 7 - app/mailers/application_mailer.rb | 4 - app/models/application_record.rb | 3 - app/models/concerns/.keep | 0 app/models/game.rb | 39 - app/models/tag.rb | 3 - app/models/user.rb | 4 - app/views/layouts/mailer.html.erb | 13 - app/views/layouts/mailer.text.erb | 1 - bin/bundle | 109 - bin/docker-entrypoint | 9 - bin/rails | 4 - bin/rake | 4 - bin/setup | 33 - captain-definition | 2 +- config.ru | 6 - config/application.rb | 68 - config/boot.rb | 4 - config/cable.yml | 10 - config/credentials.yml.enc | 1 - config/database.yml | 87 - config/environment.rb | 5 - config/environments/development.rb | 71 - config/environments/production.rb | 90 - config/environments/test.rb | 64 - config/initializers/cors.rb | 27 - config/initializers/filter_parameter_logging.rb | 8 - config/initializers/inflections.rb | 16 - config/locales/en.yml | 31 - config/puma.rb | 35 - config/routes.rb | 46 - config/storage.yml | 34 - db/lfs/Games/Almost Pong/card.png | Bin 14841 -> 0 bytes db/lfs/Games/Almost Pong/character.png | Bin 8855 -> 0 bytes db/lfs/Games/Almost Pong/desc.md | 12 - db/lfs/Games/Almost Pong/index.zip | Bin 434422 -> 0 bytes db/lfs/Games/Almost Pong/title.png | Bin 186588 -> 0 bytes db/lfs/Games/Bubbles, Behind/card.png | Bin 131979 -> 0 bytes db/lfs/Games/Bubbles, Behind/character.png | Bin 12407 -> 0 bytes db/lfs/Games/Bubbles, Behind/desc.md | 20 - db/lfs/Games/Bubbles, Behind/index.zip | Bin 5570832 -> 0 bytes db/lfs/Games/Bubbles, Behind/title.png | Bin 92223 -> 0 bytes db/lfs/Games/Magnet Run/card.png | Bin 291501 -> 0 bytes db/lfs/Games/Magnet Run/character.png | Bin 150426 -> 0 bytes db/lfs/Games/Magnet Run/desc.md | 16 - db/lfs/Games/Magnet Run/index.zip | Bin 22341627 -> 0 bytes db/lfs/Games/Magnet Run/title.png | Bin 183420 -> 0 bytes db/lfs/Games/Optimal Direction/card.png | Bin 61166 -> 0 bytes db/lfs/Games/Optimal Direction/character.png | Bin 17188 -> 0 bytes db/lfs/Games/Optimal Direction/desc.md | 18 - db/lfs/Games/Optimal Direction/index.zip | Bin 8119624 -> 0 bytes db/lfs/Games/Optimal Direction/title.png | Bin 179422 -> 0 bytes db/lfs/Games/Orc: Arena of Time/card.png | Bin 6246 -> 0 bytes db/lfs/Games/Orc: Arena of Time/character.png | Bin 4502 -> 0 bytes db/lfs/Games/Orc: Arena of Time/desc.md | 15 - db/lfs/Games/Orc: Arena of Time/index.zip | Bin 5181123 -> 0 bytes db/lfs/Games/Orc: Arena of Time/title.png | Bin 1326 -> 0 bytes db/lfs/Games/SpaceCube 64/card.png | Bin 24748 -> 0 bytes db/lfs/Games/SpaceCube 64/character.png | Bin 4152 -> 0 bytes db/lfs/Games/SpaceCube 64/desc.md | 32 - db/lfs/Games/SpaceCube 64/index.zip | Bin 99061 -> 0 bytes db/lfs/Games/SpaceCube 64/title.png | Bin 187643 -> 0 bytes db/lfs/Games/Winter One/card.png | Bin 10240 -> 0 bytes db/lfs/Games/Winter One/character.png | Bin 26802 -> 0 bytes db/lfs/Games/Winter One/desc.md | 13 - db/lfs/Games/Winter One/index.zip | Bin 6840382 -> 0 bytes db/lfs/Games/Winter One/title.png | Bin 9065 -> 0 bytes db/migrate/20240519191604_create_users.rb | 13 - ..._create_active_storage_tables.active_storage.rb | 57 - db/migrate/20240521205000_create_games.rb | 16 - ...40527231908_add_path_to_active_storage_blobs.rb | 5 - db/migrate/20240606184819_create_tags.rb | 10 - .../20240606200659_create_tags_games_join_table.rb | 8 - db/schema.rb | 86 - db/seeds.rb | 167 -- docker-compose.yml | 19 - lib/tasks/.keep | 0 log/.keep | 0 public/robots.txt | 1 - rails-backend/.dockerignore | 31 + rails-backend/.gitignore | 37 + rails-backend/.ruby-version | 1 + rails-backend/Dockerfile | 63 + rails-backend/Gemfile | 52 + rails-backend/Gemfile.lock | 226 ++ rails-backend/README.md | 10 + rails-backend/Rakefile | 6 + .../app/channels/application_cable/channel.rb | 4 + .../app/channels/application_cable/connection.rb | 4 + .../app/controllers/api/v1/auth_controller.rb | 109 + .../app/controllers/api/v1/games_controller.rb | 167 ++ .../app/controllers/api/v1/tags_controller.rb | 15 + .../app/controllers/api/v1/users_controller.rb | 10 + .../app/controllers/application_controller.rb | 4 + rails-backend/app/controllers/concerns/.keep | 0 .../app/controllers/platform_tags_controller.rb | 8 + rails-backend/app/jobs/application_job.rb | 7 + rails-backend/app/mailers/application_mailer.rb | 4 + rails-backend/app/models/application_record.rb | 3 + rails-backend/app/models/concerns/.keep | 0 rails-backend/app/models/game.rb | 39 + rails-backend/app/models/tag.rb | 3 + rails-backend/app/models/user.rb | 4 + rails-backend/app/views/layouts/mailer.html.erb | 13 + rails-backend/app/views/layouts/mailer.text.erb | 1 + rails-backend/bin/bundle | 109 + rails-backend/bin/docker-entrypoint | 9 + rails-backend/bin/rails | 4 + rails-backend/bin/rake | 4 + rails-backend/bin/setup | 33 + rails-backend/config.ru | 6 + rails-backend/config/application.rb | 68 + rails-backend/config/boot.rb | 4 + rails-backend/config/cable.yml | 10 + rails-backend/config/credentials.yml.enc | 1 + rails-backend/config/database.yml | 87 + rails-backend/config/environment.rb | 5 + rails-backend/config/environments/development.rb | 71 + rails-backend/config/environments/production.rb | 90 + rails-backend/config/environments/test.rb | 64 + rails-backend/config/initializers/cors.rb | 27 + .../initializers/filter_parameter_logging.rb | 8 + rails-backend/config/initializers/inflections.rb | 16 + rails-backend/config/locales/en.yml | 31 + rails-backend/config/puma.rb | 35 + rails-backend/config/routes.rb | 46 + rails-backend/config/storage.yml | 34 + rails-backend/db/lfs/Games/Almost Pong/card.png | Bin 0 -> 14841 bytes .../db/lfs/Games/Almost Pong/character.png | Bin 0 -> 8855 bytes rails-backend/db/lfs/Games/Almost Pong/desc.md | 12 + rails-backend/db/lfs/Games/Almost Pong/index.zip | Bin 0 -> 434422 bytes rails-backend/db/lfs/Games/Almost Pong/title.png | Bin 0 -> 186588 bytes .../db/lfs/Games/Bubbles, Behind/card.png | Bin 0 -> 131979 bytes .../db/lfs/Games/Bubbles, Behind/character.png | Bin 0 -> 12407 bytes rails-backend/db/lfs/Games/Bubbles, Behind/desc.md | 20 + .../db/lfs/Games/Bubbles, Behind/index.zip | Bin 0 -> 5570832 bytes .../db/lfs/Games/Bubbles, Behind/title.png | Bin 0 -> 92223 bytes rails-backend/db/lfs/Games/Magnet Run/card.png | Bin 0 -> 291501 bytes .../db/lfs/Games/Magnet Run/character.png | Bin 0 -> 150426 bytes rails-backend/db/lfs/Games/Magnet Run/desc.md | 16 + rails-backend/db/lfs/Games/Magnet Run/index.zip | Bin 0 -> 22341627 bytes rails-backend/db/lfs/Games/Magnet Run/title.png | Bin 0 -> 183420 bytes .../db/lfs/Games/Optimal Direction/card.png | Bin 0 -> 61166 bytes .../db/lfs/Games/Optimal Direction/character.png | Bin 0 -> 17188 bytes .../db/lfs/Games/Optimal Direction/desc.md | 18 + .../db/lfs/Games/Optimal Direction/index.zip | Bin 0 -> 8119624 bytes .../db/lfs/Games/Optimal Direction/title.png | Bin 0 -> 179422 bytes .../db/lfs/Games/Orc: Arena of Time/card.png | Bin 0 -> 6246 bytes .../db/lfs/Games/Orc: Arena of Time/character.png | Bin 0 -> 4502 bytes .../db/lfs/Games/Orc: Arena of Time/desc.md | 15 + .../db/lfs/Games/Orc: Arena of Time/index.zip | Bin 0 -> 5181123 bytes .../db/lfs/Games/Orc: Arena of Time/title.png | Bin 0 -> 1326 bytes rails-backend/db/lfs/Games/SpaceCube 64/card.png | Bin 0 -> 24748 bytes .../db/lfs/Games/SpaceCube 64/character.png | Bin 0 -> 4152 bytes rails-backend/db/lfs/Games/SpaceCube 64/desc.md | 32 + rails-backend/db/lfs/Games/SpaceCube 64/index.zip | Bin 0 -> 99061 bytes rails-backend/db/lfs/Games/SpaceCube 64/title.png | Bin 0 -> 187643 bytes rails-backend/db/lfs/Games/Winter One/card.png | Bin 0 -> 10240 bytes .../db/lfs/Games/Winter One/character.png | Bin 0 -> 26802 bytes rails-backend/db/lfs/Games/Winter One/desc.md | 13 + rails-backend/db/lfs/Games/Winter One/index.zip | Bin 0 -> 6840382 bytes rails-backend/db/lfs/Games/Winter One/title.png | Bin 0 -> 9065 bytes .../db/migrate/20240519191604_create_users.rb | 13 + ..._create_active_storage_tables.active_storage.rb | 57 + .../db/migrate/20240521205000_create_games.rb | 16 + ...40527231908_add_path_to_active_storage_blobs.rb | 5 + .../db/migrate/20240606184819_create_tags.rb | 10 + .../20240606200659_create_tags_games_join_table.rb | 8 + rails-backend/db/schema.rb | 86 + rails-backend/db/seeds.rb | 167 ++ rails-backend/docker-compose.yml | 19 + rails-backend/lib/tasks/.keep | 0 rails-backend/log/.keep | 0 rails-backend/public/robots.txt | 1 + rails-backend/storage/.keep | 0 .../channels/application_cable/connection_test.rb | 13 + rails-backend/test/controllers/.keep | 0 .../controllers/api/v1/auth_controller_test.rb | 7 + .../controllers/api/v1/games_controller_test.rb | 7 + .../controllers/api/v1/tags_controller_test.rb | 7 + .../controllers/api/v1/users_controller_test.rb | 7 + .../controllers/platform_tags_controller_test.rb | 7 + .../test/controllers/tags_controller_test.rb | 18 + rails-backend/test/fixtures/files/.keep | 0 rails-backend/test/fixtures/games.yml | 9 + rails-backend/test/fixtures/tags.yml | 9 + rails-backend/test/fixtures/users.yml | 13 + rails-backend/test/integration/.keep | 0 rails-backend/test/mailers/.keep | 0 rails-backend/test/models/.keep | 0 rails-backend/test/models/game_test.rb | 7 + rails-backend/test/models/tag_test.rb | 7 + rails-backend/test/models/user_test.rb | 7 + rails-backend/test/test_helper.rb | 15 + rails-backend/tmp/.keep | 0 rails-backend/tmp/pids/.keep | 0 rails-backend/tmp/storage/.keep | 0 rails-backend/vendor/.keep | 0 react-frontend/.eslintrc.cjs | 18 + react-frontend/.gitignore | 24 + react-frontend/README.md | 30 + react-frontend/index.html | 13 + react-frontend/package-lock.json | 2944 ++++++++++++++++++++ react-frontend/package.json | 28 + react-frontend/public/vite.svg | 1 + react-frontend/src/App.css | 42 + react-frontend/src/App.tsx | 36 + react-frontend/src/assets/react.svg | 1 + react-frontend/src/index.css | 68 + react-frontend/src/main.tsx | 10 + react-frontend/src/vite-env.d.ts | 1 + react-frontend/tsconfig.app.json | 27 + react-frontend/tsconfig.json | 11 + react-frontend/tsconfig.node.json | 13 + react-frontend/vite.config.ts | 7 + storage/.keep | 0 test/channels/application_cable/connection_test.rb | 13 - test/controllers/.keep | 0 test/controllers/api/v1/auth_controller_test.rb | 7 - test/controllers/api/v1/games_controller_test.rb | 7 - test/controllers/api/v1/tags_controller_test.rb | 7 - test/controllers/api/v1/users_controller_test.rb | 7 - test/controllers/platform_tags_controller_test.rb | 7 - test/controllers/tags_controller_test.rb | 18 - test/fixtures/files/.keep | 0 test/fixtures/games.yml | 9 - test/fixtures/tags.yml | 9 - test/fixtures/users.yml | 13 - test/integration/.keep | 0 test/mailers/.keep | 0 test/models/.keep | 0 test/models/game_test.rb | 7 - test/models/tag_test.rb | 7 - test/models/user_test.rb | 7 - test/test_helper.rb | 15 - tmp/.keep | 0 tmp/pids/.keep | 0 tmp/storage/.keep | 0 vendor/.keep | 0 257 files changed, 5500 insertions(+), 2225 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .gitignore delete mode 100644 .ruby-version delete mode 100644 Dockerfile delete mode 100644 Gemfile delete mode 100644 Gemfile.lock delete mode 100644 README.md delete mode 100644 Rakefile delete mode 100644 app/channels/application_cable/channel.rb delete mode 100644 app/channels/application_cable/connection.rb delete mode 100644 app/controllers/api/v1/auth_controller.rb delete mode 100644 app/controllers/api/v1/games_controller.rb delete mode 100644 app/controllers/api/v1/tags_controller.rb delete mode 100644 app/controllers/api/v1/users_controller.rb delete mode 100644 app/controllers/application_controller.rb delete mode 100644 app/controllers/concerns/.keep delete mode 100644 app/controllers/platform_tags_controller.rb delete mode 100644 app/jobs/application_job.rb delete mode 100644 app/mailers/application_mailer.rb delete mode 100644 app/models/application_record.rb delete mode 100644 app/models/concerns/.keep delete mode 100644 app/models/game.rb delete mode 100644 app/models/tag.rb delete mode 100644 app/models/user.rb delete mode 100644 app/views/layouts/mailer.html.erb delete mode 100644 app/views/layouts/mailer.text.erb delete mode 100755 bin/bundle delete mode 100755 bin/docker-entrypoint delete mode 100755 bin/rails delete mode 100755 bin/rake delete mode 100755 bin/setup delete mode 100644 config.ru delete mode 100644 config/application.rb delete mode 100644 config/boot.rb delete mode 100644 config/cable.yml delete mode 100644 config/credentials.yml.enc delete mode 100644 config/database.yml delete mode 100644 config/environment.rb delete mode 100644 config/environments/development.rb delete mode 100644 config/environments/production.rb delete mode 100644 config/environments/test.rb delete mode 100644 config/initializers/cors.rb delete mode 100644 config/initializers/filter_parameter_logging.rb delete mode 100644 config/initializers/inflections.rb delete mode 100644 config/locales/en.yml delete mode 100644 config/puma.rb delete mode 100644 config/routes.rb delete mode 100644 config/storage.yml delete mode 100644 db/lfs/Games/Almost Pong/card.png delete mode 100644 db/lfs/Games/Almost Pong/character.png delete mode 100644 db/lfs/Games/Almost Pong/desc.md delete mode 100644 db/lfs/Games/Almost Pong/index.zip delete mode 100644 db/lfs/Games/Almost Pong/title.png delete mode 100644 db/lfs/Games/Bubbles, Behind/card.png delete mode 100644 db/lfs/Games/Bubbles, Behind/character.png delete mode 100644 db/lfs/Games/Bubbles, Behind/desc.md delete mode 100644 db/lfs/Games/Bubbles, Behind/index.zip delete mode 100644 db/lfs/Games/Bubbles, Behind/title.png delete mode 100644 db/lfs/Games/Magnet Run/card.png delete mode 100644 db/lfs/Games/Magnet Run/character.png delete mode 100644 db/lfs/Games/Magnet Run/desc.md delete mode 100644 db/lfs/Games/Magnet Run/index.zip delete mode 100644 db/lfs/Games/Magnet Run/title.png delete mode 100644 db/lfs/Games/Optimal Direction/card.png delete mode 100644 db/lfs/Games/Optimal Direction/character.png delete mode 100644 db/lfs/Games/Optimal Direction/desc.md delete mode 100644 db/lfs/Games/Optimal Direction/index.zip delete mode 100644 db/lfs/Games/Optimal Direction/title.png delete mode 100644 db/lfs/Games/Orc: Arena of Time/card.png delete mode 100644 db/lfs/Games/Orc: Arena of Time/character.png delete mode 100644 db/lfs/Games/Orc: Arena of Time/desc.md delete mode 100644 db/lfs/Games/Orc: Arena of Time/index.zip delete mode 100644 db/lfs/Games/Orc: Arena of Time/title.png delete mode 100644 db/lfs/Games/SpaceCube 64/card.png delete mode 100644 db/lfs/Games/SpaceCube 64/character.png delete mode 100644 db/lfs/Games/SpaceCube 64/desc.md delete mode 100644 db/lfs/Games/SpaceCube 64/index.zip delete mode 100644 db/lfs/Games/SpaceCube 64/title.png delete mode 100644 db/lfs/Games/Winter One/card.png delete mode 100644 db/lfs/Games/Winter One/character.png delete mode 100644 db/lfs/Games/Winter One/desc.md delete mode 100644 db/lfs/Games/Winter One/index.zip delete mode 100644 db/lfs/Games/Winter One/title.png delete mode 100644 db/migrate/20240519191604_create_users.rb delete mode 100644 db/migrate/20240521142838_create_active_storage_tables.active_storage.rb delete mode 100644 db/migrate/20240521205000_create_games.rb delete mode 100644 db/migrate/20240527231908_add_path_to_active_storage_blobs.rb delete mode 100644 db/migrate/20240606184819_create_tags.rb delete mode 100644 db/migrate/20240606200659_create_tags_games_join_table.rb delete mode 100644 db/schema.rb delete mode 100644 db/seeds.rb delete mode 100644 docker-compose.yml delete mode 100644 lib/tasks/.keep delete mode 100644 log/.keep delete mode 100644 public/robots.txt create mode 100644 rails-backend/.dockerignore create mode 100644 rails-backend/.gitignore create mode 100644 rails-backend/.ruby-version create mode 100644 rails-backend/Dockerfile create mode 100644 rails-backend/Gemfile create mode 100644 rails-backend/Gemfile.lock create mode 100644 rails-backend/README.md create mode 100644 rails-backend/Rakefile create mode 100644 rails-backend/app/channels/application_cable/channel.rb create mode 100644 rails-backend/app/channels/application_cable/connection.rb create mode 100644 rails-backend/app/controllers/api/v1/auth_controller.rb create mode 100644 rails-backend/app/controllers/api/v1/games_controller.rb create mode 100644 rails-backend/app/controllers/api/v1/tags_controller.rb create mode 100644 rails-backend/app/controllers/api/v1/users_controller.rb create mode 100644 rails-backend/app/controllers/application_controller.rb create mode 100644 rails-backend/app/controllers/concerns/.keep create mode 100644 rails-backend/app/controllers/platform_tags_controller.rb create mode 100644 rails-backend/app/jobs/application_job.rb create mode 100644 rails-backend/app/mailers/application_mailer.rb create mode 100644 rails-backend/app/models/application_record.rb create mode 100644 rails-backend/app/models/concerns/.keep create mode 100644 rails-backend/app/models/game.rb create mode 100644 rails-backend/app/models/tag.rb create mode 100644 rails-backend/app/models/user.rb create mode 100644 rails-backend/app/views/layouts/mailer.html.erb create mode 100644 rails-backend/app/views/layouts/mailer.text.erb create mode 100755 rails-backend/bin/bundle create mode 100755 rails-backend/bin/docker-entrypoint create mode 100755 rails-backend/bin/rails create mode 100755 rails-backend/bin/rake create mode 100755 rails-backend/bin/setup create mode 100644 rails-backend/config.ru create mode 100644 rails-backend/config/application.rb create mode 100644 rails-backend/config/boot.rb create mode 100644 rails-backend/config/cable.yml create mode 100644 rails-backend/config/credentials.yml.enc create mode 100644 rails-backend/config/database.yml create mode 100644 rails-backend/config/environment.rb create mode 100644 rails-backend/config/environments/development.rb create mode 100644 rails-backend/config/environments/production.rb create mode 100644 rails-backend/config/environments/test.rb create mode 100644 rails-backend/config/initializers/cors.rb create mode 100644 rails-backend/config/initializers/filter_parameter_logging.rb create mode 100644 rails-backend/config/initializers/inflections.rb create mode 100644 rails-backend/config/locales/en.yml create mode 100644 rails-backend/config/puma.rb create mode 100644 rails-backend/config/routes.rb create mode 100644 rails-backend/config/storage.yml create mode 100644 rails-backend/db/lfs/Games/Almost Pong/card.png create mode 100644 rails-backend/db/lfs/Games/Almost Pong/character.png create mode 100644 rails-backend/db/lfs/Games/Almost Pong/desc.md create mode 100644 rails-backend/db/lfs/Games/Almost Pong/index.zip create mode 100644 rails-backend/db/lfs/Games/Almost Pong/title.png create mode 100644 rails-backend/db/lfs/Games/Bubbles, Behind/card.png create mode 100644 rails-backend/db/lfs/Games/Bubbles, Behind/character.png create mode 100644 rails-backend/db/lfs/Games/Bubbles, Behind/desc.md create mode 100644 rails-backend/db/lfs/Games/Bubbles, Behind/index.zip create mode 100644 rails-backend/db/lfs/Games/Bubbles, Behind/title.png create mode 100644 rails-backend/db/lfs/Games/Magnet Run/card.png create mode 100644 rails-backend/db/lfs/Games/Magnet Run/character.png create mode 100644 rails-backend/db/lfs/Games/Magnet Run/desc.md create mode 100644 rails-backend/db/lfs/Games/Magnet Run/index.zip create mode 100644 rails-backend/db/lfs/Games/Magnet Run/title.png create mode 100644 rails-backend/db/lfs/Games/Optimal Direction/card.png create mode 100644 rails-backend/db/lfs/Games/Optimal Direction/character.png create mode 100644 rails-backend/db/lfs/Games/Optimal Direction/desc.md create mode 100644 rails-backend/db/lfs/Games/Optimal Direction/index.zip create mode 100644 rails-backend/db/lfs/Games/Optimal Direction/title.png create mode 100644 rails-backend/db/lfs/Games/Orc: Arena of Time/card.png create mode 100644 rails-backend/db/lfs/Games/Orc: Arena of Time/character.png create mode 100644 rails-backend/db/lfs/Games/Orc: Arena of Time/desc.md create mode 100644 rails-backend/db/lfs/Games/Orc: Arena of Time/index.zip create mode 100644 rails-backend/db/lfs/Games/Orc: Arena of Time/title.png create mode 100644 rails-backend/db/lfs/Games/SpaceCube 64/card.png create mode 100644 rails-backend/db/lfs/Games/SpaceCube 64/character.png create mode 100644 rails-backend/db/lfs/Games/SpaceCube 64/desc.md create mode 100644 rails-backend/db/lfs/Games/SpaceCube 64/index.zip create mode 100644 rails-backend/db/lfs/Games/SpaceCube 64/title.png create mode 100644 rails-backend/db/lfs/Games/Winter One/card.png create mode 100644 rails-backend/db/lfs/Games/Winter One/character.png create mode 100644 rails-backend/db/lfs/Games/Winter One/desc.md create mode 100644 rails-backend/db/lfs/Games/Winter One/index.zip create mode 100644 rails-backend/db/lfs/Games/Winter One/title.png create mode 100644 rails-backend/db/migrate/20240519191604_create_users.rb create mode 100644 rails-backend/db/migrate/20240521142838_create_active_storage_tables.active_storage.rb create mode 100644 rails-backend/db/migrate/20240521205000_create_games.rb create mode 100644 rails-backend/db/migrate/20240527231908_add_path_to_active_storage_blobs.rb create mode 100644 rails-backend/db/migrate/20240606184819_create_tags.rb create mode 100644 rails-backend/db/migrate/20240606200659_create_tags_games_join_table.rb create mode 100644 rails-backend/db/schema.rb create mode 100644 rails-backend/db/seeds.rb create mode 100644 rails-backend/docker-compose.yml create mode 100644 rails-backend/lib/tasks/.keep create mode 100644 rails-backend/log/.keep create mode 100644 rails-backend/public/robots.txt create mode 100644 rails-backend/storage/.keep create mode 100644 rails-backend/test/channels/application_cable/connection_test.rb create mode 100644 rails-backend/test/controllers/.keep create mode 100644 rails-backend/test/controllers/api/v1/auth_controller_test.rb create mode 100644 rails-backend/test/controllers/api/v1/games_controller_test.rb create mode 100644 rails-backend/test/controllers/api/v1/tags_controller_test.rb create mode 100644 rails-backend/test/controllers/api/v1/users_controller_test.rb create mode 100644 rails-backend/test/controllers/platform_tags_controller_test.rb create mode 100644 rails-backend/test/controllers/tags_controller_test.rb create mode 100644 rails-backend/test/fixtures/files/.keep create mode 100644 rails-backend/test/fixtures/games.yml create mode 100644 rails-backend/test/fixtures/tags.yml create mode 100644 rails-backend/test/fixtures/users.yml create mode 100644 rails-backend/test/integration/.keep create mode 100644 rails-backend/test/mailers/.keep create mode 100644 rails-backend/test/models/.keep create mode 100644 rails-backend/test/models/game_test.rb create mode 100644 rails-backend/test/models/tag_test.rb create mode 100644 rails-backend/test/models/user_test.rb create mode 100644 rails-backend/test/test_helper.rb create mode 100644 rails-backend/tmp/.keep create mode 100644 rails-backend/tmp/pids/.keep create mode 100644 rails-backend/tmp/storage/.keep create mode 100644 rails-backend/vendor/.keep create mode 100644 react-frontend/.eslintrc.cjs create mode 100644 react-frontend/.gitignore create mode 100644 react-frontend/README.md create mode 100644 react-frontend/index.html create mode 100644 react-frontend/package-lock.json create mode 100644 react-frontend/package.json create mode 100644 react-frontend/public/vite.svg create mode 100644 react-frontend/src/App.css create mode 100644 react-frontend/src/App.tsx create mode 100644 react-frontend/src/assets/react.svg create mode 100644 react-frontend/src/index.css create mode 100644 react-frontend/src/main.tsx create mode 100644 react-frontend/src/vite-env.d.ts create mode 100644 react-frontend/tsconfig.app.json create mode 100644 react-frontend/tsconfig.json create mode 100644 react-frontend/tsconfig.node.json create mode 100644 react-frontend/vite.config.ts delete mode 100644 storage/.keep delete mode 100644 test/channels/application_cable/connection_test.rb delete mode 100644 test/controllers/.keep delete mode 100644 test/controllers/api/v1/auth_controller_test.rb delete mode 100644 test/controllers/api/v1/games_controller_test.rb delete mode 100644 test/controllers/api/v1/tags_controller_test.rb delete mode 100644 test/controllers/api/v1/users_controller_test.rb delete mode 100644 test/controllers/platform_tags_controller_test.rb delete mode 100644 test/controllers/tags_controller_test.rb delete mode 100644 test/fixtures/files/.keep delete mode 100644 test/fixtures/games.yml delete mode 100644 test/fixtures/tags.yml delete mode 100644 test/fixtures/users.yml delete mode 100644 test/integration/.keep delete mode 100644 test/mailers/.keep delete mode 100644 test/models/.keep delete mode 100644 test/models/game_test.rb delete mode 100644 test/models/tag_test.rb delete mode 100644 test/models/user_test.rb delete mode 100644 test/test_helper.rb delete mode 100644 tmp/.keep delete mode 100644 tmp/pids/.keep delete mode 100644 tmp/storage/.keep delete mode 100644 vendor/.keep diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index bb56daf..0000000 --- a/.dockerignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files. - -# Ignore git directory. -/.git/ - -# Ignore bundler config. -/.bundle - -# Ignore all environment files (except templates). -/.env* -!/.env*.erb - -# Ignore all default key files. -/config/master.key -/config/credentials/*.key - -# Ignore all logfiles and tempfiles. -/log/* -/tmp/* -!/log/.keep -!/tmp/.keep - -# Ignore pidfiles, but keep the directory. -/tmp/pids/* -!/tmp/pids/.keep - -# Ignore storage (uploaded files in development and any SQLite databases). -/storage/* -!/storage/.keep -/tmp/storage/* -!/tmp/storage/.keep diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 752ce8c..0000000 --- a/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore secrets -/config/local_env.yml - -# Ignore bundler config. -/.bundle - -# Ignore all environment files (except templates). -**/.env* -!*/.env*.erb -**/env.toml - -# Ignore all logfiles and tempfiles. -/log/* -/tmp/* -!/log/.keep -!/tmp/.keep - -# Ignore pidfiles, but keep the directory. -/tmp/pids/* -!/tmp/pids/ -!/tmp/pids/.keep - -# Ignore storage (uploaded files in development and any SQLite databases). -/storage/* -!/storage/.keep -/tmp/storage/* -!/tmp/storage/ -!/tmp/storage/.keep - -# Ignore master key for decrypting credentials and more. -/config/master.key diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index fefb2b7..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -ruby-3.3.3 diff --git a/.tool-versions b/.tool-versions index d554c9c..c51dbdf 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1,2 @@ ruby 3.3.3 +nodejs 22.3.0 diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index e68d5a7..0000000 --- a/Dockerfile +++ /dev/null @@ -1,63 +0,0 @@ -# syntax = docker/dockerfile:1 - -# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile -ARG RUBY_VERSION=3.3.3 -#FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base -FROM registry.docker.com/library/ruby:$RUBY_VERSION-alpine3.20 as base - -# Rails app lives here -WORKDIR /rails - -# Set production environment -ENV RAILS_ENV="production" \ - BUNDLE_DEPLOYMENT="1" \ - BUNDLE_PATH="/usr/local/bundle" \ - BUNDLE_WITHOUT="development" - - -# Throw-away build stage to reduce size of final image -FROM base as build - -# Install packages needed to build gems -#RUN apt-get update -qq && \ -# apt-get install --no-install-recommends -y build-essential git libpq-dev libvips pkg-config -RUN apk add --update --no-cache build-base git vips postgresql-libs postgresql-dev tzdata - -# Install application gems -COPY Gemfile Gemfile.lock ./ -RUN bundle install && \ - rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ - bundle exec bootsnap precompile --gemfile && echo BLAAAAHHHH - -# Copy application code -COPY . . - -# Precompile bootsnap code for faster boot times -RUN bundle exec bootsnap precompile app/ lib/ - - -# Final stage for app image -FROM base - -# Install packages needed for deployment -#RUN apt-get update -qq && \ -# apt-get install --no-install-recommends -y curl libvips postgresql-client && \ -# rm -rf /var/lib/apt/lists /var/cache/apt/archives -RUN apk add --update --no-cache curl vips postgresql-client - -# Copy built artifacts: gems, application -COPY --from=build /usr/local/bundle /usr/local/bundle -COPY --from=build /rails /rails - -# Run and own only the runtime files as a non-root user for security -#RUN useradd rails --create-home --shell /bin/bash && \ -RUN adduser rails --disabled-password --shell /bin/ash && \ - chown -R rails:rails db log storage tmp -USER rails:rails - -# Entrypoint prepares the database. -ENTRYPOINT ["/rails/bin/docker-entrypoint"] - -# Start the server by default, this can be overwritten at runtime -EXPOSE 3000 -CMD ["./bin/rails", "server"] diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 5b0c3d2..0000000 --- a/Gemfile +++ /dev/null @@ -1,52 +0,0 @@ -source "https://rubygems.org" - -ruby "3.3.3" - -# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 7.1.3", ">= 7.1.3.3" - -# Use postgresql as the database for Active Record -gem "pg", "~> 1.1" - -# Use the Puma web server [https://github.com/puma/puma] -gem "puma", ">= 5.0" - -# Build JSON APIs with ease [https://github.com/rails/jbuilder] -# gem "jbuilder" - -# Use Redis adapter to run Action Cable in production -# gem "redis", ">= 4.0.1" - -# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] -# gem "kredis" - -# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] -gem "bcrypt", "~> 3.1.7" - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem "tzinfo-data"#, platforms: %i[ windows jruby ] - -# Reduces boot times through caching; required in config/boot.rb -gem "bootsnap", require: false - -# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] -# gem "image_processing", "~> 1.2" - -# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin Ajax possible -gem "rack-cors" - -# Reading TOML files -gem 'tomlib', '~> 0.7.2' - -group :development, :test do - # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - gem "debug", platforms: %i[ mri windows ] -end - -group :development do - # Speed up commands on slow machines / big apps [https://github.com/rails/spring] - # gem "spring" -end - - -gem "rubyzip", "~> 2.3" diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 2c89747..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,226 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - actioncable (7.1.3.4) - actionpack (= 7.1.3.4) - activesupport (= 7.1.3.4) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - zeitwerk (~> 2.6) - actionmailbox (7.1.3.4) - actionpack (= 7.1.3.4) - activejob (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.3.4) - actionpack (= 7.1.3.4) - actionview (= 7.1.3.4) - activejob (= 7.1.3.4) - activesupport (= 7.1.3.4) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp - rails-dom-testing (~> 2.2) - actionpack (7.1.3.4) - actionview (= 7.1.3.4) - activesupport (= 7.1.3.4) - nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4) - rack-session (>= 1.0.1) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - actiontext (7.1.3.4) - actionpack (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) - globalid (>= 0.6.0) - nokogiri (>= 1.8.5) - actionview (7.1.3.4) - activesupport (= 7.1.3.4) - builder (~> 3.1) - erubi (~> 1.11) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - activejob (7.1.3.4) - activesupport (= 7.1.3.4) - globalid (>= 0.3.6) - activemodel (7.1.3.4) - activesupport (= 7.1.3.4) - activerecord (7.1.3.4) - activemodel (= 7.1.3.4) - activesupport (= 7.1.3.4) - timeout (>= 0.4.0) - activestorage (7.1.3.4) - actionpack (= 7.1.3.4) - activejob (= 7.1.3.4) - activerecord (= 7.1.3.4) - activesupport (= 7.1.3.4) - marcel (~> 1.0) - activesupport (7.1.3.4) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - base64 (0.2.0) - bcrypt (3.1.20) - bigdecimal (3.1.8) - bootsnap (1.18.3) - msgpack (~> 1.2) - builder (3.3.0) - concurrent-ruby (1.3.3) - connection_pool (2.4.1) - crass (1.0.6) - date (3.3.4) - debug (1.9.2) - irb (~> 1.10) - reline (>= 0.3.8) - drb (2.2.1) - erubi (1.13.0) - globalid (1.2.1) - activesupport (>= 6.1) - i18n (1.14.5) - concurrent-ruby (~> 1.0) - io-console (0.7.2) - irb (1.13.2) - rdoc (>= 4.0.0) - reline (>= 0.4.2) - loofah (2.22.0) - crass (~> 1.0.2) - nokogiri (>= 1.12.0) - mail (2.8.1) - mini_mime (>= 0.1.1) - net-imap - net-pop - net-smtp - marcel (1.0.4) - mini_mime (1.1.5) - minitest (5.24.0) - msgpack (1.7.2) - mutex_m (0.2.0) - net-imap (0.4.13) - date - net-protocol - net-pop (0.1.2) - net-protocol - net-protocol (0.2.2) - timeout - net-smtp (0.5.0) - net-protocol - nio4r (2.7.3) - nokogiri (1.16.6-aarch64-linux) - racc (~> 1.4) - nokogiri (1.16.6-arm-linux) - racc (~> 1.4) - nokogiri (1.16.6-arm64-darwin) - racc (~> 1.4) - nokogiri (1.16.6-x86-linux) - racc (~> 1.4) - nokogiri (1.16.6-x86_64-darwin) - racc (~> 1.4) - nokogiri (1.16.6-x86_64-linux) - racc (~> 1.4) - pg (1.5.6) - psych (5.1.2) - stringio - puma (6.4.2) - nio4r (~> 2.0) - racc (1.8.0) - rack (3.1.3) - rack-cors (2.0.2) - rack (>= 2.0.0) - rack-session (2.0.0) - rack (>= 3.0.0) - rack-test (2.1.0) - rack (>= 1.3) - rackup (2.1.0) - rack (>= 3) - webrick (~> 1.8) - rails (7.1.3.4) - actioncable (= 7.1.3.4) - actionmailbox (= 7.1.3.4) - actionmailer (= 7.1.3.4) - actionpack (= 7.1.3.4) - actiontext (= 7.1.3.4) - actionview (= 7.1.3.4) - activejob (= 7.1.3.4) - activemodel (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) - bundler (>= 1.15.0) - railties (= 7.1.3.4) - rails-dom-testing (2.2.0) - activesupport (>= 5.0.0) - minitest - nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) - loofah (~> 2.21) - nokogiri (~> 1.14) - railties (7.1.3.4) - actionpack (= 7.1.3.4) - activesupport (= 7.1.3.4) - irb - rackup (>= 1.0.0) - rake (>= 12.2) - thor (~> 1.0, >= 1.2.2) - zeitwerk (~> 2.6) - rake (13.2.1) - rdoc (6.7.0) - psych (>= 4.0.0) - reline (0.5.9) - io-console (~> 0.5) - rubyzip (2.3.2) - stringio (3.1.1) - thor (1.3.1) - timeout (0.4.1) - tomlib (0.7.2) - bigdecimal - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - tzinfo-data (1.2024.1) - tzinfo (>= 1.0.0) - webrick (1.8.1) - websocket-driver (0.7.6) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - zeitwerk (2.6.16) - -PLATFORMS - aarch64-linux - arm-linux - arm64-darwin - x86-linux - x86_64-darwin - x86_64-linux - -DEPENDENCIES - bcrypt (~> 3.1.7) - bootsnap - debug - pg (~> 1.1) - puma (>= 5.0) - rack-cors - rails (~> 7.1.3, >= 7.1.3.3) - rubyzip (~> 2.3) - tomlib (~> 0.7.2) - tzinfo-data - -RUBY VERSION - ruby 3.3.3p89 - -BUNDLED WITH - 2.5.13 diff --git a/README.md b/README.md deleted file mode 100644 index 85de49a..0000000 --- a/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Game Holster - -Game holster is a full-stack Ruby on Rails and React application for uploading and serving web games made with common game engines such as Unity, Godot, Raylib, and more. - -Currently implemented features in the backend are: -- User authentication: users can log in using GitHub OAuth -- Game Upload: Once a user is logged in they can upload a game which will then belong to them -- Game Serving: Games can be played by users. The games are served under a different domain in order to make XSS attacks impossible in-case a user uploads compromised files. - -The front-end is temporarily my [personal website](https://malcz.com/games) which is made using React. However I am working on a new React frontend in order to have this application be completely standalone and more accessible. diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 9a5ea73..0000000 --- a/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require_relative "config/application" - -Rails.application.load_tasks diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb deleted file mode 100644 index d672697..0000000 --- a/app/channels/application_cable/channel.rb +++ /dev/null @@ -1,4 +0,0 @@ -module ApplicationCable - class Channel < ActionCable::Channel::Base - end -end diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb deleted file mode 100644 index 0ff5442..0000000 --- a/app/channels/application_cable/connection.rb +++ /dev/null @@ -1,4 +0,0 @@ -module ApplicationCable - class Connection < ActionCable::Connection::Base - end -end diff --git a/app/controllers/api/v1/auth_controller.rb b/app/controllers/api/v1/auth_controller.rb deleted file mode 100644 index 590be3b..0000000 --- a/app/controllers/api/v1/auth_controller.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'net/http' -require 'bcrypt' - -class Api::V1::AuthController < ApplicationController - class << self - end - - def data - if !cookies[:session].nil? - puts cookies[:session] - #render json: Api::V1::AuthController.user_table[cookies[:session]] - result = User.find_by(access_token_digest: cookies[:session]) - puts "--- RESULT: ---" - puts result - render json: result - else - puts "Not logged in" - render json: { info: "Not logged in" }, status: 401 - end - end - def callback - # user logs in through github - # github redirects them to this endpoint with the token in the url as query params - # we need to use this token to exchange with github for user info(i.e username) - #puts "Code: #{params[:code]}" # this is the github token - #puts ENV["GITHUB_CLIENT_SECRET"] - #puts ENV["GITHUB_CLIENT_ID"] - access_token = get_access_token(params[:code]) - user_data = JSON.parse(get_github_user_data(access_token)) - #puts "------------------------- USER DATA: ------------------------- " - #pp user_data - id = user_data['id'].to_s - #puts "id: #{id}, at: #{access_token}" - access_token_digest = BCrypt::Password.create(access_token) - #cookies[:session] = access_token_digest - cookies[:session] = { - value: access_token_digest, - #domain: :all, - #same_site: :none, - secure: true - } - #user_params = { - # # access_token_digest: hashed_token, - # user_data: user_data - #} - #puts "USER DATA HERE NERD" - #puts user_data.class - user = User.find_or_create_by(identifier: id) - user.user_data = user_data - user.access_token_digest = access_token_digest - user.user_name = user_data["login"] - user.save - #redirect_to 'http://localhost:5173/', allow_other_host: true - redirect_to "#{ENV['ROOT_DOMAIN']}/closewindow", allow_other_host: true - end - - private - - def get_github_user_data(access_token) - uri = URI("https://api.github.com/user") - headers = { Authorization: "Bearer #{access_token}" } - response = Net::HTTP.get( - uri, - headers - ) - puts "Response Body" - puts response - #if response.is_a?(Net::HTTPSuccess) - #if response.body.nil? - result = response - if !result["error"].nil? - puts "Error: #{result["error"]}" - puts response - # we had an error - # TODO - else - puts "huh?" if result.nil? - return result - end - #else - # puts "Error(body nil)" - # something went wrong? - # TODO - #end - end - - def get_access_token(github_user_code) - uri = URI("https://github.com/login/oauth/access_token?client_id=#{ENV["GITHUB_CLIENT_ID"]}&client_secret=#{ENV["GITHUB_CLIENT_SECRET"]}&code=#{github_user_code}") - #uri = URI('https://github.com/login/oauth/access_token') - headers = {Accept: 'application/json'} - response = Net::HTTP.post( - uri, - nil, - headers - ) - if response.is_a?(Net::HTTPSuccess) - result = JSON.parse(response.body) - if !result["error"].nil? - # we had an error - else - return result["access_token"] - end - else - # something went wrong? - # TODO - end - end -end - diff --git a/app/controllers/api/v1/games_controller.rb b/app/controllers/api/v1/games_controller.rb deleted file mode 100644 index 4346244..0000000 --- a/app/controllers/api/v1/games_controller.rb +++ /dev/null @@ -1,167 +0,0 @@ -require "zip" - -class Api::V1::GamesController < ApplicationController - #skip_before_action :verify_authenticity_token - before_action :allow_iframe, only: [:show_file] - def create - puts "----- PARAMS PLATFORM TAG ----------" - pp params["game"]["platform_tag"] - user = User.find_by(access_token_digest: cookies[:session]) - #user = User.first # temporary for debug - if(!user) - render json: {session: cookies[:session]}, status: 401 - else - pp params - - @game = user.games.new(game_params.except(:status, :platform_tag)) - @game.titleSlug = game_params[:title].parameterize - @game.status = game_params[:status].to_i - if !params["game"]["platform_tag"].nil? - params["game"]["platform_tag"].each do |tag| - tag_obj = Tag.find_by(tag_type: "platform", name: tag) - if tag_obj - @game.tags << tag_obj - end - end - end - - @game.save_zip(params[:game][:zip]) - - if @game.save - render json: @game, status: :created - else - render json: @game.errors, status: :unprocessable_entity - end - end - end - - - # list of all games - def index - game = Game.all.order(created_at: :desc) - #render json: game - render json: game.to_json(include: [:game_files, :card_img, :char_img, :title_img, :tags]) - end - - # single game or list of user's games - #get 'games/:user/:game', to: 'games#show' - #get 'games/:user', to: 'games#show' - def show - user = User.find_by! user_name: params[:user] - if params[:game].nil? - # get list of user games - games = Game.where(user_id: user.id).order(created_at: :desc) - render json: games.to_json(include: [:tags]) - else - game = Game.find_by! user_id: user.id, titleSlug: params[:game] - render json: game.to_json(include: [:tags]) - # get game - end - end - - # :user/:game/*path/:file - def show_file - user = User.find_by user_name: params[:user] - - # if no user given then just show all games - if(user.nil?) - game = Game.all.order(created_at: :desc) - render json: game - return - end - - game = Game.find_by user_id: user.id, titleSlug: params[:game] - - # if no game given then just show all games from that user - if(game.nil?) - game = Game.all.order(created_at: :desc) - render json: game - return - end - - # format and file is seperated in rails - filename = params[:file] - if !params[:format].nil? - filename = "#{filename}.#{params[:format]}" - end - - # if we have no path, make it a blank string - # this lets us later match with files that are in the root - params[:path] ||= "" - - result = game.game_files.blobs.find_by(filename: filename, filepath: params[:path].delete_suffix('/').delete_prefix('/')) # TODO check if we need to do the prefix/suffix deletion at all - - # we shouldnt need this - #result ||= game.game_files.blobs.find_by(filename: filename) - if(result.nil?) - game = Game.all.order(created_at: :desc) - render json: { filename: filename, filepath: params[:path] } - #render json: game - return - end - - format = filename.rpartition('.').last - if format == "html" - render html: result.download.html_safe - elsif format == "js" - render js: result.download.html_safe - #else - # redirect_to url_for(result) - #end - elsif format == "gz" - response.headers['Content-Encoding'] = 'gzip' - second_ext = filename.rpartition('.').first.rpartition('.').last - if second_ext == 'js' - send_data result.download.html_safe, filename: filename, disposition: "inline", type: "application/javascript" - elsif second_ext == 'wasm' - send_data result.download.html_safe, filename: filename, disposition: "inline", type: "application/wasm" - elsif second_ext == 'data' - send_data result.download.html_safe, filename: filename, disposition: "inline", type: "application/octet-stream" - else - send_data result.download.html_safe, filename: filename, disposition: "inline" - end - else - send_data result.download.html_safe, filename: filename, disposition: "inline" - end - end - - #get 'imggames/:user/:game?type=___', to: 'games#show_img' - def show_img - user = User.find_by! user_name: params[:user] - game = Game.find_by! user_id: user.id, titleSlug: params[:game] - - result = nil; - if params[:type] == "char" - result = game.char_img.download - elsif params[:type] == "title" - result = game.title_img.download - elsif params[:type] == "card" - result = game.card_img.download - end - - send_data result, type: 'image/png', disposition: 'inline' - end - - private - - def game_params - params.require(:game).permit( - :title, - :description, - :github_link, - :img_rendering, - :status, - :order, - :card_img, - :char_img, - :title_img, - :zip, - :platform_tag - #game_files: [] - ) - end - - def allow_iframe - response.headers.delete('X-Frame-Options') - end -end diff --git a/app/controllers/api/v1/tags_controller.rb b/app/controllers/api/v1/tags_controller.rb deleted file mode 100644 index 4b31de8..0000000 --- a/app/controllers/api/v1/tags_controller.rb +++ /dev/null @@ -1,15 +0,0 @@ -class Api::V1::TagsController < ApplicationController - - def index - if !params[:tag_type].nil? - tag = Tag.where(tag_type: params[:tag_type]).order(name: :asc) - - render json: tag.to_json - else - tag = Tag.all.order(tag_type: :desc, name: :asc) - #render json: tag - render json: tag.to_json - end - end - -end diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb deleted file mode 100644 index ad27ad6..0000000 --- a/app/controllers/api/v1/users_controller.rb +++ /dev/null @@ -1,10 +0,0 @@ -class Api::V1::UsersController < ApplicationController - def index - # return list of all users - users = User.all.order(created_at: :desc) - #render json: users.to_json(only: [:name]) - #render json: users.to_json(only: [:user]) - #render json: users.to_json(only: { only: [:name] }) - render json: users.to_json(include: [games: { only: [:title, :titleSlug] }]) - end -end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb deleted file mode 100644 index 31e16d7..0000000 --- a/app/controllers/application_controller.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ApplicationController < ActionController::API - include ActionController::Cookies - include ActionController::RequestForgeryProtection -end diff --git a/app/controllers/concerns/.keep b/app/controllers/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/app/controllers/platform_tags_controller.rb b/app/controllers/platform_tags_controller.rb deleted file mode 100644 index e3f7392..0000000 --- a/app/controllers/platform_tags_controller.rb +++ /dev/null @@ -1,8 +0,0 @@ -class PlatformTagsController < ApplicationController - def index - end - def create - tag = PlatformTag.create!(user_params) - render json: { status: "OK", message: "Tag created" }, status: 201 - end -end diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb deleted file mode 100644 index d394c3d..0000000 --- a/app/jobs/application_job.rb +++ /dev/null @@ -1,7 +0,0 @@ -class ApplicationJob < ActiveJob::Base - # Automatically retry jobs that encountered a deadlock - # retry_on ActiveRecord::Deadlocked - - # Most jobs are safe to ignore if the underlying records are no longer available - # discard_on ActiveJob::DeserializationError -end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb deleted file mode 100644 index 3c34c81..0000000 --- a/app/mailers/application_mailer.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ApplicationMailer < ActionMailer::Base - default from: "from@example.com" - layout "mailer" -end diff --git a/app/models/application_record.rb b/app/models/application_record.rb deleted file mode 100644 index b63caeb..0000000 --- a/app/models/application_record.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationRecord < ActiveRecord::Base - primary_abstract_class -end diff --git a/app/models/concerns/.keep b/app/models/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/app/models/game.rb b/app/models/game.rb deleted file mode 100644 index e30dfae..0000000 --- a/app/models/game.rb +++ /dev/null @@ -1,39 +0,0 @@ -require "zip" - -class Game < ApplicationRecord - enum status: { draft: 0, published: 1 } - #enum status: { - # draft: 0, - # published: 1 - #} - belongs_to :user - has_many_attached :game_files - has_one_attached :zip - has_one_attached :card_img - has_one_attached :char_img - has_one_attached :title_img - has_and_belongs_to_many :tags - - def save_zip(zip) - Zip::File.open(zip) do |zipfile| - - zipfile.each do |entry| - if entry.file? - path_name = entry.name.rpartition('/') - name_extension = path_name.last.rpartition('.') - - Tempfile.open([name_extension.first, name_extension[1] + name_extension.last]) do |temp_file| - entry.extract(temp_file.path) { true } - self.game_files.attach(io: File.open(temp_file.path), filename: path_name.last) - self.game_files.last.blob.filepath = path_name.first.delete_suffix('/').delete_prefix('/') - - # saving the game wont have the blob saved so we need to do it manually - self.game_files.last.blob.save - end - - end - end - end - - end -end diff --git a/app/models/tag.rb b/app/models/tag.rb deleted file mode 100644 index e92f654..0000000 --- a/app/models/tag.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Tag < ApplicationRecord - has_and_belongs_to_many :users -end diff --git a/app/models/user.rb b/app/models/user.rb deleted file mode 100644 index 0dd552d..0000000 --- a/app/models/user.rb +++ /dev/null @@ -1,4 +0,0 @@ -class User < ApplicationRecord - validates :identifier, presence: true - has_many :games -end diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb deleted file mode 100644 index 3aac900..0000000 --- a/app/views/layouts/mailer.html.erb +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - <%= yield %> - - diff --git a/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb deleted file mode 100644 index 37f0bdd..0000000 --- a/app/views/layouts/mailer.text.erb +++ /dev/null @@ -1 +0,0 @@ -<%= yield %> diff --git a/bin/bundle b/bin/bundle deleted file mode 100755 index 50da5fd..0000000 --- a/bin/bundle +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'bundle' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require "rubygems" - -m = Module.new do - module_function - - def invoked_as_script? - File.expand_path($0) == File.expand_path(__FILE__) - end - - def env_var_version - ENV["BUNDLER_VERSION"] - end - - def cli_arg_version - return unless invoked_as_script? # don't want to hijack other binstubs - return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` - bundler_version = nil - update_index = nil - ARGV.each_with_index do |a, i| - if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN) - bundler_version = a - end - next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ - bundler_version = $1 - update_index = i - end - bundler_version - end - - def gemfile - gemfile = ENV["BUNDLE_GEMFILE"] - return gemfile if gemfile && !gemfile.empty? - - File.expand_path("../Gemfile", __dir__) - end - - def lockfile - lockfile = - case File.basename(gemfile) - when "gems.rb" then gemfile.sub(/\.rb$/, ".locked") - else "#{gemfile}.lock" - end - File.expand_path(lockfile) - end - - def lockfile_version - return unless File.file?(lockfile) - lockfile_contents = File.read(lockfile) - return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ - Regexp.last_match(1) - end - - def bundler_requirement - @bundler_requirement ||= - env_var_version || - cli_arg_version || - bundler_requirement_for(lockfile_version) - end - - def bundler_requirement_for(version) - return "#{Gem::Requirement.default}.a" unless version - - bundler_gem_version = Gem::Version.new(version) - - bundler_gem_version.approximate_recommendation - end - - def load_bundler! - ENV["BUNDLE_GEMFILE"] ||= gemfile - - activate_bundler - end - - def activate_bundler - gem_error = activation_error_handling do - gem "bundler", bundler_requirement - end - return if gem_error.nil? - require_error = activation_error_handling do - require "bundler/version" - end - return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) - warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" - exit 42 - end - - def activation_error_handling - yield - nil - rescue StandardError, LoadError => e - e - end -end - -m.load_bundler! - -if m.invoked_as_script? - load Gem.bin_path("bundler", "bundle") -end diff --git a/bin/docker-entrypoint b/bin/docker-entrypoint deleted file mode 100755 index 93e0f12..0000000 --- a/bin/docker-entrypoint +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/ash -e - -# If running the rails server then create or migrate existing database -if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then - ./bin/rails db:prepare - ./bin/rails db:seed -fi - -exec "${@}" diff --git a/bin/rails b/bin/rails deleted file mode 100755 index efc0377..0000000 --- a/bin/rails +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -APP_PATH = File.expand_path("../config/application", __dir__) -require_relative "../config/boot" -require "rails/commands" diff --git a/bin/rake b/bin/rake deleted file mode 100755 index 4fbf10b..0000000 --- a/bin/rake +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -require_relative "../config/boot" -require "rake" -Rake.application.run diff --git a/bin/setup b/bin/setup deleted file mode 100755 index 3cd5a9d..0000000 --- a/bin/setup +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env ruby -require "fileutils" - -# path to your application root. -APP_ROOT = File.expand_path("..", __dir__) - -def system!(*args) - system(*args, exception: true) -end - -FileUtils.chdir APP_ROOT do - # This script is a way to set up or update your development environment automatically. - # This script is idempotent, so that you can run it at any time and get an expectable outcome. - # Add necessary setup steps to this file. - - puts "== Installing dependencies ==" - system! "gem install bundler --conservative" - system("bundle check") || system!("bundle install") - - # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # FileUtils.cp "config/database.yml.sample", "config/database.yml" - # end - - puts "\n== Preparing database ==" - system! "bin/rails db:prepare" - - puts "\n== Removing old logs and tempfiles ==" - system! "bin/rails log:clear tmp:clear" - - puts "\n== Restarting application server ==" - system! "bin/rails restart" -end diff --git a/captain-definition b/captain-definition index 17db556..11ba6c0 100644 --- a/captain-definition +++ b/captain-definition @@ -1,4 +1,4 @@ { "schemaVersion": 2, - "dockerfilePath": "./Dockerfile" + "dockerfilePath": "./rails-backend/Dockerfile" } diff --git a/config.ru b/config.ru deleted file mode 100644 index 4a3c09a..0000000 --- a/config.ru +++ /dev/null @@ -1,6 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require_relative "config/environment" - -run Rails.application -Rails.application.load_server diff --git a/config/application.rb b/config/application.rb deleted file mode 100644 index 6e54549..0000000 --- a/config/application.rb +++ /dev/null @@ -1,68 +0,0 @@ -require_relative "boot" - -require "rails/all" -require 'tomlib' - -# Require the gems listed in Gemfile, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(*Rails.groups) - -module GameHolster - class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.1 - - # Please, add to the `ignore` list any other `lib` subdirectories that do - # not contain `.rb` files, or that should not be reloaded or eager loaded. - # Common ones are `templates`, `generators`, or `middleware`, for example. - config.autoload_lib(ignore: %w(assets tasks)) - - # Configuration for the application, engines, and railties goes here. - # - # These settings can be overridden in specific environments using the files - # in config/environments, which are processed later. - # - # config.time_zone = "Central Time (US & Canada)" - # config.eager_load_paths << Rails.root.join("extras") - - # Only loads a smaller set of middleware suitable for API only apps. - # Middleware like session, flash, cookies can be added back manually. - # Skip views, helpers and assets when generating a new resource. - config.api_only = true - - config.middleware.use ActionDispatch::Cookies - config.middleware.use ActionDispatch::Session::CookieStore - - config.active_storage.content_types_allowed_inline << "text/html" - - #localhost:5173 - #config.session_store :cookie_store, key: 'session', domain: :all, tld_length: 5 - - #config.before_configuration do - # env_file = File.join(Rails.root, 'config', 'local_env.yml') - # if File.exist?(env_file) - # YAML.load(File.open(env_file)).each do |key, value| - # ENV[key.to_s] = value - # end - # end - #end - config.before_configuration do - env_file = File.join(Rails.root, 'config', 'env.toml') - if File.exist?(env_file) - env = Tomlib.load(File.read(env_file)) - env['default'].each do |key, value| - ENV[key] = value - end - if Rails.env.production? - env['production'].each do |key, value| - ENV[key] = value - end - elsif Rails.env.development? - env['development'].each do |key, value| - ENV[key] = value - end - end - end - end - end -end diff --git a/config/boot.rb b/config/boot.rb deleted file mode 100644 index 988a5dd..0000000 --- a/config/boot.rb +++ /dev/null @@ -1,4 +0,0 @@ -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -require "bundler/setup" # Set up gems listed in the Gemfile. -require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/config/cable.yml b/config/cable.yml deleted file mode 100644 index 1e98f84..0000000 --- a/config/cable.yml +++ /dev/null @@ -1,10 +0,0 @@ -development: - adapter: async - -test: - adapter: test - -production: - adapter: redis - url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> - channel_prefix: new_games_host_production diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc deleted file mode 100644 index fd41b67..0000000 --- a/config/credentials.yml.enc +++ /dev/null @@ -1 +0,0 @@ -T1XFG7sWuEQHfdCe2e7DQTtavM2jWD3mgXC/oI/5/Pm+UU6u13d1sMiEmKRGErcuAqGz6C2/jvq0LfpGp8butHtXaRd0O0DESl5gMKqQLbuHpo+8PGjIfDriqcisYMkeQyJ5o/1E0NQbke5oEFXWO2nsHeTkx6+0Ex5fQ3m7ZjUfYAbQKgIuvBTy/XCB1l766BArK08otCJ270PSy24DddB8Gli9QIxLck5V9hU21uKiQ/OCOppYOakORmp9XD/xD6bxhY6heHpeuDjqnfM45+RElP22jS/jDQr+CIu/3H3x3KxPe6ikKHhHev5YBck8aT86dMMYJSsC8BNYI4r+JNJr0aOEVhaMW5KAEElK4rn84a7oPUhRYsY1NSpdbs+fPh9BiGLPoFHrIwYVAAO8M192yjYH--YEVp2SmwYFIjIGOE--MRACW3ors+Sxri+vr1J54A== \ No newline at end of file diff --git a/config/database.yml b/config/database.yml deleted file mode 100644 index 9e43c5b..0000000 --- a/config/database.yml +++ /dev/null @@ -1,87 +0,0 @@ -# PostgreSQL. Versions 9.3 and up are supported. -# -# Install the pg driver: -# gem install pg -# On macOS with Homebrew: -# gem install pg -- --with-pg-config=/usr/local/bin/pg_config -# On Windows: -# gem install pg -# Choose the win32 build. -# Install PostgreSQL and put its /bin directory on your path. -# -# Configure Using Gemfile -# gem "pg" -# -default: &default - adapter: postgresql - encoding: unicode - # For details on connection pooling, see Rails configuration guide - # https://guides.rubyonrails.org/configuring.html#database-pooling - pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - username: <%= ENV["GAMES_HOST_DATABASE_USERNAME"] %> - password: <%= ENV["GAMES_HOST_DATABASE_PASSWORD"] %> - -development: - <<: *default - database: games_host_development - - # The specified database role being used to connect to PostgreSQL. - # To create additional roles in PostgreSQL see `$ createuser --help`. - # When left blank, PostgreSQL will use the default role. This is - # the same name as the operating system user running Rails. - #username: <%= ENV.fetch("GAMES_HOST_DATABASE_USERNAME") %> - - # The password associated with the PostgreSQL role (username). - #password: - - # Connect on a TCP socket. Omitted by default since the client uses a - # domain socket that doesn't need configuration. Windows does not have - # domain sockets, so uncomment these lines. - #host: localhost - - # The TCP port the server listens on. Defaults to 5432. - # If your server runs on a different port number, change accordingly. - #port: 5432 - - # Schema search path. The server defaults to $user,public - #schema_search_path: myapp,sharedapp,public - - # Minimum log levels, in increasing order: - # debug5, debug4, debug3, debug2, debug1, - # log, notice, warning, error, fatal, and panic - # Defaults to warning. - #min_messages: notice - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: games_host_test - -# As with config/credentials.yml, you never want to store sensitive information, -# like your database password, in your source code. If your source code is -# ever seen by anyone, they now have access to your database. -# -# Instead, provide the password or a full connection URL as an environment -# variable when you boot the app. For example: -# -# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" -# -# If the connection URL is provided in the special DATABASE_URL environment -# variable, Rails will automatically merge its configuration values on top of -# the values provided in this file. Alternatively, you can specify a connection -# URL environment variable explicitly: -# -# production: -# url: <%= ENV["MY_APP_DATABASE_URL"] %> -# -# Read https://guides.rubyonrails.org/configuring.html#configuring-a-database -# for a full overview on how database connection configuration can be specified. -# -production: - <<: *default - database: games_host_production - host: <%= ENV["GAMES_HOST_DATABASE_HOSTNAME"] %> - #username: <%= ENV["GAMES_HOST_DATABASE_USERNAME"] %> - #password: <%= ENV["GAMES_HOST_DATABASE_PASSWORD"] %> diff --git a/config/environment.rb b/config/environment.rb deleted file mode 100644 index cac5315..0000000 --- a/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the Rails application. -require_relative "application" - -# Initialize the Rails application. -Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb deleted file mode 100644 index f962d9f..0000000 --- a/config/environments/development.rb +++ /dev/null @@ -1,71 +0,0 @@ -require "active_support/core_ext/integer/time" - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded any time - # it changes. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.enable_reloading = true - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports. - config.consider_all_requests_local = true - - # Enable server timing - config.server_timing = true - - # Enable/disable caching. By default caching is disabled. - # Run rails dev:cache to toggle caching. - if Rails.root.join("tmp/caching-dev.txt").exist? - config.cache_store = :memory_store - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{2.days.to_i}" - } - else - config.action_controller.perform_caching = false - - config.cache_store = :null_store - end - - # Store uploaded files on the local file system (see config/storage.yml for options). - config.active_storage.service = :local - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - config.action_mailer.perform_caching = false - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Raise exceptions for disallowed deprecations. - config.active_support.disallowed_deprecation = :raise - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] - - # Raise an error on page load if there are pending migrations. - config.active_record.migration_error = :page_load - - # Highlight code that triggered database queries in logs. - config.active_record.verbose_query_logs = true - - # Highlight code that enqueued background job in logs. - config.active_job.verbose_enqueue_logs = true - - - # Raises error for missing translations. - # config.i18n.raise_on_missing_translations = true - - # Annotate rendered view with file names. - # config.action_view.annotate_rendered_view_with_filenames = true - - # Uncomment if you wish to allow Action Cable access from any origin. - # config.action_cable.disable_request_forgery_protection = true - - # Raise error when a before_action's only/except options reference missing actions - config.action_controller.raise_on_missing_callback_actions = true -end diff --git a/config/environments/production.rb b/config/environments/production.rb deleted file mode 100644 index 8f51968..0000000 --- a/config/environments/production.rb +++ /dev/null @@ -1,90 +0,0 @@ -require "active_support/core_ext/integer/time" - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # Code is not reloaded between requests. - config.enable_reloading = false - - # Eager load code on boot. This eager loads most of Rails and - # your application in memory, allowing both threaded web servers - # and those relying on copy on write to perform better. - # Rake tasks automatically ignore this option for performance. - config.eager_load = true - - # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false - - # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment - # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). - # config.require_master_key = true - - # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. - # config.public_file_server.enabled = false - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.asset_host = "http://assets.example.com" - - # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache - # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX - - # Store uploaded files on the local file system (see config/storage.yml for options). - config.active_storage.service = :local - - # Mount Action Cable outside main process or domain. - # config.action_cable.mount_path = nil - # config.action_cable.url = "wss://example.com/cable" - # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] - - # Assume all access to the app is happening through a SSL-terminating reverse proxy. - # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. - # config.assume_ssl = true - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - config.force_ssl = true - - # Log to STDOUT by default - config.logger = ActiveSupport::Logger.new(STDOUT) - .tap { |logger| logger.formatter = ::Logger::Formatter.new } - .then { |logger| ActiveSupport::TaggedLogging.new(logger) } - - # Prepend all log lines with the following tags. - config.log_tags = [ :request_id ] - - # "info" includes generic and useful information about system operation, but avoids logging too much - # information to avoid inadvertent exposure of personally identifiable information (PII). If you - # want to log everything, set the level to "debug". - config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") - - # Use a different cache store in production. - # config.cache_store = :mem_cache_store - - # Use a real queuing backend for Active Job (and separate queues per environment). - # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "new_games_host_production" - - config.action_mailer.perform_caching = false - - # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. - # config.action_mailer.raise_delivery_errors = false - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = true - - # Don't log any deprecations. - config.active_support.report_deprecations = false - - # Do not dump schema after migrations. - config.active_record.dump_schema_after_migration = false - - # Enable DNS rebinding protection and other `Host` header attacks. - # config.hosts = [ - # "example.com", # Allow requests from example.com - # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` - # ] - # Skip DNS rebinding protection for the default health check endpoint. - # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } -end diff --git a/config/environments/test.rb b/config/environments/test.rb deleted file mode 100644 index adbb4a6..0000000 --- a/config/environments/test.rb +++ /dev/null @@ -1,64 +0,0 @@ -require "active_support/core_ext/integer/time" - -# The test environment is used exclusively to run your application's -# test suite. You never need to work with it otherwise. Remember that -# your test database is "scratch space" for the test suite and is wiped -# and recreated between test runs. Don't rely on the data there! - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # While tests run files are not watched, reloading is not necessary. - config.enable_reloading = false - - # Eager loading loads your entire application. When running a single test locally, - # this is usually not necessary, and can slow down your test suite. However, it's - # recommended that you enable it in continuous integration systems to ensure eager - # loading is working properly before deploying your code. - config.eager_load = ENV["CI"].present? - - # Configure public file server for tests with Cache-Control for performance. - config.public_file_server.enabled = true - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{1.hour.to_i}" - } - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - config.cache_store = :null_store - - # Render exception templates for rescuable exceptions and raise for other exceptions. - config.action_dispatch.show_exceptions = :rescuable - - # Disable request forgery protection in test environment. - config.action_controller.allow_forgery_protection = false - - # Store uploaded files on the local file system in a temporary directory. - config.active_storage.service = :test - - config.action_mailer.perform_caching = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr - - # Raise exceptions for disallowed deprecations. - config.active_support.disallowed_deprecation = :raise - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] - - # Raises error for missing translations. - # config.i18n.raise_on_missing_translations = true - - # Annotate rendered view with file names. - # config.action_view.annotate_rendered_view_with_filenames = true - - # Raise error when a before_action's only/except options reference missing actions - config.action_controller.raise_on_missing_callback_actions = true -end diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb deleted file mode 100644 index 541e2ed..0000000 --- a/config/initializers/cors.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Avoid CORS issues when API is called from the frontend app. -# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests. - -# Read more: https://github.com/cyu/rack-cors - -# Rails.application.config.middleware.insert_before 0, Rack::Cors do -# allow do -# origins "example.com" -# -# resource "*", -# headers: :any, -# methods: [:get, :post, :put, :patch, :delete, :options, :head] -# end -# end - - Rails.application.config.middleware.insert_before 0, Rack::Cors do - allow do - origins 'localhost:3000', 'localhost:5173', 'gameshoster.com', 'malcz.com' - - resource '/api/v1/*', - headers: :any, - methods: [:get, :post, :put, :patch, :delete, :options, :head], - credentials: true # <- need this to enable auth - end - end diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index c2d89e2..0000000 --- a/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. -# Use this to limit dissemination of sensitive information. -# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. -Rails.application.config.filter_parameters += [ - :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn -] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb deleted file mode 100644 index 3860f65..0000000 --- a/config/initializers/inflections.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format. Inflections -# are locale specific, and you may define rules for as many different -# locales as you wish. All of these examples are active by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, "\\1en" -# inflect.singular /^(ox)en/i, "\\1" -# inflect.irregular "person", "people" -# inflect.uncountable %w( fish sheep ) -# end - -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym "RESTful" -# end diff --git a/config/locales/en.yml b/config/locales/en.yml deleted file mode 100644 index 6c349ae..0000000 --- a/config/locales/en.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Files in the config/locales directory are used for internationalization and -# are automatically loaded by Rails. If you want to use locales other than -# English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t "hello" -# -# In views, this is aliased to just `t`: -# -# <%= t("hello") %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# To learn more about the API, please read the Rails Internationalization guide -# at https://guides.rubyonrails.org/i18n.html. -# -# Be aware that YAML interprets the following case-insensitive strings as -# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings -# must be quoted to be interpreted as strings. For example: -# -# en: -# "yes": yup -# enabled: "ON" - -en: - hello: "Hello world" diff --git a/config/puma.rb b/config/puma.rb deleted file mode 100644 index afa809b..0000000 --- a/config/puma.rb +++ /dev/null @@ -1,35 +0,0 @@ -# This configuration file will be evaluated by Puma. The top-level methods that -# are invoked here are part of Puma's configuration DSL. For more information -# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. - -# Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers: a minimum and maximum. -# Any libraries that use thread pools should be configured to match -# the maximum value specified for Puma. Default is set to 5 threads for minimum -# and maximum; this matches the default thread size of Active Record. -max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } -min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } -threads min_threads_count, max_threads_count - -# Specifies that the worker count should equal the number of processors in production. -if ENV["RAILS_ENV"] == "production" - require "concurrent-ruby" - worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count }) - workers worker_count if worker_count > 1 -end - -# Specifies the `worker_timeout` threshold that Puma will use to wait before -# terminating a worker in development environments. -worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" - -# Specifies the `port` that Puma will listen on to receive requests; default is 3000. -port ENV.fetch("PORT") { 3000 } - -# Specifies the `environment` that Puma will run in. -environment ENV.fetch("RAILS_ENV") { "development" } - -# Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } - -# Allow puma to be restarted by `bin/rails restart` command. -plugin :tmp_restart diff --git a/config/routes.rb b/config/routes.rb deleted file mode 100644 index ba4c647..0000000 --- a/config/routes.rb +++ /dev/null @@ -1,46 +0,0 @@ -Rails.application.routes.draw do - get 'tags/index' - get 'tags/create' - get 'tags/destroy' - # - # isolated domain, do not allow auth here - #constraints host: 'localhost' do - # GAMES - get 'game/:user/:game/*path/:file', to: 'api/v1/games#show_file', constraints: { file: /[^\/]+/ } - get 'game/:user/:game/:file', to: 'api/v1/games#show_file', constraints: { file: /[^\/]+/ } - #end - - namespace :api do - namespace :v1 do - - #constraints host: "localhost" do - # USERS - get 'users/index', to: 'users#index' - - # GAMES - post 'games', to: 'games#create' - get 'games', to: 'games#index' - get 'games/:user/', to: 'games#show' - get 'games/:user/:game', to: 'games#show' - get 'games_img/:user/:game', to: 'games#show_img' - #resources :games - - # TAGS - get 'tags', to: 'tags#index' - - # AUTH - get 'auth/callback', to: 'auth#callback' - get 'auth/data', to: 'auth#data' - #end - - end - end - # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html - - # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. - # Can be used by load balancers and uptime monitors to verify that the app is live. - get "up" => "rails/health#show", as: :rails_health_check - - # Defines the root path route ("/") - # root "posts#index" -end diff --git a/config/storage.yml b/config/storage.yml deleted file mode 100644 index 4942ab6..0000000 --- a/config/storage.yml +++ /dev/null @@ -1,34 +0,0 @@ -test: - service: Disk - root: <%= Rails.root.join("tmp/storage") %> - -local: - service: Disk - root: <%= Rails.root.join("storage") %> - -# Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) -# amazon: -# service: S3 -# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> -# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> -# region: us-east-1 -# bucket: your_own_bucket-<%= Rails.env %> - -# Remember not to checkin your GCS keyfile to a repository -# google: -# service: GCS -# project: your_project -# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> -# bucket: your_own_bucket-<%= Rails.env %> - -# Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) -# microsoft: -# service: AzureStorage -# storage_account_name: your_account_name -# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> -# container: your_container_name-<%= Rails.env %> - -# mirror: -# service: Mirror -# primary: local -# mirrors: [ amazon, google, microsoft ] diff --git a/db/lfs/Games/Almost Pong/card.png b/db/lfs/Games/Almost Pong/card.png deleted file mode 100644 index aab9261..0000000 Binary files a/db/lfs/Games/Almost Pong/card.png and /dev/null differ diff --git a/db/lfs/Games/Almost Pong/character.png b/db/lfs/Games/Almost Pong/character.png deleted file mode 100644 index 8e3b3df..0000000 Binary files a/db/lfs/Games/Almost Pong/character.png and /dev/null differ diff --git a/db/lfs/Games/Almost Pong/desc.md b/db/lfs/Games/Almost Pong/desc.md deleted file mode 100644 index 32756fd..0000000 --- a/db/lfs/Games/Almost Pong/desc.md +++ /dev/null @@ -1,12 +0,0 @@ -# [Almost Pong](https://github.com/realtradam/almost-pong) - -## Controls -Spacebar to play - -## Tech Stack -Ruby, FelECS, and Raylib - -## Description - -Almost Pong is a silly mashup between the classic Pong and the not so classic Flappy Bird. I saw someone else make this on the internet and I decided to give myself a challenge to see if I could recreate this within a few hours and I did! - diff --git a/db/lfs/Games/Almost Pong/index.zip b/db/lfs/Games/Almost Pong/index.zip deleted file mode 100644 index 63a8a2d..0000000 Binary files a/db/lfs/Games/Almost Pong/index.zip and /dev/null differ diff --git a/db/lfs/Games/Almost Pong/title.png b/db/lfs/Games/Almost Pong/title.png deleted file mode 100644 index 6ee677c..0000000 Binary files a/db/lfs/Games/Almost Pong/title.png and /dev/null differ diff --git a/db/lfs/Games/Bubbles, Behind/card.png b/db/lfs/Games/Bubbles, Behind/card.png deleted file mode 100644 index 4100514..0000000 Binary files a/db/lfs/Games/Bubbles, Behind/card.png and /dev/null differ diff --git a/db/lfs/Games/Bubbles, Behind/character.png b/db/lfs/Games/Bubbles, Behind/character.png deleted file mode 100644 index 3c408c1..0000000 Binary files a/db/lfs/Games/Bubbles, Behind/character.png and /dev/null differ diff --git a/db/lfs/Games/Bubbles, Behind/desc.md b/db/lfs/Games/Bubbles, Behind/desc.md deleted file mode 100644 index 90f0975..0000000 --- a/db/lfs/Games/Bubbles, Behind/desc.md +++ /dev/null @@ -1,20 +0,0 @@ -# [Bubbles, Behind](https://github.com/realtradam/TOJam2023) - -## Controls - -### Keyboard -- WASD - Movement - -### Controller -Left Joystick - Movement - -## Tech Stack -C and a home-made custom game engine with BGFX - -## Description - -This game was made in 3 days with the collaboration of my friend [Arnold](https://github.com/arngo). We set out to build a game with my woefully unprepared prototype game engine and managed to stick the landing! - -I really enjoy the story on this project because halfway through the project the game engine unexpected brought up a massive bug which made the game entirely unplayable. Luckily through my knowledge of rendering and how I had built up my engine I was able to pinpoint the issue and resolve it before the tight deadline. - -The second interesting thing that happened was a bug which would randomly crash the game after an indeterminate amount of time. This bug had been discovered mere minutes before the deadline however we were able to cover up the bug to players of the game in a very clever way. We set up a bash script which would run in a loop and this script would sleep for a couple seconds and then launch the game. Why would we have a delay to relaunch the game? We set up a full screen window on the PC of an image saying "Game Over". Whenever the game would crash this image would immediately become visible, the players would see it and incorrectly assume they had "died" in the game and then the game would relaunch. The game would launch also in fullscreen so it would go on top of this image. And so no one was aware at all of any bug or crash happening. Hilarious. diff --git a/db/lfs/Games/Bubbles, Behind/index.zip b/db/lfs/Games/Bubbles, Behind/index.zip deleted file mode 100644 index 661dac6..0000000 Binary files a/db/lfs/Games/Bubbles, Behind/index.zip and /dev/null differ diff --git a/db/lfs/Games/Bubbles, Behind/title.png b/db/lfs/Games/Bubbles, Behind/title.png deleted file mode 100644 index 718918a..0000000 Binary files a/db/lfs/Games/Bubbles, Behind/title.png and /dev/null differ diff --git a/db/lfs/Games/Magnet Run/card.png b/db/lfs/Games/Magnet Run/card.png deleted file mode 100644 index 5a942da..0000000 Binary files a/db/lfs/Games/Magnet Run/card.png and /dev/null differ diff --git a/db/lfs/Games/Magnet Run/character.png b/db/lfs/Games/Magnet Run/character.png deleted file mode 100644 index beb1fbe..0000000 Binary files a/db/lfs/Games/Magnet Run/character.png and /dev/null differ diff --git a/db/lfs/Games/Magnet Run/desc.md b/db/lfs/Games/Magnet Run/desc.md deleted file mode 100644 index 7d75d1e..0000000 --- a/db/lfs/Games/Magnet Run/desc.md +++ /dev/null @@ -1,16 +0,0 @@ -# [Magnet Run](https://github.com/realtradam/Magnet-Run-3D) - -## Controls - -- WASD - Movement -- Space - Jump -- Q/E - Rotate camera horizontally(disables auto rotation for a short time) -- Z/X - Rotate camera vertically(disables auto rotation for a short time) - -## Tech Stack -Unity, C# - -## Description - -A 3D Unity game I had created to learn and practice creating a character controller and camera as well as learning how to create a platformer system similar to Super Mario Galaxy where the gravity can be in any direction. - diff --git a/db/lfs/Games/Magnet Run/index.zip b/db/lfs/Games/Magnet Run/index.zip deleted file mode 100644 index 4164abe..0000000 Binary files a/db/lfs/Games/Magnet Run/index.zip and /dev/null differ diff --git a/db/lfs/Games/Magnet Run/title.png b/db/lfs/Games/Magnet Run/title.png deleted file mode 100644 index b272849..0000000 Binary files a/db/lfs/Games/Magnet Run/title.png and /dev/null differ diff --git a/db/lfs/Games/Optimal Direction/card.png b/db/lfs/Games/Optimal Direction/card.png deleted file mode 100644 index ff6223f..0000000 Binary files a/db/lfs/Games/Optimal Direction/card.png and /dev/null differ diff --git a/db/lfs/Games/Optimal Direction/character.png b/db/lfs/Games/Optimal Direction/character.png deleted file mode 100644 index 1fd4e20..0000000 Binary files a/db/lfs/Games/Optimal Direction/character.png and /dev/null differ diff --git a/db/lfs/Games/Optimal Direction/desc.md b/db/lfs/Games/Optimal Direction/desc.md deleted file mode 100644 index 90febb6..0000000 --- a/db/lfs/Games/Optimal Direction/desc.md +++ /dev/null @@ -1,18 +0,0 @@ -# Optimal Direction - -## Controls -- W - Accelerate -- A/D - Steering -- Shift - Drift/Grip -- Space: Brake - -## Tech Stack -Godot - -## Description - -An old overly ambitious project of mine. The goal was to make a sort of realistic 2d racing game where the physics took into account things like weight distribution, front/rear/all wheel drive, gearboxes, etc. - -A lot of those mechanics were implemented, but the scope of the project was much too big for one person at the skill level I was at to realistically finish the project so for that reason it was abandoned. - -I hope to one day revisit this genre again and make a fun game out of it. diff --git a/db/lfs/Games/Optimal Direction/index.zip b/db/lfs/Games/Optimal Direction/index.zip deleted file mode 100644 index 4f169ec..0000000 Binary files a/db/lfs/Games/Optimal Direction/index.zip and /dev/null differ diff --git a/db/lfs/Games/Optimal Direction/title.png b/db/lfs/Games/Optimal Direction/title.png deleted file mode 100644 index d155fd7..0000000 Binary files a/db/lfs/Games/Optimal Direction/title.png and /dev/null differ diff --git a/db/lfs/Games/Orc: Arena of Time/card.png b/db/lfs/Games/Orc: Arena of Time/card.png deleted file mode 100644 index c757a53..0000000 Binary files a/db/lfs/Games/Orc: Arena of Time/card.png and /dev/null differ diff --git a/db/lfs/Games/Orc: Arena of Time/character.png b/db/lfs/Games/Orc: Arena of Time/character.png deleted file mode 100644 index 2e46e51..0000000 Binary files a/db/lfs/Games/Orc: Arena of Time/character.png and /dev/null differ diff --git a/db/lfs/Games/Orc: Arena of Time/desc.md b/db/lfs/Games/Orc: Arena of Time/desc.md deleted file mode 100644 index 8072a4e..0000000 --- a/db/lfs/Games/Orc: Arena of Time/desc.md +++ /dev/null @@ -1,15 +0,0 @@ -# [Orc: Arena of Time](https://github.com/realtradam/orc-arena-of-time) - -## Controls -- WASD - Movement - -## Tech Stack -Ruby, FelECS, and Raylib - -## Description - -Help "Orc", the brave orc, navigate the precarious Arena of Time and prove to all what a mighty adventurer they are! - -In my opinion the best game I have made so far and the one I am the most proud of. It has the most unique gameplay out of all the games I have worked on and a great considerable amount of effort went into this. - -It also won first place overall in the [Raylib 5K gamejam](https://itch.io/jam/raylib-5k-gamejam) which is awesome! diff --git a/db/lfs/Games/Orc: Arena of Time/index.zip b/db/lfs/Games/Orc: Arena of Time/index.zip deleted file mode 100644 index b29fb85..0000000 Binary files a/db/lfs/Games/Orc: Arena of Time/index.zip and /dev/null differ diff --git a/db/lfs/Games/Orc: Arena of Time/title.png b/db/lfs/Games/Orc: Arena of Time/title.png deleted file mode 100644 index 311fdb4..0000000 Binary files a/db/lfs/Games/Orc: Arena of Time/title.png and /dev/null differ diff --git a/db/lfs/Games/SpaceCube 64/card.png b/db/lfs/Games/SpaceCube 64/card.png deleted file mode 100644 index 2363c7f..0000000 Binary files a/db/lfs/Games/SpaceCube 64/card.png and /dev/null differ diff --git a/db/lfs/Games/SpaceCube 64/character.png b/db/lfs/Games/SpaceCube 64/character.png deleted file mode 100644 index 11257b7..0000000 Binary files a/db/lfs/Games/SpaceCube 64/character.png and /dev/null differ diff --git a/db/lfs/Games/SpaceCube 64/desc.md b/db/lfs/Games/SpaceCube 64/desc.md deleted file mode 100644 index 099657c..0000000 --- a/db/lfs/Games/SpaceCube 64/desc.md +++ /dev/null @@ -1,32 +0,0 @@ -# [Space Cube 64](https://github.com/realtradam/tojam2024) - -## Controls -### Web Controls: - -#### P1: - -- WASD -> movement -- E -> shoot -- Q -> change camera(thirdperson or firstperson) - -#### P2: -- IJKL -> movement -- O -> shoot -- U -> change camera(thirdperson or firstperson) - - - -### N64 Controls: - -- Joystick -> movement -- Z -> shoot -- R -> change camera(thirdperson or firstperson) - -## Tech Stack -Nintendo 64, C, Libdragon, Raylib - -## Description - -An entry into the Toronto Gamejam 2024, this game was developed for real Nintendo 64 hardware and for the game showcase we demoed the game running on a real Nintendo 64. - -Later we ported this game to the web which is what you can see above and play. It runs significantly better on the web, on the Nintendo the framerate would drop as low at 10fps. diff --git a/db/lfs/Games/SpaceCube 64/index.zip b/db/lfs/Games/SpaceCube 64/index.zip deleted file mode 100644 index ce01311..0000000 Binary files a/db/lfs/Games/SpaceCube 64/index.zip and /dev/null differ diff --git a/db/lfs/Games/SpaceCube 64/title.png b/db/lfs/Games/SpaceCube 64/title.png deleted file mode 100644 index 9f306a3..0000000 Binary files a/db/lfs/Games/SpaceCube 64/title.png and /dev/null differ diff --git a/db/lfs/Games/Winter One/card.png b/db/lfs/Games/Winter One/card.png deleted file mode 100644 index d15bc1b..0000000 Binary files a/db/lfs/Games/Winter One/card.png and /dev/null differ diff --git a/db/lfs/Games/Winter One/character.png b/db/lfs/Games/Winter One/character.png deleted file mode 100644 index 24cfdb1..0000000 Binary files a/db/lfs/Games/Winter One/character.png and /dev/null differ diff --git a/db/lfs/Games/Winter One/desc.md b/db/lfs/Games/Winter One/desc.md deleted file mode 100644 index e392807..0000000 --- a/db/lfs/Games/Winter One/desc.md +++ /dev/null @@ -1,13 +0,0 @@ -# Winter One - -## Controls -Mouse + Click - -## Tech Stack -Godot - -## Description - -An old game which we republished onto Itch. This is the first game [Arnold](https://github.com/arngo) and myself have worked on together. Its a pretty simple endless scrolling shooter with 2 different enemy types. We could of developed more but we decided to instead try and move on to a different game. It was supposed to be a short 1-2 week project that ended up taking over 3 weeks to finish. This was mostly a project about learning the ins and and outs of the Godot Engine and also to try an manage a short deadline(winter break). - - diff --git a/db/lfs/Games/Winter One/index.zip b/db/lfs/Games/Winter One/index.zip deleted file mode 100644 index 01eb869..0000000 Binary files a/db/lfs/Games/Winter One/index.zip and /dev/null differ diff --git a/db/lfs/Games/Winter One/title.png b/db/lfs/Games/Winter One/title.png deleted file mode 100644 index a654725..0000000 Binary files a/db/lfs/Games/Winter One/title.png and /dev/null differ diff --git a/db/migrate/20240519191604_create_users.rb b/db/migrate/20240519191604_create_users.rb deleted file mode 100644 index d1fa192..0000000 --- a/db/migrate/20240519191604_create_users.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateUsers < ActiveRecord::Migration[7.1] - def change - create_table :users do |t| - t.string :user_name # we need this for game urls - t.string :identifier - t.string :access_token_digest - t.json :user_data - - t.timestamps - end - #add_index :users, :identifier, unique: true - end -end diff --git a/db/migrate/20240521142838_create_active_storage_tables.active_storage.rb b/db/migrate/20240521142838_create_active_storage_tables.active_storage.rb deleted file mode 100644 index e4706aa..0000000 --- a/db/migrate/20240521142838_create_active_storage_tables.active_storage.rb +++ /dev/null @@ -1,57 +0,0 @@ -# This migration comes from active_storage (originally 20170806125915) -class CreateActiveStorageTables < ActiveRecord::Migration[7.0] - def change - # Use Active Record's configured type for primary and foreign keys - primary_key_type, foreign_key_type = primary_and_foreign_key_types - - create_table :active_storage_blobs, id: primary_key_type do |t| - t.string :key, null: false - t.string :filename, null: false - t.string :content_type - t.text :metadata - t.string :service_name, null: false - t.bigint :byte_size, null: false - t.string :checksum - - if connection.supports_datetime_with_precision? - t.datetime :created_at, precision: 6, null: false - else - t.datetime :created_at, null: false - end - - t.index [ :key ], unique: true - end - - create_table :active_storage_attachments, id: primary_key_type do |t| - t.string :name, null: false - t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type - t.references :blob, null: false, type: foreign_key_type - - if connection.supports_datetime_with_precision? - t.datetime :created_at, precision: 6, null: false - else - t.datetime :created_at, null: false - end - - t.index [ :record_type, :record_id, :name, :blob_id ], name: :index_active_storage_attachments_uniqueness, unique: true - t.foreign_key :active_storage_blobs, column: :blob_id - end - - create_table :active_storage_variant_records, id: primary_key_type do |t| - t.belongs_to :blob, null: false, index: false, type: foreign_key_type - t.string :variation_digest, null: false - - t.index [ :blob_id, :variation_digest ], name: :index_active_storage_variant_records_uniqueness, unique: true - t.foreign_key :active_storage_blobs, column: :blob_id - end - end - - private - def primary_and_foreign_key_types - config = Rails.configuration.generators - setting = config.options[config.orm][:primary_key_type] - primary_key_type = setting || :primary_key - foreign_key_type = setting || :bigint - [primary_key_type, foreign_key_type] - end -end diff --git a/db/migrate/20240521205000_create_games.rb b/db/migrate/20240521205000_create_games.rb deleted file mode 100644 index d65b118..0000000 --- a/db/migrate/20240521205000_create_games.rb +++ /dev/null @@ -1,16 +0,0 @@ -class CreateGames < ActiveRecord::Migration[7.1] - def change - create_table :games do |t| - t.string :title - t.string :titleSlug - t.string :description - t.string :github_link - t.string :img_rendering - t.integer :status, default: 0 - t.integer :order, default: 0 - - t.timestamps - end - add_reference :games, :user, null: false, foreign_key: true - end -end diff --git a/db/migrate/20240527231908_add_path_to_active_storage_blobs.rb b/db/migrate/20240527231908_add_path_to_active_storage_blobs.rb deleted file mode 100644 index c591ae1..0000000 --- a/db/migrate/20240527231908_add_path_to_active_storage_blobs.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddPathToActiveStorageBlobs < ActiveRecord::Migration[7.1] - def change - add_column :active_storage_blobs, :filepath, :string, null: false, default: '' - end -end diff --git a/db/migrate/20240606184819_create_tags.rb b/db/migrate/20240606184819_create_tags.rb deleted file mode 100644 index 9b33939..0000000 --- a/db/migrate/20240606184819_create_tags.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateTags < ActiveRecord::Migration[7.1] - def change - create_table :tags do |t| - t.string :tag_type, null: false - t.string :name, null: false - - t.timestamps - end - end -end diff --git a/db/migrate/20240606200659_create_tags_games_join_table.rb b/db/migrate/20240606200659_create_tags_games_join_table.rb deleted file mode 100644 index 7a0dae4..0000000 --- a/db/migrate/20240606200659_create_tags_games_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTagsGamesJoinTable < ActiveRecord::Migration[7.1] - def change - create_join_table :tags, :games do |t| - t.index :tag_id - t.index :game_id - end - end -end diff --git a/db/schema.rb b/db/schema.rb deleted file mode 100644 index f4cabcc..0000000 --- a/db/schema.rb +++ /dev/null @@ -1,86 +0,0 @@ -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# This file is the source Rails uses to define your schema when running `bin/rails -# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to -# be faster and is potentially less error prone than running all of your -# migrations from scratch. Old migrations may fail to apply correctly if those -# migrations use external dependencies or application code. -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema[7.1].define(version: 2024_06_06_200659) do - # These are extensions that must be enabled in order to support this database - enable_extension "plpgsql" - - create_table "active_storage_attachments", force: :cascade do |t| - t.string "name", null: false - t.string "record_type", null: false - t.bigint "record_id", null: false - t.bigint "blob_id", null: false - t.datetime "created_at", null: false - t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" - t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true - end - - create_table "active_storage_blobs", force: :cascade do |t| - t.string "key", null: false - t.string "filename", null: false - t.string "content_type" - t.text "metadata" - t.string "service_name", null: false - t.bigint "byte_size", null: false - t.string "checksum" - t.datetime "created_at", null: false - t.string "filepath", default: "", null: false - t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true - end - - create_table "active_storage_variant_records", force: :cascade do |t| - t.bigint "blob_id", null: false - t.string "variation_digest", null: false - t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true - end - - create_table "games", force: :cascade do |t| - t.string "title" - t.string "titleSlug" - t.string "description" - t.string "github_link" - t.string "img_rendering" - t.integer "status", default: 0 - t.integer "order", default: 0 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "user_id", null: false - t.index ["user_id"], name: "index_games_on_user_id" - end - - create_table "games_tags", id: false, force: :cascade do |t| - t.bigint "tag_id", null: false - t.bigint "game_id", null: false - t.index ["game_id"], name: "index_games_tags_on_game_id" - t.index ["tag_id"], name: "index_games_tags_on_tag_id" - end - - create_table "tags", force: :cascade do |t| - t.string "tag_type", null: false - t.string "name", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "users", force: :cascade do |t| - t.string "user_name" - t.string "identifier" - t.string "access_token_digest" - t.json "user_data" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" - add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" - add_foreign_key "games", "users" -end diff --git a/db/seeds.rb b/db/seeds.rb deleted file mode 100644 index 50c901e..0000000 --- a/db/seeds.rb +++ /dev/null @@ -1,167 +0,0 @@ -# This file should ensure the existence of records required to run the application in every environment (production, -# development, test). The code here should be idempotent so that it can be executed at any point in every environment. -# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). -# -# Example: -# -# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name| -# MovieGenre.find_or_create_by!(name: genre_name) -# end - -markdown_sample = <<~HEREDOC -# Telum vim lactente - -## Petebam Circe hic mactare vitae tandem super - -Lorem markdownum Perseu tetigisse instar. Negat inde calidi sibi, in ora -sanguine; vox excitus pes, in in tibi mella! Portasse morte hic venit, latebras -varios servire libera; hic ad augusta forcipe, *illis* est ubi atque. - -Veri inquit pondere. Precatur ego Amymonen quae vidit lunares caput, nequeo, et. -Occidat in nosset pressa, nomine exercita penitus viae gaudent extemplo. -Mensuraque imitamine primum: sine est suas, quo in, est falso est accingere -ibimus ore renuente. Trahit sua nulla per ut vestigia celerique, gemit manes, -quo suae. - -``` -if (graphic_veronica_traceroute + scanRdram < bittorrent_dtd + - bugWindowsOrientation) { - pitchWord = dllTrackbackRemote; - jquery.batchDot.megabyte(cookie - public, memoryDslamSlashdot(2, - socialPpcEncryption)); -} -cron_analyst = ddr_zettabyte_mips; -var digitize = 1; -var friend_gui = artificial.system(alphaWebsite + domain_ibm( - install_ospf_definition, mca_camelcase, 4), 551649, active_trinitron( - microcomputer_spoofing)); -``` - -Ungues in cannae limumque ingrate; in una voce cubitoque fecit. Non nec, uno -vires laesit perque carpere vultus armenta. Via [praetulit clipei -vestis](http://antro.net/) vidit, sive vestes invitas pro ad per nato nam beati. - -## Nec hauriret stantis - -Illa serpentem fugit inlaesas, cum spoliis vultum arbitrium penates fulmina -caelestia moriens videt insidias. Umidus positi, et ripis feremur sit capit -detur tenens. - -- Provolat cum ecce dextro sed suum pomi -- Voce falsa habuit te -- Modo deponere bracchia pectus - -Deus canor incurva usu dolisque tuentes, leto Liber iniquae requies declivis ad -fontibus tali, flagratque aquaticus. Rupit stimuloque, conscia, nimiumque ait -nomen est Libycas, undas. - -> Humumque spectata et vera, **rugosis causam** iaculo sacra, iunctas rege -> triplices contrahit. Potenti unum cava fama genitor testata summa. Comae sit -> cum, dignissima tauri, formatus promissis *in* quoque [quem -> candidaque](http://sulcomaxima.net/), vitalesque? Pro edere rescindere, premit -> mortisque celeri egredior mare pater, una. Arva tu annos fila valles nocte, -> sero deum densetur **soror siccatque Aeacide** certe undique discordia latent -> et. - -Mihi aureus. Eque tuo, illam diris, virgineas erit externis stabula saetae datis -videat vultus depositae nymphas pedum non peto quem. -HEREDOC - -platform_tags = [ - "web", - "web-desktop", - "web-mobile", - "desktop", - "mobile", - "nintendo 64", - "other" -] -platform_tags.each do |tag| - Tag.find_or_create_by!(name: tag, tag_type: "platform") -end - -game_tags = [ - "unity", - "godot", - "raylib", - "c", - "ruby", - "action", - "tech demo", - "idk something", -] -game_tags.each do |tag| - Tag.find_or_create_by!(name: tag, tag_type: "game") -end - -user = User.find_or_create_by!(user_name: "realtradam", identifier: "11139432") - -data_dir = Rails.root.join('db/lfs') - -games = [ - { - title: 'Almost Pong', - github_link: 'https://github.com/realtradam/almost-pong', - img_rendering: 'crisp-edges', - tags: ["web-desktop"] - }, - { - title: 'Bubbles, Behind', - github_link: 'https://github.com/realtradam/TOJam2023', - img_rendering: 'crisp-edges', - tags: ["web-desktop", "desktop"] - }, - { - title: 'Magnet Run', - github_link: 'https://github.com/realtradam/Magnet-Run-3D', - img_rendering: 'crisp-edges', - tags: ["web-desktop", "desktop"] - }, - { - title: 'Optimal Direction', - github_link: 'https://github.com/realtradam/optimal-direction', - img_rendering: 'crisp-edges', - tags: ["web-desktop", "desktop"] - }, - { - title: 'Winter One', - github_link: '', - img_rendering: 'pixelated', - tags: ["web-desktop", "desktop"] - }, - { - title: 'SpaceCube 64', - github_link: 'https://github.com/realtradam/tojam2024', - img_rendering: 'crisp-edges', - tags: ["nintendo 64", "web-desktop"] - }, - { - title: 'Orc: Arena of Time', - github_link: 'https://github.com/realtradam/orc-arena-of-time', - img_rendering: 'pixelated', - tags: ["web-desktop", "desktop"] - }, -] - -games.each do |game| - next if Game.exists?(title: game[:title], user_id: 1) # first user is always me - tags = game[:tags] - game.delete(:tags) - game[:description] = File.read("#{data_dir}/Games/#{game[:title]}/desc.md") - game_obj = user.games.new(game) - game_obj.save_zip("#{data_dir}/Games/#{game[:title]}/index.zip") - game_obj.card_img.attach(io: File.open("#{data_dir}/Games/#{game[:title]}/card.png"), filename: 'card.png') - game_obj.char_img.attach(io: File.open("#{data_dir}/Games/#{game[:title]}/character.png"), filename: 'character.png') - game_obj.title_img.attach(io: File.open("#{data_dir}/Games/#{game[:title]}/title.png"), filename: 'title.png') - game_obj.titleSlug = game[:title].parameterize - game_obj.status = 1 - - tags.each do |tag| - tag_obj = Tag.find_by(tag_type: "platform", name: tag) - if tag_obj - game_obj.tags << tag_obj - end - end - - game_obj.save -end diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 67167d4..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,19 +0,0 @@ -# docker-compose.yml -services: - app: - build: . - stdin_open: true - tty: true - platform: linux/amd64 - environment: - - RAILS_ENV=development - ports: - - 3000:3000 - volumes: - - .:/rails - command: ["bin/rails", "server", "-b", "0.0.0.0"] - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:3000/healthz"] - interval: 30s - timeout: 10s - retries: 5 diff --git a/lib/tasks/.keep b/lib/tasks/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/log/.keep b/log/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index c19f78a..0000000 --- a/public/robots.txt +++ /dev/null @@ -1 +0,0 @@ -# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/rails-backend/.dockerignore b/rails-backend/.dockerignore new file mode 100644 index 0000000..bb56daf --- /dev/null +++ b/rails-backend/.dockerignore @@ -0,0 +1,31 @@ +# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files. + +# Ignore git directory. +/.git/ + +# Ignore bundler config. +/.bundle + +# Ignore all environment files (except templates). +/.env* +!/.env*.erb + +# Ignore all default key files. +/config/master.key +/config/credentials/*.key + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/.keep + +# Ignore storage (uploaded files in development and any SQLite databases). +/storage/* +!/storage/.keep +/tmp/storage/* +!/tmp/storage/.keep diff --git a/rails-backend/.gitignore b/rails-backend/.gitignore new file mode 100644 index 0000000..752ce8c --- /dev/null +++ b/rails-backend/.gitignore @@ -0,0 +1,37 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore secrets +/config/local_env.yml + +# Ignore bundler config. +/.bundle + +# Ignore all environment files (except templates). +**/.env* +!*/.env*.erb +**/env.toml + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/ +!/tmp/pids/.keep + +# Ignore storage (uploaded files in development and any SQLite databases). +/storage/* +!/storage/.keep +/tmp/storage/* +!/tmp/storage/ +!/tmp/storage/.keep + +# Ignore master key for decrypting credentials and more. +/config/master.key diff --git a/rails-backend/.ruby-version b/rails-backend/.ruby-version new file mode 100644 index 0000000..fefb2b7 --- /dev/null +++ b/rails-backend/.ruby-version @@ -0,0 +1 @@ +ruby-3.3.3 diff --git a/rails-backend/Dockerfile b/rails-backend/Dockerfile new file mode 100644 index 0000000..e68d5a7 --- /dev/null +++ b/rails-backend/Dockerfile @@ -0,0 +1,63 @@ +# syntax = docker/dockerfile:1 + +# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile +ARG RUBY_VERSION=3.3.3 +#FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base +FROM registry.docker.com/library/ruby:$RUBY_VERSION-alpine3.20 as base + +# Rails app lives here +WORKDIR /rails + +# Set production environment +ENV RAILS_ENV="production" \ + BUNDLE_DEPLOYMENT="1" \ + BUNDLE_PATH="/usr/local/bundle" \ + BUNDLE_WITHOUT="development" + + +# Throw-away build stage to reduce size of final image +FROM base as build + +# Install packages needed to build gems +#RUN apt-get update -qq && \ +# apt-get install --no-install-recommends -y build-essential git libpq-dev libvips pkg-config +RUN apk add --update --no-cache build-base git vips postgresql-libs postgresql-dev tzdata + +# Install application gems +COPY Gemfile Gemfile.lock ./ +RUN bundle install && \ + rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ + bundle exec bootsnap precompile --gemfile && echo BLAAAAHHHH + +# Copy application code +COPY . . + +# Precompile bootsnap code for faster boot times +RUN bundle exec bootsnap precompile app/ lib/ + + +# Final stage for app image +FROM base + +# Install packages needed for deployment +#RUN apt-get update -qq && \ +# apt-get install --no-install-recommends -y curl libvips postgresql-client && \ +# rm -rf /var/lib/apt/lists /var/cache/apt/archives +RUN apk add --update --no-cache curl vips postgresql-client + +# Copy built artifacts: gems, application +COPY --from=build /usr/local/bundle /usr/local/bundle +COPY --from=build /rails /rails + +# Run and own only the runtime files as a non-root user for security +#RUN useradd rails --create-home --shell /bin/bash && \ +RUN adduser rails --disabled-password --shell /bin/ash && \ + chown -R rails:rails db log storage tmp +USER rails:rails + +# Entrypoint prepares the database. +ENTRYPOINT ["/rails/bin/docker-entrypoint"] + +# Start the server by default, this can be overwritten at runtime +EXPOSE 3000 +CMD ["./bin/rails", "server"] diff --git a/rails-backend/Gemfile b/rails-backend/Gemfile new file mode 100644 index 0000000..5b0c3d2 --- /dev/null +++ b/rails-backend/Gemfile @@ -0,0 +1,52 @@ +source "https://rubygems.org" + +ruby "3.3.3" + +# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" +gem "rails", "~> 7.1.3", ">= 7.1.3.3" + +# Use postgresql as the database for Active Record +gem "pg", "~> 1.1" + +# Use the Puma web server [https://github.com/puma/puma] +gem "puma", ">= 5.0" + +# Build JSON APIs with ease [https://github.com/rails/jbuilder] +# gem "jbuilder" + +# Use Redis adapter to run Action Cable in production +# gem "redis", ">= 4.0.1" + +# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] +# gem "kredis" + +# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] +gem "bcrypt", "~> 3.1.7" + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem "tzinfo-data"#, platforms: %i[ windows jruby ] + +# Reduces boot times through caching; required in config/boot.rb +gem "bootsnap", require: false + +# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] +# gem "image_processing", "~> 1.2" + +# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin Ajax possible +gem "rack-cors" + +# Reading TOML files +gem 'tomlib', '~> 0.7.2' + +group :development, :test do + # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem + gem "debug", platforms: %i[ mri windows ] +end + +group :development do + # Speed up commands on slow machines / big apps [https://github.com/rails/spring] + # gem "spring" +end + + +gem "rubyzip", "~> 2.3" diff --git a/rails-backend/Gemfile.lock b/rails-backend/Gemfile.lock new file mode 100644 index 0000000..2c89747 --- /dev/null +++ b/rails-backend/Gemfile.lock @@ -0,0 +1,226 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.1.3.4) + actionpack (= 7.1.3.4) + activesupport (= 7.1.3.4) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (7.1.3.4) + actionpack (= 7.1.3.4) + activejob (= 7.1.3.4) + activerecord (= 7.1.3.4) + activestorage (= 7.1.3.4) + activesupport (= 7.1.3.4) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.1.3.4) + actionpack (= 7.1.3.4) + actionview (= 7.1.3.4) + activejob (= 7.1.3.4) + activesupport (= 7.1.3.4) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.2) + actionpack (7.1.3.4) + actionview (= 7.1.3.4) + activesupport (= 7.1.3.4) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.3.4) + actionpack (= 7.1.3.4) + activerecord (= 7.1.3.4) + activestorage (= 7.1.3.4) + activesupport (= 7.1.3.4) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.1.3.4) + activesupport (= 7.1.3.4) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.3.4) + activesupport (= 7.1.3.4) + globalid (>= 0.3.6) + activemodel (7.1.3.4) + activesupport (= 7.1.3.4) + activerecord (7.1.3.4) + activemodel (= 7.1.3.4) + activesupport (= 7.1.3.4) + timeout (>= 0.4.0) + activestorage (7.1.3.4) + actionpack (= 7.1.3.4) + activejob (= 7.1.3.4) + activerecord (= 7.1.3.4) + activesupport (= 7.1.3.4) + marcel (~> 1.0) + activesupport (7.1.3.4) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + base64 (0.2.0) + bcrypt (3.1.20) + bigdecimal (3.1.8) + bootsnap (1.18.3) + msgpack (~> 1.2) + builder (3.3.0) + concurrent-ruby (1.3.3) + connection_pool (2.4.1) + crass (1.0.6) + date (3.3.4) + debug (1.9.2) + irb (~> 1.10) + reline (>= 0.3.8) + drb (2.2.1) + erubi (1.13.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + io-console (0.7.2) + irb (1.13.2) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.4) + mini_mime (1.1.5) + minitest (5.24.0) + msgpack (1.7.2) + mutex_m (0.2.0) + net-imap (0.4.13) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.0) + net-protocol + nio4r (2.7.3) + nokogiri (1.16.6-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.6-arm-linux) + racc (~> 1.4) + nokogiri (1.16.6-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.6-x86-linux) + racc (~> 1.4) + nokogiri (1.16.6-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.6-x86_64-linux) + racc (~> 1.4) + pg (1.5.6) + psych (5.1.2) + stringio + puma (6.4.2) + nio4r (~> 2.0) + racc (1.8.0) + rack (3.1.3) + rack-cors (2.0.2) + rack (>= 2.0.0) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.1.3.4) + actioncable (= 7.1.3.4) + actionmailbox (= 7.1.3.4) + actionmailer (= 7.1.3.4) + actionpack (= 7.1.3.4) + actiontext (= 7.1.3.4) + actionview (= 7.1.3.4) + activejob (= 7.1.3.4) + activemodel (= 7.1.3.4) + activerecord (= 7.1.3.4) + activestorage (= 7.1.3.4) + activesupport (= 7.1.3.4) + bundler (>= 1.15.0) + railties (= 7.1.3.4) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.1.3.4) + actionpack (= 7.1.3.4) + activesupport (= 7.1.3.4) + irb + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rake (13.2.1) + rdoc (6.7.0) + psych (>= 4.0.0) + reline (0.5.9) + io-console (~> 0.5) + rubyzip (2.3.2) + stringio (3.1.1) + thor (1.3.1) + timeout (0.4.1) + tomlib (0.7.2) + bigdecimal + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + tzinfo-data (1.2024.1) + tzinfo (>= 1.0.0) + webrick (1.8.1) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.6.16) + +PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin + x86_64-linux + +DEPENDENCIES + bcrypt (~> 3.1.7) + bootsnap + debug + pg (~> 1.1) + puma (>= 5.0) + rack-cors + rails (~> 7.1.3, >= 7.1.3.3) + rubyzip (~> 2.3) + tomlib (~> 0.7.2) + tzinfo-data + +RUBY VERSION + ruby 3.3.3p89 + +BUNDLED WITH + 2.5.13 diff --git a/rails-backend/README.md b/rails-backend/README.md new file mode 100644 index 0000000..85de49a --- /dev/null +++ b/rails-backend/README.md @@ -0,0 +1,10 @@ +# Game Holster + +Game holster is a full-stack Ruby on Rails and React application for uploading and serving web games made with common game engines such as Unity, Godot, Raylib, and more. + +Currently implemented features in the backend are: +- User authentication: users can log in using GitHub OAuth +- Game Upload: Once a user is logged in they can upload a game which will then belong to them +- Game Serving: Games can be played by users. The games are served under a different domain in order to make XSS attacks impossible in-case a user uploads compromised files. + +The front-end is temporarily my [personal website](https://malcz.com/games) which is made using React. However I am working on a new React frontend in order to have this application be completely standalone and more accessible. diff --git a/rails-backend/Rakefile b/rails-backend/Rakefile new file mode 100644 index 0000000..9a5ea73 --- /dev/null +++ b/rails-backend/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative "config/application" + +Rails.application.load_tasks diff --git a/rails-backend/app/channels/application_cable/channel.rb b/rails-backend/app/channels/application_cable/channel.rb new file mode 100644 index 0000000..d672697 --- /dev/null +++ b/rails-backend/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/rails-backend/app/channels/application_cable/connection.rb b/rails-backend/app/channels/application_cable/connection.rb new file mode 100644 index 0000000..0ff5442 --- /dev/null +++ b/rails-backend/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/rails-backend/app/controllers/api/v1/auth_controller.rb b/rails-backend/app/controllers/api/v1/auth_controller.rb new file mode 100644 index 0000000..590be3b --- /dev/null +++ b/rails-backend/app/controllers/api/v1/auth_controller.rb @@ -0,0 +1,109 @@ +require 'net/http' +require 'bcrypt' + +class Api::V1::AuthController < ApplicationController + class << self + end + + def data + if !cookies[:session].nil? + puts cookies[:session] + #render json: Api::V1::AuthController.user_table[cookies[:session]] + result = User.find_by(access_token_digest: cookies[:session]) + puts "--- RESULT: ---" + puts result + render json: result + else + puts "Not logged in" + render json: { info: "Not logged in" }, status: 401 + end + end + def callback + # user logs in through github + # github redirects them to this endpoint with the token in the url as query params + # we need to use this token to exchange with github for user info(i.e username) + #puts "Code: #{params[:code]}" # this is the github token + #puts ENV["GITHUB_CLIENT_SECRET"] + #puts ENV["GITHUB_CLIENT_ID"] + access_token = get_access_token(params[:code]) + user_data = JSON.parse(get_github_user_data(access_token)) + #puts "------------------------- USER DATA: ------------------------- " + #pp user_data + id = user_data['id'].to_s + #puts "id: #{id}, at: #{access_token}" + access_token_digest = BCrypt::Password.create(access_token) + #cookies[:session] = access_token_digest + cookies[:session] = { + value: access_token_digest, + #domain: :all, + #same_site: :none, + secure: true + } + #user_params = { + # # access_token_digest: hashed_token, + # user_data: user_data + #} + #puts "USER DATA HERE NERD" + #puts user_data.class + user = User.find_or_create_by(identifier: id) + user.user_data = user_data + user.access_token_digest = access_token_digest + user.user_name = user_data["login"] + user.save + #redirect_to 'http://localhost:5173/', allow_other_host: true + redirect_to "#{ENV['ROOT_DOMAIN']}/closewindow", allow_other_host: true + end + + private + + def get_github_user_data(access_token) + uri = URI("https://api.github.com/user") + headers = { Authorization: "Bearer #{access_token}" } + response = Net::HTTP.get( + uri, + headers + ) + puts "Response Body" + puts response + #if response.is_a?(Net::HTTPSuccess) + #if response.body.nil? + result = response + if !result["error"].nil? + puts "Error: #{result["error"]}" + puts response + # we had an error + # TODO + else + puts "huh?" if result.nil? + return result + end + #else + # puts "Error(body nil)" + # something went wrong? + # TODO + #end + end + + def get_access_token(github_user_code) + uri = URI("https://github.com/login/oauth/access_token?client_id=#{ENV["GITHUB_CLIENT_ID"]}&client_secret=#{ENV["GITHUB_CLIENT_SECRET"]}&code=#{github_user_code}") + #uri = URI('https://github.com/login/oauth/access_token') + headers = {Accept: 'application/json'} + response = Net::HTTP.post( + uri, + nil, + headers + ) + if response.is_a?(Net::HTTPSuccess) + result = JSON.parse(response.body) + if !result["error"].nil? + # we had an error + else + return result["access_token"] + end + else + # something went wrong? + # TODO + end + end +end + diff --git a/rails-backend/app/controllers/api/v1/games_controller.rb b/rails-backend/app/controllers/api/v1/games_controller.rb new file mode 100644 index 0000000..4346244 --- /dev/null +++ b/rails-backend/app/controllers/api/v1/games_controller.rb @@ -0,0 +1,167 @@ +require "zip" + +class Api::V1::GamesController < ApplicationController + #skip_before_action :verify_authenticity_token + before_action :allow_iframe, only: [:show_file] + def create + puts "----- PARAMS PLATFORM TAG ----------" + pp params["game"]["platform_tag"] + user = User.find_by(access_token_digest: cookies[:session]) + #user = User.first # temporary for debug + if(!user) + render json: {session: cookies[:session]}, status: 401 + else + pp params + + @game = user.games.new(game_params.except(:status, :platform_tag)) + @game.titleSlug = game_params[:title].parameterize + @game.status = game_params[:status].to_i + if !params["game"]["platform_tag"].nil? + params["game"]["platform_tag"].each do |tag| + tag_obj = Tag.find_by(tag_type: "platform", name: tag) + if tag_obj + @game.tags << tag_obj + end + end + end + + @game.save_zip(params[:game][:zip]) + + if @game.save + render json: @game, status: :created + else + render json: @game.errors, status: :unprocessable_entity + end + end + end + + + # list of all games + def index + game = Game.all.order(created_at: :desc) + #render json: game + render json: game.to_json(include: [:game_files, :card_img, :char_img, :title_img, :tags]) + end + + # single game or list of user's games + #get 'games/:user/:game', to: 'games#show' + #get 'games/:user', to: 'games#show' + def show + user = User.find_by! user_name: params[:user] + if params[:game].nil? + # get list of user games + games = Game.where(user_id: user.id).order(created_at: :desc) + render json: games.to_json(include: [:tags]) + else + game = Game.find_by! user_id: user.id, titleSlug: params[:game] + render json: game.to_json(include: [:tags]) + # get game + end + end + + # :user/:game/*path/:file + def show_file + user = User.find_by user_name: params[:user] + + # if no user given then just show all games + if(user.nil?) + game = Game.all.order(created_at: :desc) + render json: game + return + end + + game = Game.find_by user_id: user.id, titleSlug: params[:game] + + # if no game given then just show all games from that user + if(game.nil?) + game = Game.all.order(created_at: :desc) + render json: game + return + end + + # format and file is seperated in rails + filename = params[:file] + if !params[:format].nil? + filename = "#{filename}.#{params[:format]}" + end + + # if we have no path, make it a blank string + # this lets us later match with files that are in the root + params[:path] ||= "" + + result = game.game_files.blobs.find_by(filename: filename, filepath: params[:path].delete_suffix('/').delete_prefix('/')) # TODO check if we need to do the prefix/suffix deletion at all + + # we shouldnt need this + #result ||= game.game_files.blobs.find_by(filename: filename) + if(result.nil?) + game = Game.all.order(created_at: :desc) + render json: { filename: filename, filepath: params[:path] } + #render json: game + return + end + + format = filename.rpartition('.').last + if format == "html" + render html: result.download.html_safe + elsif format == "js" + render js: result.download.html_safe + #else + # redirect_to url_for(result) + #end + elsif format == "gz" + response.headers['Content-Encoding'] = 'gzip' + second_ext = filename.rpartition('.').first.rpartition('.').last + if second_ext == 'js' + send_data result.download.html_safe, filename: filename, disposition: "inline", type: "application/javascript" + elsif second_ext == 'wasm' + send_data result.download.html_safe, filename: filename, disposition: "inline", type: "application/wasm" + elsif second_ext == 'data' + send_data result.download.html_safe, filename: filename, disposition: "inline", type: "application/octet-stream" + else + send_data result.download.html_safe, filename: filename, disposition: "inline" + end + else + send_data result.download.html_safe, filename: filename, disposition: "inline" + end + end + + #get 'imggames/:user/:game?type=___', to: 'games#show_img' + def show_img + user = User.find_by! user_name: params[:user] + game = Game.find_by! user_id: user.id, titleSlug: params[:game] + + result = nil; + if params[:type] == "char" + result = game.char_img.download + elsif params[:type] == "title" + result = game.title_img.download + elsif params[:type] == "card" + result = game.card_img.download + end + + send_data result, type: 'image/png', disposition: 'inline' + end + + private + + def game_params + params.require(:game).permit( + :title, + :description, + :github_link, + :img_rendering, + :status, + :order, + :card_img, + :char_img, + :title_img, + :zip, + :platform_tag + #game_files: [] + ) + end + + def allow_iframe + response.headers.delete('X-Frame-Options') + end +end diff --git a/rails-backend/app/controllers/api/v1/tags_controller.rb b/rails-backend/app/controllers/api/v1/tags_controller.rb new file mode 100644 index 0000000..4b31de8 --- /dev/null +++ b/rails-backend/app/controllers/api/v1/tags_controller.rb @@ -0,0 +1,15 @@ +class Api::V1::TagsController < ApplicationController + + def index + if !params[:tag_type].nil? + tag = Tag.where(tag_type: params[:tag_type]).order(name: :asc) + + render json: tag.to_json + else + tag = Tag.all.order(tag_type: :desc, name: :asc) + #render json: tag + render json: tag.to_json + end + end + +end diff --git a/rails-backend/app/controllers/api/v1/users_controller.rb b/rails-backend/app/controllers/api/v1/users_controller.rb new file mode 100644 index 0000000..ad27ad6 --- /dev/null +++ b/rails-backend/app/controllers/api/v1/users_controller.rb @@ -0,0 +1,10 @@ +class Api::V1::UsersController < ApplicationController + def index + # return list of all users + users = User.all.order(created_at: :desc) + #render json: users.to_json(only: [:name]) + #render json: users.to_json(only: [:user]) + #render json: users.to_json(only: { only: [:name] }) + render json: users.to_json(include: [games: { only: [:title, :titleSlug] }]) + end +end diff --git a/rails-backend/app/controllers/application_controller.rb b/rails-backend/app/controllers/application_controller.rb new file mode 100644 index 0000000..31e16d7 --- /dev/null +++ b/rails-backend/app/controllers/application_controller.rb @@ -0,0 +1,4 @@ +class ApplicationController < ActionController::API + include ActionController::Cookies + include ActionController::RequestForgeryProtection +end diff --git a/rails-backend/app/controllers/concerns/.keep b/rails-backend/app/controllers/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/app/controllers/platform_tags_controller.rb b/rails-backend/app/controllers/platform_tags_controller.rb new file mode 100644 index 0000000..e3f7392 --- /dev/null +++ b/rails-backend/app/controllers/platform_tags_controller.rb @@ -0,0 +1,8 @@ +class PlatformTagsController < ApplicationController + def index + end + def create + tag = PlatformTag.create!(user_params) + render json: { status: "OK", message: "Tag created" }, status: 201 + end +end diff --git a/rails-backend/app/jobs/application_job.rb b/rails-backend/app/jobs/application_job.rb new file mode 100644 index 0000000..d394c3d --- /dev/null +++ b/rails-backend/app/jobs/application_job.rb @@ -0,0 +1,7 @@ +class ApplicationJob < ActiveJob::Base + # Automatically retry jobs that encountered a deadlock + # retry_on ActiveRecord::Deadlocked + + # Most jobs are safe to ignore if the underlying records are no longer available + # discard_on ActiveJob::DeserializationError +end diff --git a/rails-backend/app/mailers/application_mailer.rb b/rails-backend/app/mailers/application_mailer.rb new file mode 100644 index 0000000..3c34c81 --- /dev/null +++ b/rails-backend/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: "from@example.com" + layout "mailer" +end diff --git a/rails-backend/app/models/application_record.rb b/rails-backend/app/models/application_record.rb new file mode 100644 index 0000000..b63caeb --- /dev/null +++ b/rails-backend/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + primary_abstract_class +end diff --git a/rails-backend/app/models/concerns/.keep b/rails-backend/app/models/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/app/models/game.rb b/rails-backend/app/models/game.rb new file mode 100644 index 0000000..e30dfae --- /dev/null +++ b/rails-backend/app/models/game.rb @@ -0,0 +1,39 @@ +require "zip" + +class Game < ApplicationRecord + enum status: { draft: 0, published: 1 } + #enum status: { + # draft: 0, + # published: 1 + #} + belongs_to :user + has_many_attached :game_files + has_one_attached :zip + has_one_attached :card_img + has_one_attached :char_img + has_one_attached :title_img + has_and_belongs_to_many :tags + + def save_zip(zip) + Zip::File.open(zip) do |zipfile| + + zipfile.each do |entry| + if entry.file? + path_name = entry.name.rpartition('/') + name_extension = path_name.last.rpartition('.') + + Tempfile.open([name_extension.first, name_extension[1] + name_extension.last]) do |temp_file| + entry.extract(temp_file.path) { true } + self.game_files.attach(io: File.open(temp_file.path), filename: path_name.last) + self.game_files.last.blob.filepath = path_name.first.delete_suffix('/').delete_prefix('/') + + # saving the game wont have the blob saved so we need to do it manually + self.game_files.last.blob.save + end + + end + end + end + + end +end diff --git a/rails-backend/app/models/tag.rb b/rails-backend/app/models/tag.rb new file mode 100644 index 0000000..e92f654 --- /dev/null +++ b/rails-backend/app/models/tag.rb @@ -0,0 +1,3 @@ +class Tag < ApplicationRecord + has_and_belongs_to_many :users +end diff --git a/rails-backend/app/models/user.rb b/rails-backend/app/models/user.rb new file mode 100644 index 0000000..0dd552d --- /dev/null +++ b/rails-backend/app/models/user.rb @@ -0,0 +1,4 @@ +class User < ApplicationRecord + validates :identifier, presence: true + has_many :games +end diff --git a/rails-backend/app/views/layouts/mailer.html.erb b/rails-backend/app/views/layouts/mailer.html.erb new file mode 100644 index 0000000..3aac900 --- /dev/null +++ b/rails-backend/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/rails-backend/app/views/layouts/mailer.text.erb b/rails-backend/app/views/layouts/mailer.text.erb new file mode 100644 index 0000000..37f0bdd --- /dev/null +++ b/rails-backend/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/rails-backend/bin/bundle b/rails-backend/bin/bundle new file mode 100755 index 0000000..50da5fd --- /dev/null +++ b/rails-backend/bin/bundle @@ -0,0 +1,109 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'bundle' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "rubygems" + +m = Module.new do + module_function + + def invoked_as_script? + File.expand_path($0) == File.expand_path(__FILE__) + end + + def env_var_version + ENV["BUNDLER_VERSION"] + end + + def cli_arg_version + return unless invoked_as_script? # don't want to hijack other binstubs + return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + bundler_version = nil + update_index = nil + ARGV.each_with_index do |a, i| + if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN) + bundler_version = a + end + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ + bundler_version = $1 + update_index = i + end + bundler_version + end + + def gemfile + gemfile = ENV["BUNDLE_GEMFILE"] + return gemfile if gemfile && !gemfile.empty? + + File.expand_path("../Gemfile", __dir__) + end + + def lockfile + lockfile = + case File.basename(gemfile) + when "gems.rb" then gemfile.sub(/\.rb$/, ".locked") + else "#{gemfile}.lock" + end + File.expand_path(lockfile) + end + + def lockfile_version + return unless File.file?(lockfile) + lockfile_contents = File.read(lockfile) + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ + Regexp.last_match(1) + end + + def bundler_requirement + @bundler_requirement ||= + env_var_version || + cli_arg_version || + bundler_requirement_for(lockfile_version) + end + + def bundler_requirement_for(version) + return "#{Gem::Requirement.default}.a" unless version + + bundler_gem_version = Gem::Version.new(version) + + bundler_gem_version.approximate_recommendation + end + + def load_bundler! + ENV["BUNDLE_GEMFILE"] ||= gemfile + + activate_bundler + end + + def activate_bundler + gem_error = activation_error_handling do + gem "bundler", bundler_requirement + end + return if gem_error.nil? + require_error = activation_error_handling do + require "bundler/version" + end + return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" + exit 42 + end + + def activation_error_handling + yield + nil + rescue StandardError, LoadError => e + e + end +end + +m.load_bundler! + +if m.invoked_as_script? + load Gem.bin_path("bundler", "bundle") +end diff --git a/rails-backend/bin/docker-entrypoint b/rails-backend/bin/docker-entrypoint new file mode 100755 index 0000000..93e0f12 --- /dev/null +++ b/rails-backend/bin/docker-entrypoint @@ -0,0 +1,9 @@ +#!/bin/ash -e + +# If running the rails server then create or migrate existing database +if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then + ./bin/rails db:prepare + ./bin/rails db:seed +fi + +exec "${@}" diff --git a/rails-backend/bin/rails b/rails-backend/bin/rails new file mode 100755 index 0000000..efc0377 --- /dev/null +++ b/rails-backend/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path("../config/application", __dir__) +require_relative "../config/boot" +require "rails/commands" diff --git a/rails-backend/bin/rake b/rails-backend/bin/rake new file mode 100755 index 0000000..4fbf10b --- /dev/null +++ b/rails-backend/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "rake" +Rake.application.run diff --git a/rails-backend/bin/setup b/rails-backend/bin/setup new file mode 100755 index 0000000..3cd5a9d --- /dev/null +++ b/rails-backend/bin/setup @@ -0,0 +1,33 @@ +#!/usr/bin/env ruby +require "fileutils" + +# path to your application root. +APP_ROOT = File.expand_path("..", __dir__) + +def system!(*args) + system(*args, exception: true) +end + +FileUtils.chdir APP_ROOT do + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. + # Add necessary setup steps to this file. + + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") + + # puts "\n== Copying sample files ==" + # unless File.exist?("config/database.yml") + # FileUtils.cp "config/database.yml.sample", "config/database.yml" + # end + + puts "\n== Preparing database ==" + system! "bin/rails db:prepare" + + puts "\n== Removing old logs and tempfiles ==" + system! "bin/rails log:clear tmp:clear" + + puts "\n== Restarting application server ==" + system! "bin/rails restart" +end diff --git a/rails-backend/config.ru b/rails-backend/config.ru new file mode 100644 index 0000000..4a3c09a --- /dev/null +++ b/rails-backend/config.ru @@ -0,0 +1,6 @@ +# This file is used by Rack-based servers to start the application. + +require_relative "config/environment" + +run Rails.application +Rails.application.load_server diff --git a/rails-backend/config/application.rb b/rails-backend/config/application.rb new file mode 100644 index 0000000..6e54549 --- /dev/null +++ b/rails-backend/config/application.rb @@ -0,0 +1,68 @@ +require_relative "boot" + +require "rails/all" +require 'tomlib' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module GameHolster + class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 7.1 + + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w(assets tasks)) + + # Configuration for the application, engines, and railties goes here. + # + # These settings can be overridden in specific environments using the files + # in config/environments, which are processed later. + # + # config.time_zone = "Central Time (US & Canada)" + # config.eager_load_paths << Rails.root.join("extras") + + # Only loads a smaller set of middleware suitable for API only apps. + # Middleware like session, flash, cookies can be added back manually. + # Skip views, helpers and assets when generating a new resource. + config.api_only = true + + config.middleware.use ActionDispatch::Cookies + config.middleware.use ActionDispatch::Session::CookieStore + + config.active_storage.content_types_allowed_inline << "text/html" + + #localhost:5173 + #config.session_store :cookie_store, key: 'session', domain: :all, tld_length: 5 + + #config.before_configuration do + # env_file = File.join(Rails.root, 'config', 'local_env.yml') + # if File.exist?(env_file) + # YAML.load(File.open(env_file)).each do |key, value| + # ENV[key.to_s] = value + # end + # end + #end + config.before_configuration do + env_file = File.join(Rails.root, 'config', 'env.toml') + if File.exist?(env_file) + env = Tomlib.load(File.read(env_file)) + env['default'].each do |key, value| + ENV[key] = value + end + if Rails.env.production? + env['production'].each do |key, value| + ENV[key] = value + end + elsif Rails.env.development? + env['development'].each do |key, value| + ENV[key] = value + end + end + end + end + end +end diff --git a/rails-backend/config/boot.rb b/rails-backend/config/boot.rb new file mode 100644 index 0000000..988a5dd --- /dev/null +++ b/rails-backend/config/boot.rb @@ -0,0 +1,4 @@ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "bundler/setup" # Set up gems listed in the Gemfile. +require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/rails-backend/config/cable.yml b/rails-backend/config/cable.yml new file mode 100644 index 0000000..1e98f84 --- /dev/null +++ b/rails-backend/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: test + +production: + adapter: redis + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + channel_prefix: new_games_host_production diff --git a/rails-backend/config/credentials.yml.enc b/rails-backend/config/credentials.yml.enc new file mode 100644 index 0000000..fd41b67 --- /dev/null +++ b/rails-backend/config/credentials.yml.enc @@ -0,0 +1 @@ +T1XFG7sWuEQHfdCe2e7DQTtavM2jWD3mgXC/oI/5/Pm+UU6u13d1sMiEmKRGErcuAqGz6C2/jvq0LfpGp8butHtXaRd0O0DESl5gMKqQLbuHpo+8PGjIfDriqcisYMkeQyJ5o/1E0NQbke5oEFXWO2nsHeTkx6+0Ex5fQ3m7ZjUfYAbQKgIuvBTy/XCB1l766BArK08otCJ270PSy24DddB8Gli9QIxLck5V9hU21uKiQ/OCOppYOakORmp9XD/xD6bxhY6heHpeuDjqnfM45+RElP22jS/jDQr+CIu/3H3x3KxPe6ikKHhHev5YBck8aT86dMMYJSsC8BNYI4r+JNJr0aOEVhaMW5KAEElK4rn84a7oPUhRYsY1NSpdbs+fPh9BiGLPoFHrIwYVAAO8M192yjYH--YEVp2SmwYFIjIGOE--MRACW3ors+Sxri+vr1J54A== \ No newline at end of file diff --git a/rails-backend/config/database.yml b/rails-backend/config/database.yml new file mode 100644 index 0000000..9e43c5b --- /dev/null +++ b/rails-backend/config/database.yml @@ -0,0 +1,87 @@ +# PostgreSQL. Versions 9.3 and up are supported. +# +# Install the pg driver: +# gem install pg +# On macOS with Homebrew: +# gem install pg -- --with-pg-config=/usr/local/bin/pg_config +# On Windows: +# gem install pg +# Choose the win32 build. +# Install PostgreSQL and put its /bin directory on your path. +# +# Configure Using Gemfile +# gem "pg" +# +default: &default + adapter: postgresql + encoding: unicode + # For details on connection pooling, see Rails configuration guide + # https://guides.rubyonrails.org/configuring.html#database-pooling + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + username: <%= ENV["GAMES_HOST_DATABASE_USERNAME"] %> + password: <%= ENV["GAMES_HOST_DATABASE_PASSWORD"] %> + +development: + <<: *default + database: games_host_development + + # The specified database role being used to connect to PostgreSQL. + # To create additional roles in PostgreSQL see `$ createuser --help`. + # When left blank, PostgreSQL will use the default role. This is + # the same name as the operating system user running Rails. + #username: <%= ENV.fetch("GAMES_HOST_DATABASE_USERNAME") %> + + # The password associated with the PostgreSQL role (username). + #password: + + # Connect on a TCP socket. Omitted by default since the client uses a + # domain socket that doesn't need configuration. Windows does not have + # domain sockets, so uncomment these lines. + #host: localhost + + # The TCP port the server listens on. Defaults to 5432. + # If your server runs on a different port number, change accordingly. + #port: 5432 + + # Schema search path. The server defaults to $user,public + #schema_search_path: myapp,sharedapp,public + + # Minimum log levels, in increasing order: + # debug5, debug4, debug3, debug2, debug1, + # log, notice, warning, error, fatal, and panic + # Defaults to warning. + #min_messages: notice + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: games_host_test + +# As with config/credentials.yml, you never want to store sensitive information, +# like your database password, in your source code. If your source code is +# ever seen by anyone, they now have access to your database. +# +# Instead, provide the password or a full connection URL as an environment +# variable when you boot the app. For example: +# +# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" +# +# If the connection URL is provided in the special DATABASE_URL environment +# variable, Rails will automatically merge its configuration values on top of +# the values provided in this file. Alternatively, you can specify a connection +# URL environment variable explicitly: +# +# production: +# url: <%= ENV["MY_APP_DATABASE_URL"] %> +# +# Read https://guides.rubyonrails.org/configuring.html#configuring-a-database +# for a full overview on how database connection configuration can be specified. +# +production: + <<: *default + database: games_host_production + host: <%= ENV["GAMES_HOST_DATABASE_HOSTNAME"] %> + #username: <%= ENV["GAMES_HOST_DATABASE_USERNAME"] %> + #password: <%= ENV["GAMES_HOST_DATABASE_PASSWORD"] %> diff --git a/rails-backend/config/environment.rb b/rails-backend/config/environment.rb new file mode 100644 index 0000000..cac5315 --- /dev/null +++ b/rails-backend/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative "application" + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/rails-backend/config/environments/development.rb b/rails-backend/config/environments/development.rb new file mode 100644 index 0000000..f962d9f --- /dev/null +++ b/rails-backend/config/environments/development.rb @@ -0,0 +1,71 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.enable_reloading = true + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable server timing + config.server_timing = true + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join("tmp/caching-dev.txt").exist? + config.cache_store = :memory_store + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{2.days.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + + # Highlight code that enqueued background job in logs. + config.active_job.verbose_enqueue_logs = true + + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = true +end diff --git a/rails-backend/config/environments/production.rb b/rails-backend/config/environments/production.rb new file mode 100644 index 0000000..8f51968 --- /dev/null +++ b/rails-backend/config/environments/production.rb @@ -0,0 +1,90 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.enable_reloading = false + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. + # config.public_file_server.enabled = false + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = "http://assets.example.com" + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Mount Action Cable outside main process or domain. + # config.action_cable.mount_path = nil + # config.action_cable.url = "wss://example.com/cable" + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] + + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # config.assume_ssl = true + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + config.force_ssl = true + + # Log to STDOUT by default + config.logger = ActiveSupport::Logger.new(STDOUT) + .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # "info" includes generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment). + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "new_games_host_production" + + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Don't log any deprecations. + config.active_support.report_deprecations = false + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false + + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } +end diff --git a/rails-backend/config/environments/test.rb b/rails-backend/config/environments/test.rb new file mode 100644 index 0000000..adbb4a6 --- /dev/null +++ b/rails-backend/config/environments/test.rb @@ -0,0 +1,64 @@ +require "active_support/core_ext/integer/time" + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # While tests run files are not watched, reloading is not necessary. + config.enable_reloading = false + + # Eager loading loads your entire application. When running a single test locally, + # this is usually not necessary, and can slow down your test suite. However, it's + # recommended that you enable it in continuous integration systems to ensure eager + # loading is working properly before deploying your code. + config.eager_load = ENV["CI"].present? + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{1.hour.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # Render exception templates for rescuable exceptions and raise for other exceptions. + config.action_dispatch.show_exceptions = :rescuable + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Store uploaded files on the local file system in a temporary directory. + config.active_storage.service = :test + + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = true +end diff --git a/rails-backend/config/initializers/cors.rb b/rails-backend/config/initializers/cors.rb new file mode 100644 index 0000000..541e2ed --- /dev/null +++ b/rails-backend/config/initializers/cors.rb @@ -0,0 +1,27 @@ +# Be sure to restart your server when you modify this file. + +# Avoid CORS issues when API is called from the frontend app. +# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests. + +# Read more: https://github.com/cyu/rack-cors + +# Rails.application.config.middleware.insert_before 0, Rack::Cors do +# allow do +# origins "example.com" +# +# resource "*", +# headers: :any, +# methods: [:get, :post, :put, :patch, :delete, :options, :head] +# end +# end + + Rails.application.config.middleware.insert_before 0, Rack::Cors do + allow do + origins 'localhost:3000', 'localhost:5173', 'gameshoster.com', 'malcz.com' + + resource '/api/v1/*', + headers: :any, + methods: [:get, :post, :put, :patch, :delete, :options, :head], + credentials: true # <- need this to enable auth + end + end diff --git a/rails-backend/config/initializers/filter_parameter_logging.rb b/rails-backend/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..c2d89e2 --- /dev/null +++ b/rails-backend/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/rails-backend/config/initializers/inflections.rb b/rails-backend/config/initializers/inflections.rb new file mode 100644 index 0000000..3860f65 --- /dev/null +++ b/rails-backend/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym "RESTful" +# end diff --git a/rails-backend/config/locales/en.yml b/rails-backend/config/locales/en.yml new file mode 100644 index 0000000..6c349ae --- /dev/null +++ b/rails-backend/config/locales/en.yml @@ -0,0 +1,31 @@ +# Files in the config/locales directory are used for internationalization and +# are automatically loaded by Rails. If you want to use locales other than +# English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t "hello" +# +# In views, this is aliased to just `t`: +# +# <%= t("hello") %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more about the API, please read the Rails Internationalization guide +# at https://guides.rubyonrails.org/i18n.html. +# +# Be aware that YAML interprets the following case-insensitive strings as +# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings +# must be quoted to be interpreted as strings. For example: +# +# en: +# "yes": yup +# enabled: "ON" + +en: + hello: "Hello world" diff --git a/rails-backend/config/puma.rb b/rails-backend/config/puma.rb new file mode 100644 index 0000000..afa809b --- /dev/null +++ b/rails-backend/config/puma.rb @@ -0,0 +1,35 @@ +# This configuration file will be evaluated by Puma. The top-level methods that +# are invoked here are part of Puma's configuration DSL. For more information +# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. + +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } +threads min_threads_count, max_threads_count + +# Specifies that the worker count should equal the number of processors in production. +if ENV["RAILS_ENV"] == "production" + require "concurrent-ruby" + worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count }) + workers worker_count if worker_count > 1 +end + +# Specifies the `worker_timeout` threshold that Puma will use to wait before +# terminating a worker in development environments. +worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the `pidfile` that Puma will use. +pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } + +# Allow puma to be restarted by `bin/rails restart` command. +plugin :tmp_restart diff --git a/rails-backend/config/routes.rb b/rails-backend/config/routes.rb new file mode 100644 index 0000000..ba4c647 --- /dev/null +++ b/rails-backend/config/routes.rb @@ -0,0 +1,46 @@ +Rails.application.routes.draw do + get 'tags/index' + get 'tags/create' + get 'tags/destroy' + # + # isolated domain, do not allow auth here + #constraints host: 'localhost' do + # GAMES + get 'game/:user/:game/*path/:file', to: 'api/v1/games#show_file', constraints: { file: /[^\/]+/ } + get 'game/:user/:game/:file', to: 'api/v1/games#show_file', constraints: { file: /[^\/]+/ } + #end + + namespace :api do + namespace :v1 do + + #constraints host: "localhost" do + # USERS + get 'users/index', to: 'users#index' + + # GAMES + post 'games', to: 'games#create' + get 'games', to: 'games#index' + get 'games/:user/', to: 'games#show' + get 'games/:user/:game', to: 'games#show' + get 'games_img/:user/:game', to: 'games#show_img' + #resources :games + + # TAGS + get 'tags', to: 'tags#index' + + # AUTH + get 'auth/callback', to: 'auth#callback' + get 'auth/data', to: 'auth#data' + #end + + end + end + # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html + + # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. + # Can be used by load balancers and uptime monitors to verify that the app is live. + get "up" => "rails/health#show", as: :rails_health_check + + # Defines the root path route ("/") + # root "posts#index" +end diff --git a/rails-backend/config/storage.yml b/rails-backend/config/storage.yml new file mode 100644 index 0000000..4942ab6 --- /dev/null +++ b/rails-backend/config/storage.yml @@ -0,0 +1,34 @@ +test: + service: Disk + root: <%= Rails.root.join("tmp/storage") %> + +local: + service: Disk + root: <%= Rails.root.join("storage") %> + +# Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) +# amazon: +# service: S3 +# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> +# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> +# region: us-east-1 +# bucket: your_own_bucket-<%= Rails.env %> + +# Remember not to checkin your GCS keyfile to a repository +# google: +# service: GCS +# project: your_project +# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> +# bucket: your_own_bucket-<%= Rails.env %> + +# Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) +# microsoft: +# service: AzureStorage +# storage_account_name: your_account_name +# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> +# container: your_container_name-<%= Rails.env %> + +# mirror: +# service: Mirror +# primary: local +# mirrors: [ amazon, google, microsoft ] diff --git a/rails-backend/db/lfs/Games/Almost Pong/card.png b/rails-backend/db/lfs/Games/Almost Pong/card.png new file mode 100644 index 0000000..aab9261 Binary files /dev/null and b/rails-backend/db/lfs/Games/Almost Pong/card.png differ diff --git a/rails-backend/db/lfs/Games/Almost Pong/character.png b/rails-backend/db/lfs/Games/Almost Pong/character.png new file mode 100644 index 0000000..8e3b3df Binary files /dev/null and b/rails-backend/db/lfs/Games/Almost Pong/character.png differ diff --git a/rails-backend/db/lfs/Games/Almost Pong/desc.md b/rails-backend/db/lfs/Games/Almost Pong/desc.md new file mode 100644 index 0000000..32756fd --- /dev/null +++ b/rails-backend/db/lfs/Games/Almost Pong/desc.md @@ -0,0 +1,12 @@ +# [Almost Pong](https://github.com/realtradam/almost-pong) + +## Controls +Spacebar to play + +## Tech Stack +Ruby, FelECS, and Raylib + +## Description + +Almost Pong is a silly mashup between the classic Pong and the not so classic Flappy Bird. I saw someone else make this on the internet and I decided to give myself a challenge to see if I could recreate this within a few hours and I did! + diff --git a/rails-backend/db/lfs/Games/Almost Pong/index.zip b/rails-backend/db/lfs/Games/Almost Pong/index.zip new file mode 100644 index 0000000..63a8a2d Binary files /dev/null and b/rails-backend/db/lfs/Games/Almost Pong/index.zip differ diff --git a/rails-backend/db/lfs/Games/Almost Pong/title.png b/rails-backend/db/lfs/Games/Almost Pong/title.png new file mode 100644 index 0000000..6ee677c Binary files /dev/null and b/rails-backend/db/lfs/Games/Almost Pong/title.png differ diff --git a/rails-backend/db/lfs/Games/Bubbles, Behind/card.png b/rails-backend/db/lfs/Games/Bubbles, Behind/card.png new file mode 100644 index 0000000..4100514 Binary files /dev/null and b/rails-backend/db/lfs/Games/Bubbles, Behind/card.png differ diff --git a/rails-backend/db/lfs/Games/Bubbles, Behind/character.png b/rails-backend/db/lfs/Games/Bubbles, Behind/character.png new file mode 100644 index 0000000..3c408c1 Binary files /dev/null and b/rails-backend/db/lfs/Games/Bubbles, Behind/character.png differ diff --git a/rails-backend/db/lfs/Games/Bubbles, Behind/desc.md b/rails-backend/db/lfs/Games/Bubbles, Behind/desc.md new file mode 100644 index 0000000..90f0975 --- /dev/null +++ b/rails-backend/db/lfs/Games/Bubbles, Behind/desc.md @@ -0,0 +1,20 @@ +# [Bubbles, Behind](https://github.com/realtradam/TOJam2023) + +## Controls + +### Keyboard +- WASD - Movement + +### Controller +Left Joystick - Movement + +## Tech Stack +C and a home-made custom game engine with BGFX + +## Description + +This game was made in 3 days with the collaboration of my friend [Arnold](https://github.com/arngo). We set out to build a game with my woefully unprepared prototype game engine and managed to stick the landing! + +I really enjoy the story on this project because halfway through the project the game engine unexpected brought up a massive bug which made the game entirely unplayable. Luckily through my knowledge of rendering and how I had built up my engine I was able to pinpoint the issue and resolve it before the tight deadline. + +The second interesting thing that happened was a bug which would randomly crash the game after an indeterminate amount of time. This bug had been discovered mere minutes before the deadline however we were able to cover up the bug to players of the game in a very clever way. We set up a bash script which would run in a loop and this script would sleep for a couple seconds and then launch the game. Why would we have a delay to relaunch the game? We set up a full screen window on the PC of an image saying "Game Over". Whenever the game would crash this image would immediately become visible, the players would see it and incorrectly assume they had "died" in the game and then the game would relaunch. The game would launch also in fullscreen so it would go on top of this image. And so no one was aware at all of any bug or crash happening. Hilarious. diff --git a/rails-backend/db/lfs/Games/Bubbles, Behind/index.zip b/rails-backend/db/lfs/Games/Bubbles, Behind/index.zip new file mode 100644 index 0000000..661dac6 Binary files /dev/null and b/rails-backend/db/lfs/Games/Bubbles, Behind/index.zip differ diff --git a/rails-backend/db/lfs/Games/Bubbles, Behind/title.png b/rails-backend/db/lfs/Games/Bubbles, Behind/title.png new file mode 100644 index 0000000..718918a Binary files /dev/null and b/rails-backend/db/lfs/Games/Bubbles, Behind/title.png differ diff --git a/rails-backend/db/lfs/Games/Magnet Run/card.png b/rails-backend/db/lfs/Games/Magnet Run/card.png new file mode 100644 index 0000000..5a942da Binary files /dev/null and b/rails-backend/db/lfs/Games/Magnet Run/card.png differ diff --git a/rails-backend/db/lfs/Games/Magnet Run/character.png b/rails-backend/db/lfs/Games/Magnet Run/character.png new file mode 100644 index 0000000..beb1fbe Binary files /dev/null and b/rails-backend/db/lfs/Games/Magnet Run/character.png differ diff --git a/rails-backend/db/lfs/Games/Magnet Run/desc.md b/rails-backend/db/lfs/Games/Magnet Run/desc.md new file mode 100644 index 0000000..7d75d1e --- /dev/null +++ b/rails-backend/db/lfs/Games/Magnet Run/desc.md @@ -0,0 +1,16 @@ +# [Magnet Run](https://github.com/realtradam/Magnet-Run-3D) + +## Controls + +- WASD - Movement +- Space - Jump +- Q/E - Rotate camera horizontally(disables auto rotation for a short time) +- Z/X - Rotate camera vertically(disables auto rotation for a short time) + +## Tech Stack +Unity, C# + +## Description + +A 3D Unity game I had created to learn and practice creating a character controller and camera as well as learning how to create a platformer system similar to Super Mario Galaxy where the gravity can be in any direction. + diff --git a/rails-backend/db/lfs/Games/Magnet Run/index.zip b/rails-backend/db/lfs/Games/Magnet Run/index.zip new file mode 100644 index 0000000..4164abe Binary files /dev/null and b/rails-backend/db/lfs/Games/Magnet Run/index.zip differ diff --git a/rails-backend/db/lfs/Games/Magnet Run/title.png b/rails-backend/db/lfs/Games/Magnet Run/title.png new file mode 100644 index 0000000..b272849 Binary files /dev/null and b/rails-backend/db/lfs/Games/Magnet Run/title.png differ diff --git a/rails-backend/db/lfs/Games/Optimal Direction/card.png b/rails-backend/db/lfs/Games/Optimal Direction/card.png new file mode 100644 index 0000000..ff6223f Binary files /dev/null and b/rails-backend/db/lfs/Games/Optimal Direction/card.png differ diff --git a/rails-backend/db/lfs/Games/Optimal Direction/character.png b/rails-backend/db/lfs/Games/Optimal Direction/character.png new file mode 100644 index 0000000..1fd4e20 Binary files /dev/null and b/rails-backend/db/lfs/Games/Optimal Direction/character.png differ diff --git a/rails-backend/db/lfs/Games/Optimal Direction/desc.md b/rails-backend/db/lfs/Games/Optimal Direction/desc.md new file mode 100644 index 0000000..90febb6 --- /dev/null +++ b/rails-backend/db/lfs/Games/Optimal Direction/desc.md @@ -0,0 +1,18 @@ +# Optimal Direction + +## Controls +- W - Accelerate +- A/D - Steering +- Shift - Drift/Grip +- Space: Brake + +## Tech Stack +Godot + +## Description + +An old overly ambitious project of mine. The goal was to make a sort of realistic 2d racing game where the physics took into account things like weight distribution, front/rear/all wheel drive, gearboxes, etc. + +A lot of those mechanics were implemented, but the scope of the project was much too big for one person at the skill level I was at to realistically finish the project so for that reason it was abandoned. + +I hope to one day revisit this genre again and make a fun game out of it. diff --git a/rails-backend/db/lfs/Games/Optimal Direction/index.zip b/rails-backend/db/lfs/Games/Optimal Direction/index.zip new file mode 100644 index 0000000..4f169ec Binary files /dev/null and b/rails-backend/db/lfs/Games/Optimal Direction/index.zip differ diff --git a/rails-backend/db/lfs/Games/Optimal Direction/title.png b/rails-backend/db/lfs/Games/Optimal Direction/title.png new file mode 100644 index 0000000..d155fd7 Binary files /dev/null and b/rails-backend/db/lfs/Games/Optimal Direction/title.png differ diff --git a/rails-backend/db/lfs/Games/Orc: Arena of Time/card.png b/rails-backend/db/lfs/Games/Orc: Arena of Time/card.png new file mode 100644 index 0000000..c757a53 Binary files /dev/null and b/rails-backend/db/lfs/Games/Orc: Arena of Time/card.png differ diff --git a/rails-backend/db/lfs/Games/Orc: Arena of Time/character.png b/rails-backend/db/lfs/Games/Orc: Arena of Time/character.png new file mode 100644 index 0000000..2e46e51 Binary files /dev/null and b/rails-backend/db/lfs/Games/Orc: Arena of Time/character.png differ diff --git a/rails-backend/db/lfs/Games/Orc: Arena of Time/desc.md b/rails-backend/db/lfs/Games/Orc: Arena of Time/desc.md new file mode 100644 index 0000000..8072a4e --- /dev/null +++ b/rails-backend/db/lfs/Games/Orc: Arena of Time/desc.md @@ -0,0 +1,15 @@ +# [Orc: Arena of Time](https://github.com/realtradam/orc-arena-of-time) + +## Controls +- WASD - Movement + +## Tech Stack +Ruby, FelECS, and Raylib + +## Description + +Help "Orc", the brave orc, navigate the precarious Arena of Time and prove to all what a mighty adventurer they are! + +In my opinion the best game I have made so far and the one I am the most proud of. It has the most unique gameplay out of all the games I have worked on and a great considerable amount of effort went into this. + +It also won first place overall in the [Raylib 5K gamejam](https://itch.io/jam/raylib-5k-gamejam) which is awesome! diff --git a/rails-backend/db/lfs/Games/Orc: Arena of Time/index.zip b/rails-backend/db/lfs/Games/Orc: Arena of Time/index.zip new file mode 100644 index 0000000..b29fb85 Binary files /dev/null and b/rails-backend/db/lfs/Games/Orc: Arena of Time/index.zip differ diff --git a/rails-backend/db/lfs/Games/Orc: Arena of Time/title.png b/rails-backend/db/lfs/Games/Orc: Arena of Time/title.png new file mode 100644 index 0000000..311fdb4 Binary files /dev/null and b/rails-backend/db/lfs/Games/Orc: Arena of Time/title.png differ diff --git a/rails-backend/db/lfs/Games/SpaceCube 64/card.png b/rails-backend/db/lfs/Games/SpaceCube 64/card.png new file mode 100644 index 0000000..2363c7f Binary files /dev/null and b/rails-backend/db/lfs/Games/SpaceCube 64/card.png differ diff --git a/rails-backend/db/lfs/Games/SpaceCube 64/character.png b/rails-backend/db/lfs/Games/SpaceCube 64/character.png new file mode 100644 index 0000000..11257b7 Binary files /dev/null and b/rails-backend/db/lfs/Games/SpaceCube 64/character.png differ diff --git a/rails-backend/db/lfs/Games/SpaceCube 64/desc.md b/rails-backend/db/lfs/Games/SpaceCube 64/desc.md new file mode 100644 index 0000000..099657c --- /dev/null +++ b/rails-backend/db/lfs/Games/SpaceCube 64/desc.md @@ -0,0 +1,32 @@ +# [Space Cube 64](https://github.com/realtradam/tojam2024) + +## Controls +### Web Controls: + +#### P1: + +- WASD -> movement +- E -> shoot +- Q -> change camera(thirdperson or firstperson) + +#### P2: +- IJKL -> movement +- O -> shoot +- U -> change camera(thirdperson or firstperson) + + + +### N64 Controls: + +- Joystick -> movement +- Z -> shoot +- R -> change camera(thirdperson or firstperson) + +## Tech Stack +Nintendo 64, C, Libdragon, Raylib + +## Description + +An entry into the Toronto Gamejam 2024, this game was developed for real Nintendo 64 hardware and for the game showcase we demoed the game running on a real Nintendo 64. + +Later we ported this game to the web which is what you can see above and play. It runs significantly better on the web, on the Nintendo the framerate would drop as low at 10fps. diff --git a/rails-backend/db/lfs/Games/SpaceCube 64/index.zip b/rails-backend/db/lfs/Games/SpaceCube 64/index.zip new file mode 100644 index 0000000..ce01311 Binary files /dev/null and b/rails-backend/db/lfs/Games/SpaceCube 64/index.zip differ diff --git a/rails-backend/db/lfs/Games/SpaceCube 64/title.png b/rails-backend/db/lfs/Games/SpaceCube 64/title.png new file mode 100644 index 0000000..9f306a3 Binary files /dev/null and b/rails-backend/db/lfs/Games/SpaceCube 64/title.png differ diff --git a/rails-backend/db/lfs/Games/Winter One/card.png b/rails-backend/db/lfs/Games/Winter One/card.png new file mode 100644 index 0000000..d15bc1b Binary files /dev/null and b/rails-backend/db/lfs/Games/Winter One/card.png differ diff --git a/rails-backend/db/lfs/Games/Winter One/character.png b/rails-backend/db/lfs/Games/Winter One/character.png new file mode 100644 index 0000000..24cfdb1 Binary files /dev/null and b/rails-backend/db/lfs/Games/Winter One/character.png differ diff --git a/rails-backend/db/lfs/Games/Winter One/desc.md b/rails-backend/db/lfs/Games/Winter One/desc.md new file mode 100644 index 0000000..e392807 --- /dev/null +++ b/rails-backend/db/lfs/Games/Winter One/desc.md @@ -0,0 +1,13 @@ +# Winter One + +## Controls +Mouse + Click + +## Tech Stack +Godot + +## Description + +An old game which we republished onto Itch. This is the first game [Arnold](https://github.com/arngo) and myself have worked on together. Its a pretty simple endless scrolling shooter with 2 different enemy types. We could of developed more but we decided to instead try and move on to a different game. It was supposed to be a short 1-2 week project that ended up taking over 3 weeks to finish. This was mostly a project about learning the ins and and outs of the Godot Engine and also to try an manage a short deadline(winter break). + + diff --git a/rails-backend/db/lfs/Games/Winter One/index.zip b/rails-backend/db/lfs/Games/Winter One/index.zip new file mode 100644 index 0000000..01eb869 Binary files /dev/null and b/rails-backend/db/lfs/Games/Winter One/index.zip differ diff --git a/rails-backend/db/lfs/Games/Winter One/title.png b/rails-backend/db/lfs/Games/Winter One/title.png new file mode 100644 index 0000000..a654725 Binary files /dev/null and b/rails-backend/db/lfs/Games/Winter One/title.png differ diff --git a/rails-backend/db/migrate/20240519191604_create_users.rb b/rails-backend/db/migrate/20240519191604_create_users.rb new file mode 100644 index 0000000..d1fa192 --- /dev/null +++ b/rails-backend/db/migrate/20240519191604_create_users.rb @@ -0,0 +1,13 @@ +class CreateUsers < ActiveRecord::Migration[7.1] + def change + create_table :users do |t| + t.string :user_name # we need this for game urls + t.string :identifier + t.string :access_token_digest + t.json :user_data + + t.timestamps + end + #add_index :users, :identifier, unique: true + end +end diff --git a/rails-backend/db/migrate/20240521142838_create_active_storage_tables.active_storage.rb b/rails-backend/db/migrate/20240521142838_create_active_storage_tables.active_storage.rb new file mode 100644 index 0000000..e4706aa --- /dev/null +++ b/rails-backend/db/migrate/20240521142838_create_active_storage_tables.active_storage.rb @@ -0,0 +1,57 @@ +# This migration comes from active_storage (originally 20170806125915) +class CreateActiveStorageTables < ActiveRecord::Migration[7.0] + def change + # Use Active Record's configured type for primary and foreign keys + primary_key_type, foreign_key_type = primary_and_foreign_key_types + + create_table :active_storage_blobs, id: primary_key_type do |t| + t.string :key, null: false + t.string :filename, null: false + t.string :content_type + t.text :metadata + t.string :service_name, null: false + t.bigint :byte_size, null: false + t.string :checksum + + if connection.supports_datetime_with_precision? + t.datetime :created_at, precision: 6, null: false + else + t.datetime :created_at, null: false + end + + t.index [ :key ], unique: true + end + + create_table :active_storage_attachments, id: primary_key_type do |t| + t.string :name, null: false + t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type + t.references :blob, null: false, type: foreign_key_type + + if connection.supports_datetime_with_precision? + t.datetime :created_at, precision: 6, null: false + else + t.datetime :created_at, null: false + end + + t.index [ :record_type, :record_id, :name, :blob_id ], name: :index_active_storage_attachments_uniqueness, unique: true + t.foreign_key :active_storage_blobs, column: :blob_id + end + + create_table :active_storage_variant_records, id: primary_key_type do |t| + t.belongs_to :blob, null: false, index: false, type: foreign_key_type + t.string :variation_digest, null: false + + t.index [ :blob_id, :variation_digest ], name: :index_active_storage_variant_records_uniqueness, unique: true + t.foreign_key :active_storage_blobs, column: :blob_id + end + end + + private + def primary_and_foreign_key_types + config = Rails.configuration.generators + setting = config.options[config.orm][:primary_key_type] + primary_key_type = setting || :primary_key + foreign_key_type = setting || :bigint + [primary_key_type, foreign_key_type] + end +end diff --git a/rails-backend/db/migrate/20240521205000_create_games.rb b/rails-backend/db/migrate/20240521205000_create_games.rb new file mode 100644 index 0000000..d65b118 --- /dev/null +++ b/rails-backend/db/migrate/20240521205000_create_games.rb @@ -0,0 +1,16 @@ +class CreateGames < ActiveRecord::Migration[7.1] + def change + create_table :games do |t| + t.string :title + t.string :titleSlug + t.string :description + t.string :github_link + t.string :img_rendering + t.integer :status, default: 0 + t.integer :order, default: 0 + + t.timestamps + end + add_reference :games, :user, null: false, foreign_key: true + end +end diff --git a/rails-backend/db/migrate/20240527231908_add_path_to_active_storage_blobs.rb b/rails-backend/db/migrate/20240527231908_add_path_to_active_storage_blobs.rb new file mode 100644 index 0000000..c591ae1 --- /dev/null +++ b/rails-backend/db/migrate/20240527231908_add_path_to_active_storage_blobs.rb @@ -0,0 +1,5 @@ +class AddPathToActiveStorageBlobs < ActiveRecord::Migration[7.1] + def change + add_column :active_storage_blobs, :filepath, :string, null: false, default: '' + end +end diff --git a/rails-backend/db/migrate/20240606184819_create_tags.rb b/rails-backend/db/migrate/20240606184819_create_tags.rb new file mode 100644 index 0000000..9b33939 --- /dev/null +++ b/rails-backend/db/migrate/20240606184819_create_tags.rb @@ -0,0 +1,10 @@ +class CreateTags < ActiveRecord::Migration[7.1] + def change + create_table :tags do |t| + t.string :tag_type, null: false + t.string :name, null: false + + t.timestamps + end + end +end diff --git a/rails-backend/db/migrate/20240606200659_create_tags_games_join_table.rb b/rails-backend/db/migrate/20240606200659_create_tags_games_join_table.rb new file mode 100644 index 0000000..7a0dae4 --- /dev/null +++ b/rails-backend/db/migrate/20240606200659_create_tags_games_join_table.rb @@ -0,0 +1,8 @@ +class CreateTagsGamesJoinTable < ActiveRecord::Migration[7.1] + def change + create_join_table :tags, :games do |t| + t.index :tag_id + t.index :game_id + end + end +end diff --git a/rails-backend/db/schema.rb b/rails-backend/db/schema.rb new file mode 100644 index 0000000..f4cabcc --- /dev/null +++ b/rails-backend/db/schema.rb @@ -0,0 +1,86 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# This file is the source Rails uses to define your schema when running `bin/rails +# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema[7.1].define(version: 2024_06_06_200659) do + # These are extensions that must be enabled in order to support this database + enable_extension "plpgsql" + + create_table "active_storage_attachments", force: :cascade do |t| + t.string "name", null: false + t.string "record_type", null: false + t.bigint "record_id", null: false + t.bigint "blob_id", null: false + t.datetime "created_at", null: false + t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" + t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true + end + + create_table "active_storage_blobs", force: :cascade do |t| + t.string "key", null: false + t.string "filename", null: false + t.string "content_type" + t.text "metadata" + t.string "service_name", null: false + t.bigint "byte_size", null: false + t.string "checksum" + t.datetime "created_at", null: false + t.string "filepath", default: "", null: false + t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true + end + + create_table "active_storage_variant_records", force: :cascade do |t| + t.bigint "blob_id", null: false + t.string "variation_digest", null: false + t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true + end + + create_table "games", force: :cascade do |t| + t.string "title" + t.string "titleSlug" + t.string "description" + t.string "github_link" + t.string "img_rendering" + t.integer "status", default: 0 + t.integer "order", default: 0 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.bigint "user_id", null: false + t.index ["user_id"], name: "index_games_on_user_id" + end + + create_table "games_tags", id: false, force: :cascade do |t| + t.bigint "tag_id", null: false + t.bigint "game_id", null: false + t.index ["game_id"], name: "index_games_tags_on_game_id" + t.index ["tag_id"], name: "index_games_tags_on_tag_id" + end + + create_table "tags", force: :cascade do |t| + t.string "tag_type", null: false + t.string "name", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "users", force: :cascade do |t| + t.string "user_name" + t.string "identifier" + t.string "access_token_digest" + t.json "user_data" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" + add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" + add_foreign_key "games", "users" +end diff --git a/rails-backend/db/seeds.rb b/rails-backend/db/seeds.rb new file mode 100644 index 0000000..50c901e --- /dev/null +++ b/rails-backend/db/seeds.rb @@ -0,0 +1,167 @@ +# This file should ensure the existence of records required to run the application in every environment (production, +# development, test). The code here should be idempotent so that it can be executed at any point in every environment. +# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). +# +# Example: +# +# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name| +# MovieGenre.find_or_create_by!(name: genre_name) +# end + +markdown_sample = <<~HEREDOC +# Telum vim lactente + +## Petebam Circe hic mactare vitae tandem super + +Lorem markdownum Perseu tetigisse instar. Negat inde calidi sibi, in ora +sanguine; vox excitus pes, in in tibi mella! Portasse morte hic venit, latebras +varios servire libera; hic ad augusta forcipe, *illis* est ubi atque. + +Veri inquit pondere. Precatur ego Amymonen quae vidit lunares caput, nequeo, et. +Occidat in nosset pressa, nomine exercita penitus viae gaudent extemplo. +Mensuraque imitamine primum: sine est suas, quo in, est falso est accingere +ibimus ore renuente. Trahit sua nulla per ut vestigia celerique, gemit manes, +quo suae. + +``` +if (graphic_veronica_traceroute + scanRdram < bittorrent_dtd + + bugWindowsOrientation) { + pitchWord = dllTrackbackRemote; + jquery.batchDot.megabyte(cookie - public, memoryDslamSlashdot(2, + socialPpcEncryption)); +} +cron_analyst = ddr_zettabyte_mips; +var digitize = 1; +var friend_gui = artificial.system(alphaWebsite + domain_ibm( + install_ospf_definition, mca_camelcase, 4), 551649, active_trinitron( + microcomputer_spoofing)); +``` + +Ungues in cannae limumque ingrate; in una voce cubitoque fecit. Non nec, uno +vires laesit perque carpere vultus armenta. Via [praetulit clipei +vestis](http://antro.net/) vidit, sive vestes invitas pro ad per nato nam beati. + +## Nec hauriret stantis + +Illa serpentem fugit inlaesas, cum spoliis vultum arbitrium penates fulmina +caelestia moriens videt insidias. Umidus positi, et ripis feremur sit capit +detur tenens. + +- Provolat cum ecce dextro sed suum pomi +- Voce falsa habuit te +- Modo deponere bracchia pectus + +Deus canor incurva usu dolisque tuentes, leto Liber iniquae requies declivis ad +fontibus tali, flagratque aquaticus. Rupit stimuloque, conscia, nimiumque ait +nomen est Libycas, undas. + +> Humumque spectata et vera, **rugosis causam** iaculo sacra, iunctas rege +> triplices contrahit. Potenti unum cava fama genitor testata summa. Comae sit +> cum, dignissima tauri, formatus promissis *in* quoque [quem +> candidaque](http://sulcomaxima.net/), vitalesque? Pro edere rescindere, premit +> mortisque celeri egredior mare pater, una. Arva tu annos fila valles nocte, +> sero deum densetur **soror siccatque Aeacide** certe undique discordia latent +> et. + +Mihi aureus. Eque tuo, illam diris, virgineas erit externis stabula saetae datis +videat vultus depositae nymphas pedum non peto quem. +HEREDOC + +platform_tags = [ + "web", + "web-desktop", + "web-mobile", + "desktop", + "mobile", + "nintendo 64", + "other" +] +platform_tags.each do |tag| + Tag.find_or_create_by!(name: tag, tag_type: "platform") +end + +game_tags = [ + "unity", + "godot", + "raylib", + "c", + "ruby", + "action", + "tech demo", + "idk something", +] +game_tags.each do |tag| + Tag.find_or_create_by!(name: tag, tag_type: "game") +end + +user = User.find_or_create_by!(user_name: "realtradam", identifier: "11139432") + +data_dir = Rails.root.join('db/lfs') + +games = [ + { + title: 'Almost Pong', + github_link: 'https://github.com/realtradam/almost-pong', + img_rendering: 'crisp-edges', + tags: ["web-desktop"] + }, + { + title: 'Bubbles, Behind', + github_link: 'https://github.com/realtradam/TOJam2023', + img_rendering: 'crisp-edges', + tags: ["web-desktop", "desktop"] + }, + { + title: 'Magnet Run', + github_link: 'https://github.com/realtradam/Magnet-Run-3D', + img_rendering: 'crisp-edges', + tags: ["web-desktop", "desktop"] + }, + { + title: 'Optimal Direction', + github_link: 'https://github.com/realtradam/optimal-direction', + img_rendering: 'crisp-edges', + tags: ["web-desktop", "desktop"] + }, + { + title: 'Winter One', + github_link: '', + img_rendering: 'pixelated', + tags: ["web-desktop", "desktop"] + }, + { + title: 'SpaceCube 64', + github_link: 'https://github.com/realtradam/tojam2024', + img_rendering: 'crisp-edges', + tags: ["nintendo 64", "web-desktop"] + }, + { + title: 'Orc: Arena of Time', + github_link: 'https://github.com/realtradam/orc-arena-of-time', + img_rendering: 'pixelated', + tags: ["web-desktop", "desktop"] + }, +] + +games.each do |game| + next if Game.exists?(title: game[:title], user_id: 1) # first user is always me + tags = game[:tags] + game.delete(:tags) + game[:description] = File.read("#{data_dir}/Games/#{game[:title]}/desc.md") + game_obj = user.games.new(game) + game_obj.save_zip("#{data_dir}/Games/#{game[:title]}/index.zip") + game_obj.card_img.attach(io: File.open("#{data_dir}/Games/#{game[:title]}/card.png"), filename: 'card.png') + game_obj.char_img.attach(io: File.open("#{data_dir}/Games/#{game[:title]}/character.png"), filename: 'character.png') + game_obj.title_img.attach(io: File.open("#{data_dir}/Games/#{game[:title]}/title.png"), filename: 'title.png') + game_obj.titleSlug = game[:title].parameterize + game_obj.status = 1 + + tags.each do |tag| + tag_obj = Tag.find_by(tag_type: "platform", name: tag) + if tag_obj + game_obj.tags << tag_obj + end + end + + game_obj.save +end diff --git a/rails-backend/docker-compose.yml b/rails-backend/docker-compose.yml new file mode 100644 index 0000000..67167d4 --- /dev/null +++ b/rails-backend/docker-compose.yml @@ -0,0 +1,19 @@ +# docker-compose.yml +services: + app: + build: . + stdin_open: true + tty: true + platform: linux/amd64 + environment: + - RAILS_ENV=development + ports: + - 3000:3000 + volumes: + - .:/rails + command: ["bin/rails", "server", "-b", "0.0.0.0"] + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3000/healthz"] + interval: 30s + timeout: 10s + retries: 5 diff --git a/rails-backend/lib/tasks/.keep b/rails-backend/lib/tasks/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/log/.keep b/rails-backend/log/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/public/robots.txt b/rails-backend/public/robots.txt new file mode 100644 index 0000000..c19f78a --- /dev/null +++ b/rails-backend/public/robots.txt @@ -0,0 +1 @@ +# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/rails-backend/storage/.keep b/rails-backend/storage/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/test/channels/application_cable/connection_test.rb b/rails-backend/test/channels/application_cable/connection_test.rb new file mode 100644 index 0000000..6340bf9 --- /dev/null +++ b/rails-backend/test/channels/application_cable/connection_test.rb @@ -0,0 +1,13 @@ +require "test_helper" + +module ApplicationCable + class ConnectionTest < ActionCable::Connection::TestCase + # test "connects with cookies" do + # cookies.signed[:user_id] = 42 + # + # connect + # + # assert_equal connection.user_id, "42" + # end + end +end diff --git a/rails-backend/test/controllers/.keep b/rails-backend/test/controllers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/test/controllers/api/v1/auth_controller_test.rb b/rails-backend/test/controllers/api/v1/auth_controller_test.rb new file mode 100644 index 0000000..3a6d312 --- /dev/null +++ b/rails-backend/test/controllers/api/v1/auth_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class Api::V1::AuthControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/api/v1/games_controller_test.rb b/rails-backend/test/controllers/api/v1/games_controller_test.rb new file mode 100644 index 0000000..0052dbb --- /dev/null +++ b/rails-backend/test/controllers/api/v1/games_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class Api::V1::GamesControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/api/v1/tags_controller_test.rb b/rails-backend/test/controllers/api/v1/tags_controller_test.rb new file mode 100644 index 0000000..642edc6 --- /dev/null +++ b/rails-backend/test/controllers/api/v1/tags_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class Api::V1::TagsControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/api/v1/users_controller_test.rb b/rails-backend/test/controllers/api/v1/users_controller_test.rb new file mode 100644 index 0000000..bd2d43b --- /dev/null +++ b/rails-backend/test/controllers/api/v1/users_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class Api::V1::UsersControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/platform_tags_controller_test.rb b/rails-backend/test/controllers/platform_tags_controller_test.rb new file mode 100644 index 0000000..eb6257d --- /dev/null +++ b/rails-backend/test/controllers/platform_tags_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class PlatformTagsControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/tags_controller_test.rb b/rails-backend/test/controllers/tags_controller_test.rb new file mode 100644 index 0000000..bbf5c97 --- /dev/null +++ b/rails-backend/test/controllers/tags_controller_test.rb @@ -0,0 +1,18 @@ +require "test_helper" + +class TagsControllerTest < ActionDispatch::IntegrationTest + test "should get index" do + get tags_index_url + assert_response :success + end + + test "should get create" do + get tags_create_url + assert_response :success + end + + test "should get destroy" do + get tags_destroy_url + assert_response :success + end +end diff --git a/rails-backend/test/fixtures/files/.keep b/rails-backend/test/fixtures/files/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/test/fixtures/games.yml b/rails-backend/test/fixtures/games.yml new file mode 100644 index 0000000..348ba2f --- /dev/null +++ b/rails-backend/test/fixtures/games.yml @@ -0,0 +1,9 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + title: MyString + titleSlug: MyString + +two: + title: MyString + titleSlug: MyString diff --git a/rails-backend/test/fixtures/tags.yml b/rails-backend/test/fixtures/tags.yml new file mode 100644 index 0000000..5b866c5 --- /dev/null +++ b/rails-backend/test/fixtures/tags.yml @@ -0,0 +1,9 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + type: + name: MyString + +two: + type: + name: MyString diff --git a/rails-backend/test/fixtures/users.yml b/rails-backend/test/fixtures/users.yml new file mode 100644 index 0000000..e4d2e35 --- /dev/null +++ b/rails-backend/test/fixtures/users.yml @@ -0,0 +1,13 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_name: MyString + identifier: MyString + access_token_digest: MyString + user_data: + +two: + user_name: MyString + identifier: MyString + access_token_digest: MyString + user_data: diff --git a/rails-backend/test/integration/.keep b/rails-backend/test/integration/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/test/mailers/.keep b/rails-backend/test/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/test/models/.keep b/rails-backend/test/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/test/models/game_test.rb b/rails-backend/test/models/game_test.rb new file mode 100644 index 0000000..6628fae --- /dev/null +++ b/rails-backend/test/models/game_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class GameTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/models/tag_test.rb b/rails-backend/test/models/tag_test.rb new file mode 100644 index 0000000..1846cdb --- /dev/null +++ b/rails-backend/test/models/tag_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class TagTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/models/user_test.rb b/rails-backend/test/models/user_test.rb new file mode 100644 index 0000000..5c07f49 --- /dev/null +++ b/rails-backend/test/models/user_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class UserTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/test_helper.rb b/rails-backend/test/test_helper.rb new file mode 100644 index 0000000..0c22470 --- /dev/null +++ b/rails-backend/test/test_helper.rb @@ -0,0 +1,15 @@ +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" +require "rails/test_help" + +module ActiveSupport + class TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... + end +end diff --git a/rails-backend/tmp/.keep b/rails-backend/tmp/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/tmp/pids/.keep b/rails-backend/tmp/pids/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/tmp/storage/.keep b/rails-backend/tmp/storage/.keep new file mode 100644 index 0000000..e69de29 diff --git a/rails-backend/vendor/.keep b/rails-backend/vendor/.keep new file mode 100644 index 0000000..e69de29 diff --git a/react-frontend/.eslintrc.cjs b/react-frontend/.eslintrc.cjs new file mode 100644 index 0000000..d6c9537 --- /dev/null +++ b/react-frontend/.eslintrc.cjs @@ -0,0 +1,18 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', + ], + ignorePatterns: ['dist', '.eslintrc.cjs'], + parser: '@typescript-eslint/parser', + plugins: ['react-refresh'], + rules: { + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, +} diff --git a/react-frontend/.gitignore b/react-frontend/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/react-frontend/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/react-frontend/README.md b/react-frontend/README.md new file mode 100644 index 0000000..0d6babe --- /dev/null +++ b/react-frontend/README.md @@ -0,0 +1,30 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: + +- Configure the top-level `parserOptions` property like this: + +```js +export default { + // other rules... + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + project: ['./tsconfig.json', './tsconfig.node.json'], + tsconfigRootDir: __dirname, + }, +} +``` + +- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` +- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` +- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list diff --git a/react-frontend/index.html b/react-frontend/index.html new file mode 100644 index 0000000..e4b78ea --- /dev/null +++ b/react-frontend/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/react-frontend/package-lock.json b/react-frontend/package-lock.json new file mode 100644 index 0000000..922d70d --- /dev/null +++ b/react-frontend/package-lock.json @@ -0,0 +1,2944 @@ +{ + "name": "react-frontend", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "react-frontend", + "version": "0.0.0", + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "@typescript-eslint/eslint-plugin": "^7.13.1", + "@typescript-eslint/parser": "^7.13.1", + "@vitejs/plugin-react-swc": "^3.5.0", + "eslint": "^8.57.0", + "eslint-plugin-react-hooks": "^4.6.2", + "eslint-plugin-react-refresh": "^0.4.7", + "typescript": "^5.2.2", + "vite": "^5.3.1" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", + "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@swc/core": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.6.5.tgz", + "integrity": "sha512-tyVvUK/HDOUUsK6/GmWvnqUtD9oDpPUA4f7f7JCOV8hXxtfjMtAZeBKf93yrB1XZet69TDR7EN0hFC6i4MF0Ig==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.9" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.6.5", + "@swc/core-darwin-x64": "1.6.5", + "@swc/core-linux-arm-gnueabihf": "1.6.5", + "@swc/core-linux-arm64-gnu": "1.6.5", + "@swc/core-linux-arm64-musl": "1.6.5", + "@swc/core-linux-x64-gnu": "1.6.5", + "@swc/core-linux-x64-musl": "1.6.5", + "@swc/core-win32-arm64-msvc": "1.6.5", + "@swc/core-win32-ia32-msvc": "1.6.5", + "@swc/core-win32-x64-msvc": "1.6.5" + }, + "peerDependencies": { + "@swc/helpers": "*" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.6.5.tgz", + "integrity": "sha512-RGQhMdni2v1/ANQ/2K+F+QYdzaucekYBewZcX1ogqJ8G5sbPaBdYdDN1qQ4kHLCIkPtGP6qC7c71qPEqL2RidQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.6.5.tgz", + "integrity": "sha512-/pSN0/Jtcbbb9+ovS9rKxR3qertpFAM3OEJr/+Dh/8yy7jK5G5EFPIrfsw/7Q5987ERPIJIH6BspK2CBB2tgcg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.6.5.tgz", + "integrity": "sha512-B0g/dROCE747RRegs/jPHuKJgwXLracDhnqQa80kFdgWEMjlcb7OMCgs5OX86yJGRS4qcYbiMGD0Pp7Kbqn3yw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.6.5.tgz", + "integrity": "sha512-W8meapgXTq8AOtSvDG4yKR8ant2WWD++yOjgzAleB5VAC+oC+aa8YJROGxj8HepurU8kurqzcialwoMeq5SZZQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.6.5.tgz", + "integrity": "sha512-jyCKqoX50Fg8rJUQqh4u5PqnE7nqYKXHjVH2WcYr114/MU21zlsI+YL6aOQU1XP8bJQ2gPQ1rnlnGJdEHiKS/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.6.5.tgz", + "integrity": "sha512-G6HmUn/RRIlXC0YYFfBz2qh6OZkHS/KUPkhoG4X9ADcgWXXjOFh6JrefwsYj8VBAJEnr5iewzjNfj+nztwHaeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.6.5.tgz", + "integrity": "sha512-AQpBjBnelQDSbeTJA50AXdS6+CP66LsXIMNTwhPSgUfE7Bx1ggZV11Fsi4Q5SGcs6a8Qw1cuYKN57ZfZC5QOuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.6.5.tgz", + "integrity": "sha512-MZTWM8kUwS30pVrtbzSGEXtek46aXNb/mT9D6rsS7NvOuv2w+qZhjR1rzf4LNbbn5f8VnR4Nac1WIOYZmfC5ng==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.6.5.tgz", + "integrity": "sha512-WZdu4gISAr3yOm1fVwKhhk6+MrP7kVX0KMP7+ZQFTN5zXQEiDSDunEJKVgjMVj3vlR+6mnAqa/L0V9Qa8+zKlQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.6.5.tgz", + "integrity": "sha512-ezXgucnMTzlFIxQZw7ls/5r2hseFaRoDL04cuXUOs97E8r+nJSmFsRQm/ygH5jBeXNo59nyZCalrjJAjwfgACA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@swc/types": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.9.tgz", + "integrity": "sha512-qKnCno++jzcJ4lM4NTfYifm1EFSCeIfKiAHAfkENZAV5Kl9PjJIyd2yeeVv6c/2CckuLyv2NmRC5pv6pm2WQBg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.12", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", + "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.3", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", + "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", + "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.14.1.tgz", + "integrity": "sha512-aAJd6bIf2vvQRjUG3ZkNXkmBpN+J7Wd0mfQiiVCJMu9Z5GcZZdcc0j8XwN/BM97Fl7e3SkTXODSk4VehUv7CGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.14.1", + "@typescript-eslint/type-utils": "7.14.1", + "@typescript-eslint/utils": "7.14.1", + "@typescript-eslint/visitor-keys": "7.14.1", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.14.1.tgz", + "integrity": "sha512-8lKUOebNLcR0D7RvlcloOacTOWzOqemWEWkKSVpMZVF/XVcwjPR+3MD08QzbW9TCGJ+DwIc6zUSGZ9vd8cO1IA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "7.14.1", + "@typescript-eslint/types": "7.14.1", + "@typescript-eslint/typescript-estree": "7.14.1", + "@typescript-eslint/visitor-keys": "7.14.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.14.1.tgz", + "integrity": "sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.14.1", + "@typescript-eslint/visitor-keys": "7.14.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.14.1.tgz", + "integrity": "sha512-/MzmgNd3nnbDbOi3LfasXWWe292+iuo+umJ0bCCMCPc1jLO/z2BQmWUUUXvXLbrQey/JgzdF/OV+I5bzEGwJkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "7.14.1", + "@typescript-eslint/utils": "7.14.1", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.14.1.tgz", + "integrity": "sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.14.1.tgz", + "integrity": "sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "7.14.1", + "@typescript-eslint/visitor-keys": "7.14.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.14.1.tgz", + "integrity": "sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.14.1", + "@typescript-eslint/types": "7.14.1", + "@typescript-eslint/typescript-estree": "7.14.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.14.1.tgz", + "integrity": "sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.14.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@vitejs/plugin-react-swc": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.7.0.tgz", + "integrity": "sha512-yrknSb3Dci6svCd/qhHqhFPDSw0QtjumcqdKMoNNzmOl5lMXTTiqzjWtG4Qask2HdvvzaNgSunbQGet8/GrKdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@swc/core": "^1.5.7" + }, + "peerDependencies": { + "vite": "^4 || ^5" + } + }, + "node_modules/acorn": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", + "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.7.tgz", + "integrity": "sha512-yrj+KInFmwuQS2UQcg1SF83ha1tuHC1jMQbRNyuWtlEzzKRDgAl7L4Yp4NlDUZTZNlWvHEzOtJhMi40R7JxcSw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "eslint": ">=7" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", + "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vite": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz", + "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.38", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/react-frontend/package.json b/react-frontend/package.json new file mode 100644 index 0000000..30456dc --- /dev/null +++ b/react-frontend/package.json @@ -0,0 +1,28 @@ +{ + "name": "react-frontend", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "@typescript-eslint/eslint-plugin": "^7.13.1", + "@typescript-eslint/parser": "^7.13.1", + "@vitejs/plugin-react-swc": "^3.5.0", + "eslint": "^8.57.0", + "eslint-plugin-react-hooks": "^4.6.2", + "eslint-plugin-react-refresh": "^0.4.7", + "typescript": "^5.2.2", + "vite": "^5.3.1" + } +} diff --git a/react-frontend/public/vite.svg b/react-frontend/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/react-frontend/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/react-frontend/src/App.css b/react-frontend/src/App.css new file mode 100644 index 0000000..b9d355d --- /dev/null +++ b/react-frontend/src/App.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #61dafbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/react-frontend/src/App.tsx b/react-frontend/src/App.tsx new file mode 100644 index 0000000..b2ba1e4 --- /dev/null +++ b/react-frontend/src/App.tsx @@ -0,0 +1,36 @@ +import { useState } from 'react' +import reactLogo from './assets/react.svg' +import viteLogo from '/vite.svg' +import './App.css' + +function App() { + const [count, setCount] = useState(0) + + return ( + <> +
+ + Vite logo + + + React logo + +
+

Game Holster

+

Temp Page

+
+ +

+ Edit src/App.tsx and save to test HMR +

+
+

+ Click on the Vite and React logos to learn more +

+ + ) +} + +export default App diff --git a/react-frontend/src/assets/react.svg b/react-frontend/src/assets/react.svg new file mode 100644 index 0000000..6c87de9 --- /dev/null +++ b/react-frontend/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/react-frontend/src/index.css b/react-frontend/src/index.css new file mode 100644 index 0000000..6119ad9 --- /dev/null +++ b/react-frontend/src/index.css @@ -0,0 +1,68 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/react-frontend/src/main.tsx b/react-frontend/src/main.tsx new file mode 100644 index 0000000..3d7150d --- /dev/null +++ b/react-frontend/src/main.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './App.tsx' +import './index.css' + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/react-frontend/src/vite-env.d.ts b/react-frontend/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/react-frontend/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/react-frontend/tsconfig.app.json b/react-frontend/tsconfig.app.json new file mode 100644 index 0000000..d739292 --- /dev/null +++ b/react-frontend/tsconfig.app.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "composite": true, + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/react-frontend/tsconfig.json b/react-frontend/tsconfig.json new file mode 100644 index 0000000..ea9d0cd --- /dev/null +++ b/react-frontend/tsconfig.json @@ -0,0 +1,11 @@ +{ + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.node.json" + } + ] +} diff --git a/react-frontend/tsconfig.node.json b/react-frontend/tsconfig.node.json new file mode 100644 index 0000000..3afdd6e --- /dev/null +++ b/react-frontend/tsconfig.node.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "composite": true, + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true, + "noEmit": true + }, + "include": ["vite.config.ts"] +} diff --git a/react-frontend/vite.config.ts b/react-frontend/vite.config.ts new file mode 100644 index 0000000..861b04b --- /dev/null +++ b/react-frontend/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react-swc' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], +}) diff --git a/storage/.keep b/storage/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/channels/application_cable/connection_test.rb b/test/channels/application_cable/connection_test.rb deleted file mode 100644 index 6340bf9..0000000 --- a/test/channels/application_cable/connection_test.rb +++ /dev/null @@ -1,13 +0,0 @@ -require "test_helper" - -module ApplicationCable - class ConnectionTest < ActionCable::Connection::TestCase - # test "connects with cookies" do - # cookies.signed[:user_id] = 42 - # - # connect - # - # assert_equal connection.user_id, "42" - # end - end -end diff --git a/test/controllers/.keep b/test/controllers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/controllers/api/v1/auth_controller_test.rb b/test/controllers/api/v1/auth_controller_test.rb deleted file mode 100644 index 3a6d312..0000000 --- a/test/controllers/api/v1/auth_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class Api::V1::AuthControllerTest < ActionDispatch::IntegrationTest - # test "the truth" do - # assert true - # end -end diff --git a/test/controllers/api/v1/games_controller_test.rb b/test/controllers/api/v1/games_controller_test.rb deleted file mode 100644 index 0052dbb..0000000 --- a/test/controllers/api/v1/games_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class Api::V1::GamesControllerTest < ActionDispatch::IntegrationTest - # test "the truth" do - # assert true - # end -end diff --git a/test/controllers/api/v1/tags_controller_test.rb b/test/controllers/api/v1/tags_controller_test.rb deleted file mode 100644 index 642edc6..0000000 --- a/test/controllers/api/v1/tags_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class Api::V1::TagsControllerTest < ActionDispatch::IntegrationTest - # test "the truth" do - # assert true - # end -end diff --git a/test/controllers/api/v1/users_controller_test.rb b/test/controllers/api/v1/users_controller_test.rb deleted file mode 100644 index bd2d43b..0000000 --- a/test/controllers/api/v1/users_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class Api::V1::UsersControllerTest < ActionDispatch::IntegrationTest - # test "the truth" do - # assert true - # end -end diff --git a/test/controllers/platform_tags_controller_test.rb b/test/controllers/platform_tags_controller_test.rb deleted file mode 100644 index eb6257d..0000000 --- a/test/controllers/platform_tags_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class PlatformTagsControllerTest < ActionDispatch::IntegrationTest - # test "the truth" do - # assert true - # end -end diff --git a/test/controllers/tags_controller_test.rb b/test/controllers/tags_controller_test.rb deleted file mode 100644 index bbf5c97..0000000 --- a/test/controllers/tags_controller_test.rb +++ /dev/null @@ -1,18 +0,0 @@ -require "test_helper" - -class TagsControllerTest < ActionDispatch::IntegrationTest - test "should get index" do - get tags_index_url - assert_response :success - end - - test "should get create" do - get tags_create_url - assert_response :success - end - - test "should get destroy" do - get tags_destroy_url - assert_response :success - end -end diff --git a/test/fixtures/files/.keep b/test/fixtures/files/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/games.yml b/test/fixtures/games.yml deleted file mode 100644 index 348ba2f..0000000 --- a/test/fixtures/games.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - title: MyString - titleSlug: MyString - -two: - title: MyString - titleSlug: MyString diff --git a/test/fixtures/tags.yml b/test/fixtures/tags.yml deleted file mode 100644 index 5b866c5..0000000 --- a/test/fixtures/tags.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - type: - name: MyString - -two: - type: - name: MyString diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml deleted file mode 100644 index e4d2e35..0000000 --- a/test/fixtures/users.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - user_name: MyString - identifier: MyString - access_token_digest: MyString - user_data: - -two: - user_name: MyString - identifier: MyString - access_token_digest: MyString - user_data: diff --git a/test/integration/.keep b/test/integration/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/mailers/.keep b/test/mailers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/models/.keep b/test/models/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/models/game_test.rb b/test/models/game_test.rb deleted file mode 100644 index 6628fae..0000000 --- a/test/models/game_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class GameTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/tag_test.rb b/test/models/tag_test.rb deleted file mode 100644 index 1846cdb..0000000 --- a/test/models/tag_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class TagTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/user_test.rb b/test/models/user_test.rb deleted file mode 100644 index 5c07f49..0000000 --- a/test/models/user_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class UserTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/test_helper.rb b/test/test_helper.rb deleted file mode 100644 index 0c22470..0000000 --- a/test/test_helper.rb +++ /dev/null @@ -1,15 +0,0 @@ -ENV["RAILS_ENV"] ||= "test" -require_relative "../config/environment" -require "rails/test_help" - -module ActiveSupport - class TestCase - # Run tests in parallel with specified workers - parallelize(workers: :number_of_processors) - - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - fixtures :all - - # Add more helper methods to be used by all tests here... - end -end diff --git a/tmp/.keep b/tmp/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/pids/.keep b/tmp/pids/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/storage/.keep b/tmp/storage/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/.keep b/vendor/.keep deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3