From c1f1688794133f37bc02b52cc429d19a64757d80 Mon Sep 17 00:00:00 2001 From: Sebastien Riviere Date: Fri, 13 Feb 2026 16:06:50 +0100 Subject: [PATCH] Restructuration of the project folders --- .gitignore | 1 + README.md | 23 ++++ build_push_images.sh | 15 --- doc/dev/TODO.md | 63 ---------- .../archives/la_traque_admin_2023.pdf | Bin .../traque_14_12_25/compte_rendu.txt | 0 .../historique/traque_14_12_25/results.csv | 0 .../traque_14_12_25/trajectories/282845.txt | 0 .../traque_14_12_25/trajectories/423814.txt | 0 .../traque_14_12_25/trajectories/45186.txt | 0 .../traque_14_12_25/trajectories/504174.txt | 0 .../traque_14_12_25/trajectories/730100.txt | 0 .../traque_14_12_25/trajectories/773965.txt | 0 .../traque_20_09_25/compte_rendu.txt | 0 .../historique/traque_20_09_25/results.csv | 0 .../traque_20_09_25/trajectories/104271.txt | 0 .../traque_20_09_25/trajectories/131645.txt | 0 .../traque_20_09_25/trajectories/187211.txt | 0 .../traque_20_09_25/trajectories/588238.txt | 0 .../traque_20_09_25/trajectories/72806.txt | 0 .../traque_20_09_25/trajectories/758930.txt | 0 .../traque_20_09_25/trajectories/841402.txt | 0 {doc/prod/informations => docs}/la_traque.pdf | Bin mobile/docs/TODO.md | 28 +++++ mobile/docs/setup.md | 117 ++++++++++++++++++ .../docs/wireframes}/v1/page_fin.svg | 0 .../docs/wireframes}/v1/page_jeu.svg | 0 .../docs/wireframes}/v1/page_login.svg | 0 .../docs/wireframes}/v1/page_placement.svg | 0 .../docs/wireframes}/v2/page_jeu_info.svg | 0 .../docs/wireframes}/v2/page_jeu_map.svg | 0 {traque-app => mobile/traque-app}/app.json | 0 .../traque-app}/app/+not-found.js | 0 .../traque-app}/app/_layout.js | 0 .../traque-app}/app/display.js | 0 .../traque-app}/app/index.js | 0 .../traque-app}/assets/images/arrow.png | Bin .../assets/images/battery/black.png | Bin .../assets/images/battery/green.png | Bin .../traque-app}/assets/images/battery/red.png | Bin .../traque-app}/assets/images/centerMap.png | Bin .../traque-app}/assets/images/cogwheel.png | Bin .../traque-app}/assets/images/distance.png | Bin .../assets/images/localisation/black.png | Bin .../assets/images/localisation/green.png | Bin .../assets/images/localisation/red.png | Bin .../assets/images/logo/logo_traque.png | Bin .../traque-app}/assets/images/logout.png | Bin .../traque-app}/assets/images/marker/blue.png | Bin .../traque-app}/assets/images/marker/grey.png | Bin .../traque-app}/assets/images/marker/red.png | Bin .../assets/images/missing_image.jpg | Bin .../traque-app}/assets/images/observed.png | Bin .../traque-app}/assets/images/path.png | Bin .../traque-app}/assets/images/placement.png | Bin .../traque-app}/assets/images/running.jpg | Bin .../traque-app}/assets/images/running.png | Bin .../assets/images/target/black.png | Bin .../assets/images/target/white.png | Bin .../traque-app}/assets/images/time.png | Bin .../assets/images/update_position.png | Bin .../traque-app}/components/button.js | 0 .../traque-app}/components/image.js | 0 .../traque-app}/components/input.js | 0 .../traque-app}/components/stat.js | 0 .../traque-app}/context/socketContext.jsx | 4 +- .../context/teamConnexionContext.jsx | 0 .../traque-app}/context/teamContext.jsx | 0 .../traque-app}/hook/useGame.jsx | 0 .../traque-app}/hook/useLocalStorage.jsx | 0 .../traque-app}/hook/useLocation.jsx | 0 .../traque-app}/hook/usePickImage.jsx | 0 .../traque-app}/hook/useSendDeviceInfo.jsx | 0 .../traque-app}/hook/useSocketAuth.jsx | 0 .../traque-app}/hook/useSocketListener.jsx | 0 .../traque-app}/hook/useTimeDifference.jsx | 0 .../traque-app}/package-lock.json | 0 .../traque-app}/package.json | 0 .../traque-app}/util/gameState.js | 0 readme.md | 57 --------- .../docker-compose.dev.yaml | 2 +- .../docker-compose.yaml | 2 +- server/docs/TODO.md | 29 +++++ server/docs/setup.md | 46 +++++++ .../docs/wireframes}/main.svg | 0 .../docs/wireframes}/parameters_placement.svg | 0 .../docs/wireframes}/parameters_zone.svg | 0 {proxy => server/proxy}/Dockerfile | 0 {proxy => server/proxy}/nginx.conf | 0 server/scripts/build_push_images.sh | 17 +++ .../traque-back}/.dockerignore | 0 .../traque-back}/.gitignore | 0 .../traque-back}/Dockerfile | 0 .../traque-back}/Dockerfile.dev | 0 {traque-back => server/traque-back}/Makefile | 0 .../traque-back}/admin_socket.js | 0 {traque-back => server/traque-back}/game.js | 0 .../traque-back}/images/missing_image.jpg | Bin {traque-back => server/traque-back}/index.js | 0 .../traque-back}/package.json | 0 {traque-back => server/traque-back}/photo.js | 0 .../traque-back}/team_socket.js | 0 .../traque-back}/timeout_handler.js | 0 .../traque-back}/trajectory.js | 0 .../traque-back}/zone_manager.js | 0 .../traque-front}/.dockerignore | 0 .../traque-front}/.eslintrc.json | 0 .../traque-front}/.gitignore | 0 .../traque-front}/Dockerfile | 0 .../traque-front}/Dockerfile.dev | 0 .../app/admin/components/liveMap.jsx | 0 .../app/admin/components/teamSidePanel.jsx | 0 .../app/admin/components/teamViewer.jsx | 0 .../traque-front}/app/admin/layout.js | 0 .../traque-front}/app/admin/login/page.js | 0 .../traque-front}/app/admin/page.js | 0 .../components/circleZoneSelector.jsx | 0 .../admin/parameters/components/messages.jsx | 0 .../components/placementZoneSelector.jsx | 0 .../components/playingZoneSelector.jsx | 0 .../components/polygonZoneSelector.jsx | 0 .../parameters/components/teamManager.jsx | 0 .../app/admin/parameters/page.js | 0 .../traque-front}/app/favicon.ico | Bin .../traque-front}/app/globals.css | 0 .../traque-front}/app/layout.js | 0 .../traque-front}/components/input.jsx | 0 .../traque-front}/components/layer.jsx | 0 .../traque-front}/components/list.jsx | 0 .../traque-front}/components/map.jsx | 0 .../traque-front}/components/section.jsx | 0 .../context/adminConnexionContext.jsx | 0 .../traque-front}/context/adminContext.jsx | 0 .../traque-front}/context/socketContext.jsx | 0 .../traque-front}/hook/useAdmin.jsx | 0 .../traque-front}/hook/useCircleDraw.jsx | 0 .../traque-front}/hook/useLocalStorage.jsx | 0 .../traque-front}/hook/useLocalVariable.jsx | 0 .../hook/useMultipleCircleDraw.jsx | 0 .../traque-front}/hook/usePasswordProtect.jsx | 0 .../traque-front}/hook/usePolygonDraw.jsx | 0 .../traque-front}/hook/useSocketAuth.jsx | 0 .../traque-front}/hook/useSocketListener.jsx | 0 .../traque-front}/jsconfig.json | 0 .../traque-front}/next.config.mjs | 0 .../traque-front}/package.json | 0 .../traque-front}/postcss.config.js | 0 .../traque-front}/public/icons/arrow_up.png | Bin .../traque-front}/public/icons/arrows.png | Bin .../traque-front}/public/icons/backarrow.png | Bin .../public/icons/battery/black.png | Bin .../public/icons/battery/green.png | Bin .../public/icons/battery/red.png | Bin .../traque-front}/public/icons/begin.png | Bin .../traque-front}/public/icons/fullscreen.png | Bin .../traque-front}/public/icons/heart/grey.png | Bin .../public/icons/heart/heart.png | Bin .../traque-front}/public/icons/heart/pink.png | Bin .../traque-front}/public/icons/home.png | Bin .../public/icons/incertitude.png | Bin .../public/icons/informations.png | Bin .../public/icons/location/black.png | Bin .../public/icons/location/green.png | Bin .../public/icons/location/red.png | Bin .../traque-front}/public/icons/logout.png | Bin .../traque-front}/public/icons/mapstyle.png | Bin .../public/icons/marker/blue.png | Bin .../public/icons/marker/grey.png | Bin .../traque-front}/public/icons/marker/red.png | Bin .../traque-front}/public/icons/names.png | Bin .../traque-front}/public/icons/parameters.png | Bin .../traque-front}/public/icons/path.png | Bin .../traque-front}/public/icons/placement.png | Bin .../traque-front}/public/icons/play.png | Bin .../traque-front}/public/icons/reset.png | Bin .../traque-front}/public/icons/trash.png | Bin .../traque-front}/public/icons/user/black.png | Bin .../traque-front}/public/icons/user/green.png | Bin .../traque-front}/public/icons/user/red.png | Bin .../traque-front}/public/icons/zones.png | Bin .../public/images/logo_traque.png | Bin .../public/images/missing_image.jpg | Bin .../traque-front}/tailwind.config.js | 0 .../traque-front}/util/configurations.js | 0 .../traque-front}/util/functions.js | 0 .../traque-front}/util/types.js | 0 traque-app/doc/apk_android.md | 96 -------------- traque-app/doc/dev_build_android.md | 66 ---------- 188 files changed, 265 insertions(+), 301 deletions(-) create mode 100644 README.md delete mode 100755 build_push_images.sh delete mode 100644 doc/dev/TODO.md rename {doc/prod/informations => docs}/archives/la_traque_admin_2023.pdf (100%) rename {doc/prod => docs}/historique/traque_14_12_25/compte_rendu.txt (100%) rename {doc/prod => docs}/historique/traque_14_12_25/results.csv (100%) rename {doc/prod => docs}/historique/traque_14_12_25/trajectories/282845.txt (100%) rename {doc/prod => docs}/historique/traque_14_12_25/trajectories/423814.txt (100%) rename {doc/prod => docs}/historique/traque_14_12_25/trajectories/45186.txt (100%) rename {doc/prod => docs}/historique/traque_14_12_25/trajectories/504174.txt (100%) rename {doc/prod => docs}/historique/traque_14_12_25/trajectories/730100.txt (100%) rename {doc/prod => docs}/historique/traque_14_12_25/trajectories/773965.txt (100%) rename {doc/prod => docs}/historique/traque_20_09_25/compte_rendu.txt (100%) rename {doc/prod => docs}/historique/traque_20_09_25/results.csv (100%) rename {doc/prod => docs}/historique/traque_20_09_25/trajectories/104271.txt (100%) rename {doc/prod => docs}/historique/traque_20_09_25/trajectories/131645.txt (100%) rename {doc/prod => docs}/historique/traque_20_09_25/trajectories/187211.txt (100%) rename {doc/prod => docs}/historique/traque_20_09_25/trajectories/588238.txt (100%) rename {doc/prod => docs}/historique/traque_20_09_25/trajectories/72806.txt (100%) rename {doc/prod => docs}/historique/traque_20_09_25/trajectories/758930.txt (100%) rename {doc/prod => docs}/historique/traque_20_09_25/trajectories/841402.txt (100%) rename {doc/prod/informations => docs}/la_traque.pdf (100%) create mode 100644 mobile/docs/TODO.md create mode 100644 mobile/docs/setup.md rename {doc/dev/wireframes/app => mobile/docs/wireframes}/v1/page_fin.svg (100%) rename {doc/dev/wireframes/app => mobile/docs/wireframes}/v1/page_jeu.svg (100%) rename {doc/dev/wireframes/app => mobile/docs/wireframes}/v1/page_login.svg (100%) rename {doc/dev/wireframes/app => mobile/docs/wireframes}/v1/page_placement.svg (100%) rename {doc/dev/wireframes/app => mobile/docs/wireframes}/v2/page_jeu_info.svg (100%) rename {doc/dev/wireframes/app => mobile/docs/wireframes}/v2/page_jeu_map.svg (100%) rename {traque-app => mobile/traque-app}/app.json (100%) rename {traque-app => mobile/traque-app}/app/+not-found.js (100%) rename {traque-app => mobile/traque-app}/app/_layout.js (100%) rename {traque-app => mobile/traque-app}/app/display.js (100%) rename {traque-app => mobile/traque-app}/app/index.js (100%) rename {traque-app => mobile/traque-app}/assets/images/arrow.png (100%) rename {traque-app => mobile/traque-app}/assets/images/battery/black.png (100%) rename {traque-app => mobile/traque-app}/assets/images/battery/green.png (100%) rename {traque-app => mobile/traque-app}/assets/images/battery/red.png (100%) rename {traque-app => mobile/traque-app}/assets/images/centerMap.png (100%) rename {traque-app => mobile/traque-app}/assets/images/cogwheel.png (100%) rename {traque-app => mobile/traque-app}/assets/images/distance.png (100%) rename {traque-app => mobile/traque-app}/assets/images/localisation/black.png (100%) rename {traque-app => mobile/traque-app}/assets/images/localisation/green.png (100%) rename {traque-app => mobile/traque-app}/assets/images/localisation/red.png (100%) rename {traque-app => mobile/traque-app}/assets/images/logo/logo_traque.png (100%) rename {traque-app => mobile/traque-app}/assets/images/logout.png (100%) rename {traque-app => mobile/traque-app}/assets/images/marker/blue.png (100%) rename {traque-app => mobile/traque-app}/assets/images/marker/grey.png (100%) rename {traque-app => mobile/traque-app}/assets/images/marker/red.png (100%) rename {traque-app => mobile/traque-app}/assets/images/missing_image.jpg (100%) rename {traque-app => mobile/traque-app}/assets/images/observed.png (100%) rename {traque-app => mobile/traque-app}/assets/images/path.png (100%) rename {traque-app => mobile/traque-app}/assets/images/placement.png (100%) rename {traque-app => mobile/traque-app}/assets/images/running.jpg (100%) rename {traque-app => mobile/traque-app}/assets/images/running.png (100%) rename {traque-app => mobile/traque-app}/assets/images/target/black.png (100%) rename {traque-app => mobile/traque-app}/assets/images/target/white.png (100%) rename {traque-app => mobile/traque-app}/assets/images/time.png (100%) rename {traque-app => mobile/traque-app}/assets/images/update_position.png (100%) rename {traque-app => mobile/traque-app}/components/button.js (100%) rename {traque-app => mobile/traque-app}/components/image.js (100%) rename {traque-app => mobile/traque-app}/components/input.js (100%) rename {traque-app => mobile/traque-app}/components/stat.js (100%) rename {traque-app => mobile/traque-app}/context/socketContext.jsx (84%) rename {traque-app => mobile/traque-app}/context/teamConnexionContext.jsx (100%) rename {traque-app => mobile/traque-app}/context/teamContext.jsx (100%) rename {traque-app => mobile/traque-app}/hook/useGame.jsx (100%) rename {traque-app => mobile/traque-app}/hook/useLocalStorage.jsx (100%) rename {traque-app => mobile/traque-app}/hook/useLocation.jsx (100%) rename {traque-app => mobile/traque-app}/hook/usePickImage.jsx (100%) rename {traque-app => mobile/traque-app}/hook/useSendDeviceInfo.jsx (100%) rename {traque-app => mobile/traque-app}/hook/useSocketAuth.jsx (100%) rename {traque-app => mobile/traque-app}/hook/useSocketListener.jsx (100%) rename {traque-app => mobile/traque-app}/hook/useTimeDifference.jsx (100%) rename {traque-app => mobile/traque-app}/package-lock.json (100%) rename {traque-app => mobile/traque-app}/package.json (100%) rename {traque-app => mobile/traque-app}/util/gameState.js (100%) delete mode 100644 readme.md rename docker-compose.dev.yaml => server/docker-compose.dev.yaml (97%) rename docker-compose.yaml => server/docker-compose.yaml (96%) create mode 100644 server/docs/TODO.md create mode 100644 server/docs/setup.md rename {doc/dev/wireframes/siteweb => server/docs/wireframes}/main.svg (100%) rename {doc/dev/wireframes/siteweb => server/docs/wireframes}/parameters_placement.svg (100%) rename {doc/dev/wireframes/siteweb => server/docs/wireframes}/parameters_zone.svg (100%) rename {proxy => server/proxy}/Dockerfile (100%) rename {proxy => server/proxy}/nginx.conf (100%) create mode 100755 server/scripts/build_push_images.sh rename {traque-back => server/traque-back}/.dockerignore (100%) rename {traque-back => server/traque-back}/.gitignore (100%) rename {traque-back => server/traque-back}/Dockerfile (100%) rename {traque-back => server/traque-back}/Dockerfile.dev (100%) rename {traque-back => server/traque-back}/Makefile (100%) rename {traque-back => server/traque-back}/admin_socket.js (100%) rename {traque-back => server/traque-back}/game.js (100%) rename {traque-back => server/traque-back}/images/missing_image.jpg (100%) rename {traque-back => server/traque-back}/index.js (100%) rename {traque-back => server/traque-back}/package.json (100%) rename {traque-back => server/traque-back}/photo.js (100%) rename {traque-back => server/traque-back}/team_socket.js (100%) rename {traque-back => server/traque-back}/timeout_handler.js (100%) rename {traque-back => server/traque-back}/trajectory.js (100%) rename {traque-back => server/traque-back}/zone_manager.js (100%) rename {traque-front => server/traque-front}/.dockerignore (100%) rename {traque-front => server/traque-front}/.eslintrc.json (100%) rename {traque-front => server/traque-front}/.gitignore (100%) rename {traque-front => server/traque-front}/Dockerfile (100%) rename {traque-front => server/traque-front}/Dockerfile.dev (100%) rename {traque-front => server/traque-front}/app/admin/components/liveMap.jsx (100%) rename {traque-front => server/traque-front}/app/admin/components/teamSidePanel.jsx (100%) rename {traque-front => server/traque-front}/app/admin/components/teamViewer.jsx (100%) rename {traque-front => server/traque-front}/app/admin/layout.js (100%) rename {traque-front => server/traque-front}/app/admin/login/page.js (100%) rename {traque-front => server/traque-front}/app/admin/page.js (100%) rename {traque-front => server/traque-front}/app/admin/parameters/components/circleZoneSelector.jsx (100%) rename {traque-front => server/traque-front}/app/admin/parameters/components/messages.jsx (100%) rename {traque-front => server/traque-front}/app/admin/parameters/components/placementZoneSelector.jsx (100%) rename {traque-front => server/traque-front}/app/admin/parameters/components/playingZoneSelector.jsx (100%) rename {traque-front => server/traque-front}/app/admin/parameters/components/polygonZoneSelector.jsx (100%) rename {traque-front => server/traque-front}/app/admin/parameters/components/teamManager.jsx (100%) rename {traque-front => server/traque-front}/app/admin/parameters/page.js (100%) rename {traque-front => server/traque-front}/app/favicon.ico (100%) rename {traque-front => server/traque-front}/app/globals.css (100%) rename {traque-front => server/traque-front}/app/layout.js (100%) rename {traque-front => server/traque-front}/components/input.jsx (100%) rename {traque-front => server/traque-front}/components/layer.jsx (100%) rename {traque-front => server/traque-front}/components/list.jsx (100%) rename {traque-front => server/traque-front}/components/map.jsx (100%) rename {traque-front => server/traque-front}/components/section.jsx (100%) rename {traque-front => server/traque-front}/context/adminConnexionContext.jsx (100%) rename {traque-front => server/traque-front}/context/adminContext.jsx (100%) rename {traque-front => server/traque-front}/context/socketContext.jsx (100%) rename {traque-front => server/traque-front}/hook/useAdmin.jsx (100%) rename {traque-front => server/traque-front}/hook/useCircleDraw.jsx (100%) rename {traque-front => server/traque-front}/hook/useLocalStorage.jsx (100%) rename {traque-front => server/traque-front}/hook/useLocalVariable.jsx (100%) rename {traque-front => server/traque-front}/hook/useMultipleCircleDraw.jsx (100%) rename {traque-front => server/traque-front}/hook/usePasswordProtect.jsx (100%) rename {traque-front => server/traque-front}/hook/usePolygonDraw.jsx (100%) rename {traque-front => server/traque-front}/hook/useSocketAuth.jsx (100%) rename {traque-front => server/traque-front}/hook/useSocketListener.jsx (100%) rename {traque-front => server/traque-front}/jsconfig.json (100%) rename {traque-front => server/traque-front}/next.config.mjs (100%) rename {traque-front => server/traque-front}/package.json (100%) rename {traque-front => server/traque-front}/postcss.config.js (100%) rename {traque-front => server/traque-front}/public/icons/arrow_up.png (100%) rename {traque-front => server/traque-front}/public/icons/arrows.png (100%) rename {traque-front => server/traque-front}/public/icons/backarrow.png (100%) rename {traque-front => server/traque-front}/public/icons/battery/black.png (100%) rename {traque-front => server/traque-front}/public/icons/battery/green.png (100%) rename {traque-front => server/traque-front}/public/icons/battery/red.png (100%) rename {traque-front => server/traque-front}/public/icons/begin.png (100%) rename {traque-front => server/traque-front}/public/icons/fullscreen.png (100%) rename {traque-front => server/traque-front}/public/icons/heart/grey.png (100%) rename {traque-front => server/traque-front}/public/icons/heart/heart.png (100%) rename {traque-front => server/traque-front}/public/icons/heart/pink.png (100%) rename {traque-front => server/traque-front}/public/icons/home.png (100%) rename {traque-front => server/traque-front}/public/icons/incertitude.png (100%) rename {traque-front => server/traque-front}/public/icons/informations.png (100%) rename {traque-front => server/traque-front}/public/icons/location/black.png (100%) rename {traque-front => server/traque-front}/public/icons/location/green.png (100%) rename {traque-front => server/traque-front}/public/icons/location/red.png (100%) rename {traque-front => server/traque-front}/public/icons/logout.png (100%) rename {traque-front => server/traque-front}/public/icons/mapstyle.png (100%) rename {traque-front => server/traque-front}/public/icons/marker/blue.png (100%) rename {traque-front => server/traque-front}/public/icons/marker/grey.png (100%) rename {traque-front => server/traque-front}/public/icons/marker/red.png (100%) rename {traque-front => server/traque-front}/public/icons/names.png (100%) rename {traque-front => server/traque-front}/public/icons/parameters.png (100%) rename {traque-front => server/traque-front}/public/icons/path.png (100%) rename {traque-front => server/traque-front}/public/icons/placement.png (100%) rename {traque-front => server/traque-front}/public/icons/play.png (100%) rename {traque-front => server/traque-front}/public/icons/reset.png (100%) rename {traque-front => server/traque-front}/public/icons/trash.png (100%) rename {traque-front => server/traque-front}/public/icons/user/black.png (100%) rename {traque-front => server/traque-front}/public/icons/user/green.png (100%) rename {traque-front => server/traque-front}/public/icons/user/red.png (100%) rename {traque-front => server/traque-front}/public/icons/zones.png (100%) rename {traque-front => server/traque-front}/public/images/logo_traque.png (100%) rename {traque-front => server/traque-front}/public/images/missing_image.jpg (100%) rename {traque-front => server/traque-front}/tailwind.config.js (100%) rename {traque-front => server/traque-front}/util/configurations.js (100%) rename {traque-front => server/traque-front}/util/functions.js (100%) rename {traque-front => server/traque-front}/util/types.js (100%) delete mode 100644 traque-app/doc/apk_android.md delete mode 100644 traque-app/doc/dev_build_android.md diff --git a/.gitignore b/.gitignore index 890183c..d277a2b 100644 --- a/.gitignore +++ b/.gitignore @@ -136,3 +136,4 @@ ios/ yarn.lock keys/ temp.* +temp/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..18032e4 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +--- +lang: en-GB +--- + +# La Traque + +La Traque is an outdoor survival game where several teams, usually made up of three players, compete in a shrinking play zone until only two remain. Each team starts in a different location within the play zone. Once the game begins, each team must track and capture their target while being hunted by another team. Teams can obtain information about their target's location in exchange for revealing information about their own position. See `docs/la_traque.pdf` for the complete explaination. + +## Get started + +### Mobile + +If you want to work on the mobile application or create an apk of the application, please follow `mobile/docs/setup.md`. + +### Server + +If you want to work on the server and the website, or deploy the server, please follow `server/docs/setup.md`. + +## Authors + +- [Quentin Roussel](mailto:quentin.roussel11@gmail.com) +- Mathieu Oriol +- [Sébastien Rivière](mailto:sebriviere2004@gmail.com) diff --git a/build_push_images.sh b/build_push_images.sh deleted file mode 100755 index 3f39631..0000000 --- a/build_push_images.sh +++ /dev/null @@ -1,15 +0,0 @@ -#/bin/bash - -version="2.0.0" -repository="git.rezel.net/ludotech" - -docker build -t ${repository}/traque-proxy:latest -t ${repository}/traque-proxy:${version} proxy -docker build -t ${repository}/traque-front:latest -t ${repository}/traque-front:${version} traque-front -docker build -t ${repository}/traque-back:latest -t ${repository}/traque-back:${version} traque-back - -docker push ${repository}/traque-proxy:latest -docker push ${repository}/traque-proxy:${version} -docker push ${repository}/traque-front:latest -docker push ${repository}/traque-front:${version} -docker push ${repository}/traque-back:latest -docker push ${repository}/traque-back:${version} diff --git a/doc/dev/TODO.md b/doc/dev/TODO.md deleted file mode 100644 index 7e3eff2..0000000 --- a/doc/dev/TODO.md +++ /dev/null @@ -1,63 +0,0 @@ -# TODO - -## Général - -- [x] Tester avec 2+ équipes : vérifier que l'on voit la position des autres équipes et qu'on reçoit la leur quand on envoi notre position. - -## Team (Application) - -- [x] Rendre plus claire le code de capture dans l'interface utilisateur (bien préciser que c'est l'id de capture). -- [x] Ajouter timer du rétrécissement des zones. -- [x] Afficher dernière position envoyée par la team. -- [x] Rendre la position de l'ennemi visible dès le départ. -- [x] Préciser que l'équipe doit fournir une photo d'eux où l'on voit leur tête et au moins leur buste. -- [x] Utiliser les messages de victoire/défaite/etc définis par le serveur. -- [x] Centrer la map sur la position à l'ouverture + bouton centrage -- [x] Indiquer que l'équipe est hors zone. -- [x] Mettre les stats dans le tiroir (distance, temps, vitesse moy, nb captures, nb envoi) -- [ ] Implémenter des notifs lors du background (hors zone, position envoyée, update zone) -- [ ] Ajouter les logs de la partie -- [ ] Créer le menu paramètre (idées de section : langue, photo équipe, notifs, mode sombre, unitées) -- [ ] Afficher la trajectoire passée sur la carte (désactivable) -- [ ] Afficher les évènements passés sur la carte (captures, envois, départ) (désactivable) -- [ ] Permettre le changement du style de la carte (schéma, satellite, relief etc) -- [ ] Ajouter imprécision de la position au besoin (comme sur google maps) -- [ ] Synchroniser les horloges sur l'interface -- [ ] Avoir un récap des évènement de la partie -- [ ] Publier sur le playstore - -## Admin (Pageweb) - -- [x] Clarifier qui est qui sur l'interface. -- [x] Clarifier qui chasse qui sur l'interface. -- [x] Ajouter timer du rétrécissement des zones. -- [x] Pouvoir changer les paramètres du jeu pendant une partie. -- [x] Implémenter les wireframes -- [x] Ajouter une région par défaut si pas de position -- [x] Focus une team cliquée -- [x] Refaire les flèches de chasse sur la map -- [x] Pouvoir définir la zone de départ de chaque équipe -- [x] Nommer les polygons par des lettres de l'alphabet -- [x] Plein écran -- [ ] Pouvoir faire pause dans la partie -- [ ] Mettre en évidence le menu paramètre -- [ ] Afficher un feedback quand un paramètre est sauvegardé -- [ ] Améliorer le système de création zone (cercle et polygone) -- [ ] Voir les traces et évènements des teams -- [ ] Voir l'incertitude de position des teams -- [ ] Faire un menu quand on arrive sur la traque -- [ ] Pouvoir load des paramètres enregistrés -- [ ] Penser l'affichage en fin de traque - -## Améliorations du jeu de la traque - -- [x] Supprimer la pénalité de non envoi de position : envoyer la position automatiquement à la fin du timer. -- [x] Supprimer la pénalité d'hors zone : révéler la position de la team hors zone au bout d'un certain temps. -- [x] Changer le système de zone de jeu pour qu'il soit fait d'un pavage de zones qui se ferment successivement. - -## Autres idées - -- Améliorer l'accessibilité du site et de l'appli (traduction anglaise notamment). -- Nettoyer le code, le commenter, créer des tests, le rendre maintenable après la fin du projet. -- Améliorer l'UI admin. -- Améliorer l'UI team. diff --git a/doc/prod/informations/archives/la_traque_admin_2023.pdf b/docs/archives/la_traque_admin_2023.pdf similarity index 100% rename from doc/prod/informations/archives/la_traque_admin_2023.pdf rename to docs/archives/la_traque_admin_2023.pdf diff --git a/doc/prod/historique/traque_14_12_25/compte_rendu.txt b/docs/historique/traque_14_12_25/compte_rendu.txt similarity index 100% rename from doc/prod/historique/traque_14_12_25/compte_rendu.txt rename to docs/historique/traque_14_12_25/compte_rendu.txt diff --git a/doc/prod/historique/traque_14_12_25/results.csv b/docs/historique/traque_14_12_25/results.csv similarity index 100% rename from doc/prod/historique/traque_14_12_25/results.csv rename to docs/historique/traque_14_12_25/results.csv diff --git a/doc/prod/historique/traque_14_12_25/trajectories/282845.txt b/docs/historique/traque_14_12_25/trajectories/282845.txt similarity index 100% rename from doc/prod/historique/traque_14_12_25/trajectories/282845.txt rename to docs/historique/traque_14_12_25/trajectories/282845.txt diff --git a/doc/prod/historique/traque_14_12_25/trajectories/423814.txt b/docs/historique/traque_14_12_25/trajectories/423814.txt similarity index 100% rename from doc/prod/historique/traque_14_12_25/trajectories/423814.txt rename to docs/historique/traque_14_12_25/trajectories/423814.txt diff --git a/doc/prod/historique/traque_14_12_25/trajectories/45186.txt b/docs/historique/traque_14_12_25/trajectories/45186.txt similarity index 100% rename from doc/prod/historique/traque_14_12_25/trajectories/45186.txt rename to docs/historique/traque_14_12_25/trajectories/45186.txt diff --git a/doc/prod/historique/traque_14_12_25/trajectories/504174.txt b/docs/historique/traque_14_12_25/trajectories/504174.txt similarity index 100% rename from doc/prod/historique/traque_14_12_25/trajectories/504174.txt rename to docs/historique/traque_14_12_25/trajectories/504174.txt diff --git a/doc/prod/historique/traque_14_12_25/trajectories/730100.txt b/docs/historique/traque_14_12_25/trajectories/730100.txt similarity index 100% rename from doc/prod/historique/traque_14_12_25/trajectories/730100.txt rename to docs/historique/traque_14_12_25/trajectories/730100.txt diff --git a/doc/prod/historique/traque_14_12_25/trajectories/773965.txt b/docs/historique/traque_14_12_25/trajectories/773965.txt similarity index 100% rename from doc/prod/historique/traque_14_12_25/trajectories/773965.txt rename to docs/historique/traque_14_12_25/trajectories/773965.txt diff --git a/doc/prod/historique/traque_20_09_25/compte_rendu.txt b/docs/historique/traque_20_09_25/compte_rendu.txt similarity index 100% rename from doc/prod/historique/traque_20_09_25/compte_rendu.txt rename to docs/historique/traque_20_09_25/compte_rendu.txt diff --git a/doc/prod/historique/traque_20_09_25/results.csv b/docs/historique/traque_20_09_25/results.csv similarity index 100% rename from doc/prod/historique/traque_20_09_25/results.csv rename to docs/historique/traque_20_09_25/results.csv diff --git a/doc/prod/historique/traque_20_09_25/trajectories/104271.txt b/docs/historique/traque_20_09_25/trajectories/104271.txt similarity index 100% rename from doc/prod/historique/traque_20_09_25/trajectories/104271.txt rename to docs/historique/traque_20_09_25/trajectories/104271.txt diff --git a/doc/prod/historique/traque_20_09_25/trajectories/131645.txt b/docs/historique/traque_20_09_25/trajectories/131645.txt similarity index 100% rename from doc/prod/historique/traque_20_09_25/trajectories/131645.txt rename to docs/historique/traque_20_09_25/trajectories/131645.txt diff --git a/doc/prod/historique/traque_20_09_25/trajectories/187211.txt b/docs/historique/traque_20_09_25/trajectories/187211.txt similarity index 100% rename from doc/prod/historique/traque_20_09_25/trajectories/187211.txt rename to docs/historique/traque_20_09_25/trajectories/187211.txt diff --git a/doc/prod/historique/traque_20_09_25/trajectories/588238.txt b/docs/historique/traque_20_09_25/trajectories/588238.txt similarity index 100% rename from doc/prod/historique/traque_20_09_25/trajectories/588238.txt rename to docs/historique/traque_20_09_25/trajectories/588238.txt diff --git a/doc/prod/historique/traque_20_09_25/trajectories/72806.txt b/docs/historique/traque_20_09_25/trajectories/72806.txt similarity index 100% rename from doc/prod/historique/traque_20_09_25/trajectories/72806.txt rename to docs/historique/traque_20_09_25/trajectories/72806.txt diff --git a/doc/prod/historique/traque_20_09_25/trajectories/758930.txt b/docs/historique/traque_20_09_25/trajectories/758930.txt similarity index 100% rename from doc/prod/historique/traque_20_09_25/trajectories/758930.txt rename to docs/historique/traque_20_09_25/trajectories/758930.txt diff --git a/doc/prod/historique/traque_20_09_25/trajectories/841402.txt b/docs/historique/traque_20_09_25/trajectories/841402.txt similarity index 100% rename from doc/prod/historique/traque_20_09_25/trajectories/841402.txt rename to docs/historique/traque_20_09_25/trajectories/841402.txt diff --git a/doc/prod/informations/la_traque.pdf b/docs/la_traque.pdf similarity index 100% rename from doc/prod/informations/la_traque.pdf rename to docs/la_traque.pdf diff --git a/mobile/docs/TODO.md b/mobile/docs/TODO.md new file mode 100644 index 0000000..c830824 --- /dev/null +++ b/mobile/docs/TODO.md @@ -0,0 +1,28 @@ +# TODO + +## Tâches + +- [x] Rendre plus claire le code de capture dans l'interface utilisateur (bien préciser que c'est l'id de capture). +- [x] Ajouter timer du rétrécissement des zones. +- [x] Afficher dernière position envoyée par la team. +- [x] Rendre la position de l'ennemi visible dès le départ. +- [x] Préciser que l'équipe doit fournir une photo d'eux où l'on voit leur tête et au moins leur buste. +- [x] Utiliser les messages de victoire/défaite/etc définis par le serveur. +- [x] Centrer la map sur la position à l'ouverture + bouton centrage +- [x] Indiquer que l'équipe est hors zone. +- [x] Mettre les stats dans le tiroir (distance, temps, vitesse moy, nb captures, nb envoi) +- [ ] Implémenter des notifs lors du background (hors zone, position envoyée, update zone) +- [ ] Ajouter les logs de la partie +- [ ] Créer le menu paramètre (idées de section : langue, photo équipe, notifs, mode sombre, unitées) +- [ ] Afficher la trajectoire passée sur la carte (désactivable) +- [ ] Afficher les évènements passés sur la carte (captures, envois, départ) (désactivable) +- [ ] Permettre le changement du style de la carte (schéma, satellite, relief etc) +- [ ] Ajouter imprécision de la position au besoin (comme sur google maps) +- [ ] Synchroniser les horloges sur l'interface +- [ ] Avoir un récap des évènement de la partie +- [ ] Publier sur le playstore + +## Autres idées + +- Améliorer l'accessibilité (traduction anglaise notamment). +- Améliorer l'UI. diff --git a/mobile/docs/setup.md b/mobile/docs/setup.md new file mode 100644 index 0000000..6796c9c --- /dev/null +++ b/mobile/docs/setup.md @@ -0,0 +1,117 @@ +--- +lang: en-GB +--- + +# Set up mobile + +This tutorial will help you to set up your development environment, use a dev build and create an APK. + +## Table of Contents +* [Environment](#environment) : Dependencies, packages, app key and device +* [Dev build](#dev-build) : Create, install and use +* [APK](#apk) : Create and install + +## Environment + +### Installing dependencies and preparing the device + +You will need to install Android Studio, some SDKs and prepare your device if you want to use a physical one. Follow this [tutorial](https://reactnative.dev/docs/set-up-your-environment?os=linux&platform=android). + +Note : if you want to use a physical android device, you just have to follow the first part of the tutorial. You may also enable install via USB depending on your device. + +### Installing packages and create the android folder + +Go in the `traque-app` folder and run `npm i` to intall the packages of the project. + +Then run `npx expo prebuild --platform android` to create the android folder needed to create a dev build or an apk. + +In order to prevent an issue, go to the `android/build.gradle` file and replace the line `classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')` by `classpath('org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25')`. + +In order to be able to have a dev build and an apk on the same device, go to the `android/app/build.gradle` file and add : + +```txt +android { + ... + buildTypes { + debug { + ... + applicationIdSuffix ".debug" + versionNameSuffix "-debug" + } + ... + } + ... +} +``` + +### App key + +An app key is like a signature of the application and is required by google play store. Therefore, you can skip this part if you don't plan to publish your modifications on the Google Playstore. + +#### Create the app key + +An app cannot have more than one key associated to it. If a key have already been generated for this project, please contact the creator of the key and follow to the next section. + +Go in the `traque-app/android/app/` folder and run `keytool -genkey -v -keystore release.keystore -alias traque_key -keyalg RSA -keysize 2048 -validity 10000`. + +Note : `release` and `traque_key` can be modified if you want. + +#### Add the app key + +Put the `.keystore` file associated with your app into `traque-app/android/app/` and then modify the android bracket of the `traque-app/android/app/build.gradle` file as follows : + +```txt +android { + ... + signingConfigs { + ... + release { + storeFile file('TO_BE_FILLED.keystore') + storePassword 'TO_BE_FILLED' + keyAlias 'TO_BE_FILLED' + keyPassword 'TO_BE_FILLED' + } + } + buildTypes { + ... + release { + ... + signingConfig signingConfigs.release + } + } + ... +} +``` + +## Dev build + +A development build (or dev build) is an application that can be installed on you device, that connects to a development server and that allow you to see the modifications instantly. + +### Build and install the dev build + +Here you need to connect your device to your computer with a USB cable. + +Go in the `traque-app` folder and run `npx expo run:android` in order to build the app and send it on your device. + +### Use the dev build + +Here you can work over USB or over the wifi. + +Go in the `traque-app` folder and run `npm start` to start the development server. Verify that a blue *development build* appears in your terminal. Then scan the QR code that appears with your android device. + +Note : if the app crashes, you may need to restart the development server. + + +## APK + +An apk is an application that can be installed on an android device without the need of google play store. It is a definitive version of your application that can't be modified after being built. + +### Build the APK + +Go in the `traque-app/android/` folder and run `./gradlew assembleRelease`. At the end, the created apk will be located in the `app/build/outputs/apk/release/` folder. + +Note : if the build fail you may try to delete and recreate `node_modules/` or `android/`, you may also try to delete the `~/.gradle/caches/` folder. + +### Install the APK + +Simply share the APK with a drive and click on the APK file on your device to install it. diff --git a/doc/dev/wireframes/app/v1/page_fin.svg b/mobile/docs/wireframes/v1/page_fin.svg similarity index 100% rename from doc/dev/wireframes/app/v1/page_fin.svg rename to mobile/docs/wireframes/v1/page_fin.svg diff --git a/doc/dev/wireframes/app/v1/page_jeu.svg b/mobile/docs/wireframes/v1/page_jeu.svg similarity index 100% rename from doc/dev/wireframes/app/v1/page_jeu.svg rename to mobile/docs/wireframes/v1/page_jeu.svg diff --git a/doc/dev/wireframes/app/v1/page_login.svg b/mobile/docs/wireframes/v1/page_login.svg similarity index 100% rename from doc/dev/wireframes/app/v1/page_login.svg rename to mobile/docs/wireframes/v1/page_login.svg diff --git a/doc/dev/wireframes/app/v1/page_placement.svg b/mobile/docs/wireframes/v1/page_placement.svg similarity index 100% rename from doc/dev/wireframes/app/v1/page_placement.svg rename to mobile/docs/wireframes/v1/page_placement.svg diff --git a/doc/dev/wireframes/app/v2/page_jeu_info.svg b/mobile/docs/wireframes/v2/page_jeu_info.svg similarity index 100% rename from doc/dev/wireframes/app/v2/page_jeu_info.svg rename to mobile/docs/wireframes/v2/page_jeu_info.svg diff --git a/doc/dev/wireframes/app/v2/page_jeu_map.svg b/mobile/docs/wireframes/v2/page_jeu_map.svg similarity index 100% rename from doc/dev/wireframes/app/v2/page_jeu_map.svg rename to mobile/docs/wireframes/v2/page_jeu_map.svg diff --git a/traque-app/app.json b/mobile/traque-app/app.json similarity index 100% rename from traque-app/app.json rename to mobile/traque-app/app.json diff --git a/traque-app/app/+not-found.js b/mobile/traque-app/app/+not-found.js similarity index 100% rename from traque-app/app/+not-found.js rename to mobile/traque-app/app/+not-found.js diff --git a/traque-app/app/_layout.js b/mobile/traque-app/app/_layout.js similarity index 100% rename from traque-app/app/_layout.js rename to mobile/traque-app/app/_layout.js diff --git a/traque-app/app/display.js b/mobile/traque-app/app/display.js similarity index 100% rename from traque-app/app/display.js rename to mobile/traque-app/app/display.js diff --git a/traque-app/app/index.js b/mobile/traque-app/app/index.js similarity index 100% rename from traque-app/app/index.js rename to mobile/traque-app/app/index.js diff --git a/traque-app/assets/images/arrow.png b/mobile/traque-app/assets/images/arrow.png similarity index 100% rename from traque-app/assets/images/arrow.png rename to mobile/traque-app/assets/images/arrow.png diff --git a/traque-app/assets/images/battery/black.png b/mobile/traque-app/assets/images/battery/black.png similarity index 100% rename from traque-app/assets/images/battery/black.png rename to mobile/traque-app/assets/images/battery/black.png diff --git a/traque-app/assets/images/battery/green.png b/mobile/traque-app/assets/images/battery/green.png similarity index 100% rename from traque-app/assets/images/battery/green.png rename to mobile/traque-app/assets/images/battery/green.png diff --git a/traque-app/assets/images/battery/red.png b/mobile/traque-app/assets/images/battery/red.png similarity index 100% rename from traque-app/assets/images/battery/red.png rename to mobile/traque-app/assets/images/battery/red.png diff --git a/traque-app/assets/images/centerMap.png b/mobile/traque-app/assets/images/centerMap.png similarity index 100% rename from traque-app/assets/images/centerMap.png rename to mobile/traque-app/assets/images/centerMap.png diff --git a/traque-app/assets/images/cogwheel.png b/mobile/traque-app/assets/images/cogwheel.png similarity index 100% rename from traque-app/assets/images/cogwheel.png rename to mobile/traque-app/assets/images/cogwheel.png diff --git a/traque-app/assets/images/distance.png b/mobile/traque-app/assets/images/distance.png similarity index 100% rename from traque-app/assets/images/distance.png rename to mobile/traque-app/assets/images/distance.png diff --git a/traque-app/assets/images/localisation/black.png b/mobile/traque-app/assets/images/localisation/black.png similarity index 100% rename from traque-app/assets/images/localisation/black.png rename to mobile/traque-app/assets/images/localisation/black.png diff --git a/traque-app/assets/images/localisation/green.png b/mobile/traque-app/assets/images/localisation/green.png similarity index 100% rename from traque-app/assets/images/localisation/green.png rename to mobile/traque-app/assets/images/localisation/green.png diff --git a/traque-app/assets/images/localisation/red.png b/mobile/traque-app/assets/images/localisation/red.png similarity index 100% rename from traque-app/assets/images/localisation/red.png rename to mobile/traque-app/assets/images/localisation/red.png diff --git a/traque-app/assets/images/logo/logo_traque.png b/mobile/traque-app/assets/images/logo/logo_traque.png similarity index 100% rename from traque-app/assets/images/logo/logo_traque.png rename to mobile/traque-app/assets/images/logo/logo_traque.png diff --git a/traque-app/assets/images/logout.png b/mobile/traque-app/assets/images/logout.png similarity index 100% rename from traque-app/assets/images/logout.png rename to mobile/traque-app/assets/images/logout.png diff --git a/traque-app/assets/images/marker/blue.png b/mobile/traque-app/assets/images/marker/blue.png similarity index 100% rename from traque-app/assets/images/marker/blue.png rename to mobile/traque-app/assets/images/marker/blue.png diff --git a/traque-app/assets/images/marker/grey.png b/mobile/traque-app/assets/images/marker/grey.png similarity index 100% rename from traque-app/assets/images/marker/grey.png rename to mobile/traque-app/assets/images/marker/grey.png diff --git a/traque-app/assets/images/marker/red.png b/mobile/traque-app/assets/images/marker/red.png similarity index 100% rename from traque-app/assets/images/marker/red.png rename to mobile/traque-app/assets/images/marker/red.png diff --git a/traque-app/assets/images/missing_image.jpg b/mobile/traque-app/assets/images/missing_image.jpg similarity index 100% rename from traque-app/assets/images/missing_image.jpg rename to mobile/traque-app/assets/images/missing_image.jpg diff --git a/traque-app/assets/images/observed.png b/mobile/traque-app/assets/images/observed.png similarity index 100% rename from traque-app/assets/images/observed.png rename to mobile/traque-app/assets/images/observed.png diff --git a/traque-app/assets/images/path.png b/mobile/traque-app/assets/images/path.png similarity index 100% rename from traque-app/assets/images/path.png rename to mobile/traque-app/assets/images/path.png diff --git a/traque-app/assets/images/placement.png b/mobile/traque-app/assets/images/placement.png similarity index 100% rename from traque-app/assets/images/placement.png rename to mobile/traque-app/assets/images/placement.png diff --git a/traque-app/assets/images/running.jpg b/mobile/traque-app/assets/images/running.jpg similarity index 100% rename from traque-app/assets/images/running.jpg rename to mobile/traque-app/assets/images/running.jpg diff --git a/traque-app/assets/images/running.png b/mobile/traque-app/assets/images/running.png similarity index 100% rename from traque-app/assets/images/running.png rename to mobile/traque-app/assets/images/running.png diff --git a/traque-app/assets/images/target/black.png b/mobile/traque-app/assets/images/target/black.png similarity index 100% rename from traque-app/assets/images/target/black.png rename to mobile/traque-app/assets/images/target/black.png diff --git a/traque-app/assets/images/target/white.png b/mobile/traque-app/assets/images/target/white.png similarity index 100% rename from traque-app/assets/images/target/white.png rename to mobile/traque-app/assets/images/target/white.png diff --git a/traque-app/assets/images/time.png b/mobile/traque-app/assets/images/time.png similarity index 100% rename from traque-app/assets/images/time.png rename to mobile/traque-app/assets/images/time.png diff --git a/traque-app/assets/images/update_position.png b/mobile/traque-app/assets/images/update_position.png similarity index 100% rename from traque-app/assets/images/update_position.png rename to mobile/traque-app/assets/images/update_position.png diff --git a/traque-app/components/button.js b/mobile/traque-app/components/button.js similarity index 100% rename from traque-app/components/button.js rename to mobile/traque-app/components/button.js diff --git a/traque-app/components/image.js b/mobile/traque-app/components/image.js similarity index 100% rename from traque-app/components/image.js rename to mobile/traque-app/components/image.js diff --git a/traque-app/components/input.js b/mobile/traque-app/components/input.js similarity index 100% rename from traque-app/components/input.js rename to mobile/traque-app/components/input.js diff --git a/traque-app/components/stat.js b/mobile/traque-app/components/stat.js similarity index 100% rename from traque-app/components/stat.js rename to mobile/traque-app/components/stat.js diff --git a/traque-app/context/socketContext.jsx b/mobile/traque-app/context/socketContext.jsx similarity index 84% rename from traque-app/context/socketContext.jsx rename to mobile/traque-app/context/socketContext.jsx index ebd3899..88d2749 100644 --- a/traque-app/context/socketContext.jsx +++ b/mobile/traque-app/context/socketContext.jsx @@ -1,8 +1,8 @@ import { createContext, useContext, useMemo } from "react"; import { io } from "socket.io-client"; -const SOCKET_URL = `ws://172.16.1.180/player`; -const SERVER_URL = `http://172.16.1.180/back`; +const SOCKET_URL = `ws://0.0.0.0/player`; +const SERVER_URL = `http://0.0.0.0/back`; export const teamSocket = io(SOCKET_URL, { path: "/back/socket.io", diff --git a/traque-app/context/teamConnexionContext.jsx b/mobile/traque-app/context/teamConnexionContext.jsx similarity index 100% rename from traque-app/context/teamConnexionContext.jsx rename to mobile/traque-app/context/teamConnexionContext.jsx diff --git a/traque-app/context/teamContext.jsx b/mobile/traque-app/context/teamContext.jsx similarity index 100% rename from traque-app/context/teamContext.jsx rename to mobile/traque-app/context/teamContext.jsx diff --git a/traque-app/hook/useGame.jsx b/mobile/traque-app/hook/useGame.jsx similarity index 100% rename from traque-app/hook/useGame.jsx rename to mobile/traque-app/hook/useGame.jsx diff --git a/traque-app/hook/useLocalStorage.jsx b/mobile/traque-app/hook/useLocalStorage.jsx similarity index 100% rename from traque-app/hook/useLocalStorage.jsx rename to mobile/traque-app/hook/useLocalStorage.jsx diff --git a/traque-app/hook/useLocation.jsx b/mobile/traque-app/hook/useLocation.jsx similarity index 100% rename from traque-app/hook/useLocation.jsx rename to mobile/traque-app/hook/useLocation.jsx diff --git a/traque-app/hook/usePickImage.jsx b/mobile/traque-app/hook/usePickImage.jsx similarity index 100% rename from traque-app/hook/usePickImage.jsx rename to mobile/traque-app/hook/usePickImage.jsx diff --git a/traque-app/hook/useSendDeviceInfo.jsx b/mobile/traque-app/hook/useSendDeviceInfo.jsx similarity index 100% rename from traque-app/hook/useSendDeviceInfo.jsx rename to mobile/traque-app/hook/useSendDeviceInfo.jsx diff --git a/traque-app/hook/useSocketAuth.jsx b/mobile/traque-app/hook/useSocketAuth.jsx similarity index 100% rename from traque-app/hook/useSocketAuth.jsx rename to mobile/traque-app/hook/useSocketAuth.jsx diff --git a/traque-app/hook/useSocketListener.jsx b/mobile/traque-app/hook/useSocketListener.jsx similarity index 100% rename from traque-app/hook/useSocketListener.jsx rename to mobile/traque-app/hook/useSocketListener.jsx diff --git a/traque-app/hook/useTimeDifference.jsx b/mobile/traque-app/hook/useTimeDifference.jsx similarity index 100% rename from traque-app/hook/useTimeDifference.jsx rename to mobile/traque-app/hook/useTimeDifference.jsx diff --git a/traque-app/package-lock.json b/mobile/traque-app/package-lock.json similarity index 100% rename from traque-app/package-lock.json rename to mobile/traque-app/package-lock.json diff --git a/traque-app/package.json b/mobile/traque-app/package.json similarity index 100% rename from traque-app/package.json rename to mobile/traque-app/package.json diff --git a/traque-app/util/gameState.js b/mobile/traque-app/util/gameState.js similarity index 100% rename from traque-app/util/gameState.js rename to mobile/traque-app/util/gameState.js diff --git a/readme.md b/readme.md deleted file mode 100644 index f403bf8..0000000 --- a/readme.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -lang: en-GB ---- - -# La Traque - -La Traque is an outdoor survival game where several teams, usually made up of three players, compete in a shrinking play zone until only two remain. Each team starts in a different location within the play zone. Once the game begins, each team must track and capture their target while being hunted by another team. Teams can obtain information about their target's location in exchange for revealing information about their own position. See the documentation for the complete explaination. - -The next sections will help you to set up your environment in order to develop on the project or deploy it. - -## Development - -This section will cover how to set up the server, the website and the app in development mode so the changes made in the project take effect immediately. - -### Server and website - -The server and the website use Docker. When the containers are up, you can access the website by searching for localhost on the web. - -Main commands : - -- Create the containers : `docker compose -f docker-compose.dev.yaml up` -- Remove the containers : `docker compose down` - -Other commands : - -- Add the `-d` flag to create the containers in the background -- Stop the running containers : `docker compose stop` -- Start the stopped containers : `docker compose start` -- See all containers : `docker ps -a` -- See all images : `docker images` -- Remove an image : `docker rmi IMAGE_ID` - -### Android app - -- Follow the `traque-app/doc/dev_build_android.md` tutorial to set up your environment and start the development server. - -## Deployment - -This section will cover how to deploy the server and the website on a rezel virtual machine, and how to create an apk of the Android app. - -### Server and website - -- On git.rezel.net create an access token for your account allowing in writing package, repository and user. Save the token password. -- On your machine run `docker login git.rezel.net` and connect with your token password. -- On your machine run `./build_push_images.sh` to build and push the latest images on the remote. -- Connect to the local network of Telecom Paris, then connect to the virtual machine by running `ssh admin@2a09:6847:fa10:1410::207`. Make sure your ssh key is in the `.ssh/authorized_keys` file of the virtual machine. -- Finally create the containers by running `docker compose -f docker-compose.dev.yaml up -d` - -### Android app - -- Follow the `traque-app/doc/apk_android.md` tutorial to create an apk of the Android app. - -## Authors - -- [Quentin Roussel](mailto:quentin.roussel11@gmail.com) (initial version) -- Mathieu Oriol -- [Sébastien Rivière](mailto:sebriviere2004@gmail.com) diff --git a/docker-compose.dev.yaml b/server/docker-compose.dev.yaml similarity index 97% rename from docker-compose.dev.yaml rename to server/docker-compose.dev.yaml index d381c20..0366d45 100644 --- a/docker-compose.dev.yaml +++ b/server/docker-compose.dev.yaml @@ -1,5 +1,5 @@ services: - reverse_proxy: + proxy: build: ./proxy restart: always ports: diff --git a/docker-compose.yaml b/server/docker-compose.yaml similarity index 96% rename from docker-compose.yaml rename to server/docker-compose.yaml index 61b2d98..8b7f701 100644 --- a/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -1,5 +1,5 @@ services: - reverse_proxy: + proxy: image: git.rezel.net/ludotech/traque-proxy:latest ports: - "80:80" diff --git a/server/docs/TODO.md b/server/docs/TODO.md new file mode 100644 index 0000000..c4b1047 --- /dev/null +++ b/server/docs/TODO.md @@ -0,0 +1,29 @@ +# TODO + +## Tâches + +- [x] Clarifier qui est qui sur l'interface. +- [x] Clarifier qui chasse qui sur l'interface. +- [x] Ajouter timer du rétrécissement des zones. +- [x] Pouvoir changer les paramètres du jeu pendant une partie. +- [x] Implémenter les wireframes +- [x] Ajouter une région par défaut si pas de position +- [x] Focus une team cliquée +- [x] Refaire les flèches de chasse sur la map +- [x] Pouvoir définir la zone de départ de chaque équipe +- [x] Nommer les polygons par des lettres de l'alphabet +- [x] Plein écran +- [ ] Pouvoir faire pause dans la partie +- [ ] Mettre en évidence le menu paramètre +- [ ] Afficher un feedback quand un paramètre est sauvegardé +- [ ] Améliorer le système de création zone (cercle et polygone) +- [ ] Voir les traces et évènements des teams +- [ ] Voir l'incertitude de position des teams +- [ ] Faire un menu quand on arrive sur la traque +- [ ] Pouvoir load des paramètres enregistrés +- [ ] Penser l'affichage en fin de traque + +## Autres idées + +- Améliorer l'accessibilité (traduction anglaise notamment). +- Améliorer l'UI. diff --git a/server/docs/setup.md b/server/docs/setup.md new file mode 100644 index 0000000..6de1efe --- /dev/null +++ b/server/docs/setup.md @@ -0,0 +1,46 @@ +--- +lang: en-GB +--- + +# Set up server + +This tutorial will help you to start the servers for development or for production. + +## Table of Contents +* [Docker](#docker) : Explaination and commands +* [Start server](#start-server) : Development and deployment + +## Docker + +The server and the website use Docker. When the containers are up, you can access the website by searching for localhost on the web. + +Useful docker commands : + +- Create the containers : `docker compose -f {your-file.yaml} up` +- Remove the containers : `docker compose down` +- Add the `-d` flag to create the containers in the background +- Stop the running containers : `docker compose stop` +- Start the stopped containers : `docker compose start` +- See all containers : `docker ps -a` +- See all images : `docker images` +- Remove an image : `docker rmi IMAGE_ID` + +## Start server + +### Development + +Use `docker compose -f docker-compose.dev.yaml up` to start the containers of the server in development mode so the changes made in the project take effect immediately. You can access the website by searching for `localhost` in your browser. + +### Deployment + +#### Update the server + +To update the server, you have to build the images of the containers on your computer and then push them on the docker of `git.rezel.net`. If it isn't the case, you have to login to the docker of git.rezel.net. To do that, go on `git.rezel.net` and create an access token for your account allowing writing package, repository and user, and save the token password. Then on your machine run `docker login git.rezel.net` and connect with your token password. Now, you can build and push the latest images on the remote by running `./scripts/build_push_images.sh`. + +#### Access the LXC container + +The server run on a rezel LXC container you can access [here](https://hosting.rezel.net/vms). Ask persmissions to an admin of the container to be able to connect to it via ssh : `ssh admin@2a09:6847:fa10:1410::207`. + +#### Start the server + +Run `docker compose -f docker-compose.yaml up -d` on the LXC container to start the containers. The website will be accesible on `traque.rezel.net`. diff --git a/doc/dev/wireframes/siteweb/main.svg b/server/docs/wireframes/main.svg similarity index 100% rename from doc/dev/wireframes/siteweb/main.svg rename to server/docs/wireframes/main.svg diff --git a/doc/dev/wireframes/siteweb/parameters_placement.svg b/server/docs/wireframes/parameters_placement.svg similarity index 100% rename from doc/dev/wireframes/siteweb/parameters_placement.svg rename to server/docs/wireframes/parameters_placement.svg diff --git a/doc/dev/wireframes/siteweb/parameters_zone.svg b/server/docs/wireframes/parameters_zone.svg similarity index 100% rename from doc/dev/wireframes/siteweb/parameters_zone.svg rename to server/docs/wireframes/parameters_zone.svg diff --git a/proxy/Dockerfile b/server/proxy/Dockerfile similarity index 100% rename from proxy/Dockerfile rename to server/proxy/Dockerfile diff --git a/proxy/nginx.conf b/server/proxy/nginx.conf similarity index 100% rename from proxy/nginx.conf rename to server/proxy/nginx.conf diff --git a/server/scripts/build_push_images.sh b/server/scripts/build_push_images.sh new file mode 100755 index 0000000..d5fd7e4 --- /dev/null +++ b/server/scripts/build_push_images.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +version="2.0.0" +repo="git.rezel.net/ludotech" +services=("proxy:traque-proxy" "traque-front:traque-front" "traque-back:traque-back") + +for service in "${services[@]}"; do + path="${service%%:*}" + name="${service##*:}" + tag_latest="${repo}/${name}:latest" + tag_version="${repo}/${name}:${version}" + + echo "--- Building & Pushing $name ---" + docker build -t "$tag_latest" -t "$tag_version" "$path" + docker push "$tag_latest" + docker push "$tag_version" +done diff --git a/traque-back/.dockerignore b/server/traque-back/.dockerignore similarity index 100% rename from traque-back/.dockerignore rename to server/traque-back/.dockerignore diff --git a/traque-back/.gitignore b/server/traque-back/.gitignore similarity index 100% rename from traque-back/.gitignore rename to server/traque-back/.gitignore diff --git a/traque-back/Dockerfile b/server/traque-back/Dockerfile similarity index 100% rename from traque-back/Dockerfile rename to server/traque-back/Dockerfile diff --git a/traque-back/Dockerfile.dev b/server/traque-back/Dockerfile.dev similarity index 100% rename from traque-back/Dockerfile.dev rename to server/traque-back/Dockerfile.dev diff --git a/traque-back/Makefile b/server/traque-back/Makefile similarity index 100% rename from traque-back/Makefile rename to server/traque-back/Makefile diff --git a/traque-back/admin_socket.js b/server/traque-back/admin_socket.js similarity index 100% rename from traque-back/admin_socket.js rename to server/traque-back/admin_socket.js diff --git a/traque-back/game.js b/server/traque-back/game.js similarity index 100% rename from traque-back/game.js rename to server/traque-back/game.js diff --git a/traque-back/images/missing_image.jpg b/server/traque-back/images/missing_image.jpg similarity index 100% rename from traque-back/images/missing_image.jpg rename to server/traque-back/images/missing_image.jpg diff --git a/traque-back/index.js b/server/traque-back/index.js similarity index 100% rename from traque-back/index.js rename to server/traque-back/index.js diff --git a/traque-back/package.json b/server/traque-back/package.json similarity index 100% rename from traque-back/package.json rename to server/traque-back/package.json diff --git a/traque-back/photo.js b/server/traque-back/photo.js similarity index 100% rename from traque-back/photo.js rename to server/traque-back/photo.js diff --git a/traque-back/team_socket.js b/server/traque-back/team_socket.js similarity index 100% rename from traque-back/team_socket.js rename to server/traque-back/team_socket.js diff --git a/traque-back/timeout_handler.js b/server/traque-back/timeout_handler.js similarity index 100% rename from traque-back/timeout_handler.js rename to server/traque-back/timeout_handler.js diff --git a/traque-back/trajectory.js b/server/traque-back/trajectory.js similarity index 100% rename from traque-back/trajectory.js rename to server/traque-back/trajectory.js diff --git a/traque-back/zone_manager.js b/server/traque-back/zone_manager.js similarity index 100% rename from traque-back/zone_manager.js rename to server/traque-back/zone_manager.js diff --git a/traque-front/.dockerignore b/server/traque-front/.dockerignore similarity index 100% rename from traque-front/.dockerignore rename to server/traque-front/.dockerignore diff --git a/traque-front/.eslintrc.json b/server/traque-front/.eslintrc.json similarity index 100% rename from traque-front/.eslintrc.json rename to server/traque-front/.eslintrc.json diff --git a/traque-front/.gitignore b/server/traque-front/.gitignore similarity index 100% rename from traque-front/.gitignore rename to server/traque-front/.gitignore diff --git a/traque-front/Dockerfile b/server/traque-front/Dockerfile similarity index 100% rename from traque-front/Dockerfile rename to server/traque-front/Dockerfile diff --git a/traque-front/Dockerfile.dev b/server/traque-front/Dockerfile.dev similarity index 100% rename from traque-front/Dockerfile.dev rename to server/traque-front/Dockerfile.dev diff --git a/traque-front/app/admin/components/liveMap.jsx b/server/traque-front/app/admin/components/liveMap.jsx similarity index 100% rename from traque-front/app/admin/components/liveMap.jsx rename to server/traque-front/app/admin/components/liveMap.jsx diff --git a/traque-front/app/admin/components/teamSidePanel.jsx b/server/traque-front/app/admin/components/teamSidePanel.jsx similarity index 100% rename from traque-front/app/admin/components/teamSidePanel.jsx rename to server/traque-front/app/admin/components/teamSidePanel.jsx diff --git a/traque-front/app/admin/components/teamViewer.jsx b/server/traque-front/app/admin/components/teamViewer.jsx similarity index 100% rename from traque-front/app/admin/components/teamViewer.jsx rename to server/traque-front/app/admin/components/teamViewer.jsx diff --git a/traque-front/app/admin/layout.js b/server/traque-front/app/admin/layout.js similarity index 100% rename from traque-front/app/admin/layout.js rename to server/traque-front/app/admin/layout.js diff --git a/traque-front/app/admin/login/page.js b/server/traque-front/app/admin/login/page.js similarity index 100% rename from traque-front/app/admin/login/page.js rename to server/traque-front/app/admin/login/page.js diff --git a/traque-front/app/admin/page.js b/server/traque-front/app/admin/page.js similarity index 100% rename from traque-front/app/admin/page.js rename to server/traque-front/app/admin/page.js diff --git a/traque-front/app/admin/parameters/components/circleZoneSelector.jsx b/server/traque-front/app/admin/parameters/components/circleZoneSelector.jsx similarity index 100% rename from traque-front/app/admin/parameters/components/circleZoneSelector.jsx rename to server/traque-front/app/admin/parameters/components/circleZoneSelector.jsx diff --git a/traque-front/app/admin/parameters/components/messages.jsx b/server/traque-front/app/admin/parameters/components/messages.jsx similarity index 100% rename from traque-front/app/admin/parameters/components/messages.jsx rename to server/traque-front/app/admin/parameters/components/messages.jsx diff --git a/traque-front/app/admin/parameters/components/placementZoneSelector.jsx b/server/traque-front/app/admin/parameters/components/placementZoneSelector.jsx similarity index 100% rename from traque-front/app/admin/parameters/components/placementZoneSelector.jsx rename to server/traque-front/app/admin/parameters/components/placementZoneSelector.jsx diff --git a/traque-front/app/admin/parameters/components/playingZoneSelector.jsx b/server/traque-front/app/admin/parameters/components/playingZoneSelector.jsx similarity index 100% rename from traque-front/app/admin/parameters/components/playingZoneSelector.jsx rename to server/traque-front/app/admin/parameters/components/playingZoneSelector.jsx diff --git a/traque-front/app/admin/parameters/components/polygonZoneSelector.jsx b/server/traque-front/app/admin/parameters/components/polygonZoneSelector.jsx similarity index 100% rename from traque-front/app/admin/parameters/components/polygonZoneSelector.jsx rename to server/traque-front/app/admin/parameters/components/polygonZoneSelector.jsx diff --git a/traque-front/app/admin/parameters/components/teamManager.jsx b/server/traque-front/app/admin/parameters/components/teamManager.jsx similarity index 100% rename from traque-front/app/admin/parameters/components/teamManager.jsx rename to server/traque-front/app/admin/parameters/components/teamManager.jsx diff --git a/traque-front/app/admin/parameters/page.js b/server/traque-front/app/admin/parameters/page.js similarity index 100% rename from traque-front/app/admin/parameters/page.js rename to server/traque-front/app/admin/parameters/page.js diff --git a/traque-front/app/favicon.ico b/server/traque-front/app/favicon.ico similarity index 100% rename from traque-front/app/favicon.ico rename to server/traque-front/app/favicon.ico diff --git a/traque-front/app/globals.css b/server/traque-front/app/globals.css similarity index 100% rename from traque-front/app/globals.css rename to server/traque-front/app/globals.css diff --git a/traque-front/app/layout.js b/server/traque-front/app/layout.js similarity index 100% rename from traque-front/app/layout.js rename to server/traque-front/app/layout.js diff --git a/traque-front/components/input.jsx b/server/traque-front/components/input.jsx similarity index 100% rename from traque-front/components/input.jsx rename to server/traque-front/components/input.jsx diff --git a/traque-front/components/layer.jsx b/server/traque-front/components/layer.jsx similarity index 100% rename from traque-front/components/layer.jsx rename to server/traque-front/components/layer.jsx diff --git a/traque-front/components/list.jsx b/server/traque-front/components/list.jsx similarity index 100% rename from traque-front/components/list.jsx rename to server/traque-front/components/list.jsx diff --git a/traque-front/components/map.jsx b/server/traque-front/components/map.jsx similarity index 100% rename from traque-front/components/map.jsx rename to server/traque-front/components/map.jsx diff --git a/traque-front/components/section.jsx b/server/traque-front/components/section.jsx similarity index 100% rename from traque-front/components/section.jsx rename to server/traque-front/components/section.jsx diff --git a/traque-front/context/adminConnexionContext.jsx b/server/traque-front/context/adminConnexionContext.jsx similarity index 100% rename from traque-front/context/adminConnexionContext.jsx rename to server/traque-front/context/adminConnexionContext.jsx diff --git a/traque-front/context/adminContext.jsx b/server/traque-front/context/adminContext.jsx similarity index 100% rename from traque-front/context/adminContext.jsx rename to server/traque-front/context/adminContext.jsx diff --git a/traque-front/context/socketContext.jsx b/server/traque-front/context/socketContext.jsx similarity index 100% rename from traque-front/context/socketContext.jsx rename to server/traque-front/context/socketContext.jsx diff --git a/traque-front/hook/useAdmin.jsx b/server/traque-front/hook/useAdmin.jsx similarity index 100% rename from traque-front/hook/useAdmin.jsx rename to server/traque-front/hook/useAdmin.jsx diff --git a/traque-front/hook/useCircleDraw.jsx b/server/traque-front/hook/useCircleDraw.jsx similarity index 100% rename from traque-front/hook/useCircleDraw.jsx rename to server/traque-front/hook/useCircleDraw.jsx diff --git a/traque-front/hook/useLocalStorage.jsx b/server/traque-front/hook/useLocalStorage.jsx similarity index 100% rename from traque-front/hook/useLocalStorage.jsx rename to server/traque-front/hook/useLocalStorage.jsx diff --git a/traque-front/hook/useLocalVariable.jsx b/server/traque-front/hook/useLocalVariable.jsx similarity index 100% rename from traque-front/hook/useLocalVariable.jsx rename to server/traque-front/hook/useLocalVariable.jsx diff --git a/traque-front/hook/useMultipleCircleDraw.jsx b/server/traque-front/hook/useMultipleCircleDraw.jsx similarity index 100% rename from traque-front/hook/useMultipleCircleDraw.jsx rename to server/traque-front/hook/useMultipleCircleDraw.jsx diff --git a/traque-front/hook/usePasswordProtect.jsx b/server/traque-front/hook/usePasswordProtect.jsx similarity index 100% rename from traque-front/hook/usePasswordProtect.jsx rename to server/traque-front/hook/usePasswordProtect.jsx diff --git a/traque-front/hook/usePolygonDraw.jsx b/server/traque-front/hook/usePolygonDraw.jsx similarity index 100% rename from traque-front/hook/usePolygonDraw.jsx rename to server/traque-front/hook/usePolygonDraw.jsx diff --git a/traque-front/hook/useSocketAuth.jsx b/server/traque-front/hook/useSocketAuth.jsx similarity index 100% rename from traque-front/hook/useSocketAuth.jsx rename to server/traque-front/hook/useSocketAuth.jsx diff --git a/traque-front/hook/useSocketListener.jsx b/server/traque-front/hook/useSocketListener.jsx similarity index 100% rename from traque-front/hook/useSocketListener.jsx rename to server/traque-front/hook/useSocketListener.jsx diff --git a/traque-front/jsconfig.json b/server/traque-front/jsconfig.json similarity index 100% rename from traque-front/jsconfig.json rename to server/traque-front/jsconfig.json diff --git a/traque-front/next.config.mjs b/server/traque-front/next.config.mjs similarity index 100% rename from traque-front/next.config.mjs rename to server/traque-front/next.config.mjs diff --git a/traque-front/package.json b/server/traque-front/package.json similarity index 100% rename from traque-front/package.json rename to server/traque-front/package.json diff --git a/traque-front/postcss.config.js b/server/traque-front/postcss.config.js similarity index 100% rename from traque-front/postcss.config.js rename to server/traque-front/postcss.config.js diff --git a/traque-front/public/icons/arrow_up.png b/server/traque-front/public/icons/arrow_up.png similarity index 100% rename from traque-front/public/icons/arrow_up.png rename to server/traque-front/public/icons/arrow_up.png diff --git a/traque-front/public/icons/arrows.png b/server/traque-front/public/icons/arrows.png similarity index 100% rename from traque-front/public/icons/arrows.png rename to server/traque-front/public/icons/arrows.png diff --git a/traque-front/public/icons/backarrow.png b/server/traque-front/public/icons/backarrow.png similarity index 100% rename from traque-front/public/icons/backarrow.png rename to server/traque-front/public/icons/backarrow.png diff --git a/traque-front/public/icons/battery/black.png b/server/traque-front/public/icons/battery/black.png similarity index 100% rename from traque-front/public/icons/battery/black.png rename to server/traque-front/public/icons/battery/black.png diff --git a/traque-front/public/icons/battery/green.png b/server/traque-front/public/icons/battery/green.png similarity index 100% rename from traque-front/public/icons/battery/green.png rename to server/traque-front/public/icons/battery/green.png diff --git a/traque-front/public/icons/battery/red.png b/server/traque-front/public/icons/battery/red.png similarity index 100% rename from traque-front/public/icons/battery/red.png rename to server/traque-front/public/icons/battery/red.png diff --git a/traque-front/public/icons/begin.png b/server/traque-front/public/icons/begin.png similarity index 100% rename from traque-front/public/icons/begin.png rename to server/traque-front/public/icons/begin.png diff --git a/traque-front/public/icons/fullscreen.png b/server/traque-front/public/icons/fullscreen.png similarity index 100% rename from traque-front/public/icons/fullscreen.png rename to server/traque-front/public/icons/fullscreen.png diff --git a/traque-front/public/icons/heart/grey.png b/server/traque-front/public/icons/heart/grey.png similarity index 100% rename from traque-front/public/icons/heart/grey.png rename to server/traque-front/public/icons/heart/grey.png diff --git a/traque-front/public/icons/heart/heart.png b/server/traque-front/public/icons/heart/heart.png similarity index 100% rename from traque-front/public/icons/heart/heart.png rename to server/traque-front/public/icons/heart/heart.png diff --git a/traque-front/public/icons/heart/pink.png b/server/traque-front/public/icons/heart/pink.png similarity index 100% rename from traque-front/public/icons/heart/pink.png rename to server/traque-front/public/icons/heart/pink.png diff --git a/traque-front/public/icons/home.png b/server/traque-front/public/icons/home.png similarity index 100% rename from traque-front/public/icons/home.png rename to server/traque-front/public/icons/home.png diff --git a/traque-front/public/icons/incertitude.png b/server/traque-front/public/icons/incertitude.png similarity index 100% rename from traque-front/public/icons/incertitude.png rename to server/traque-front/public/icons/incertitude.png diff --git a/traque-front/public/icons/informations.png b/server/traque-front/public/icons/informations.png similarity index 100% rename from traque-front/public/icons/informations.png rename to server/traque-front/public/icons/informations.png diff --git a/traque-front/public/icons/location/black.png b/server/traque-front/public/icons/location/black.png similarity index 100% rename from traque-front/public/icons/location/black.png rename to server/traque-front/public/icons/location/black.png diff --git a/traque-front/public/icons/location/green.png b/server/traque-front/public/icons/location/green.png similarity index 100% rename from traque-front/public/icons/location/green.png rename to server/traque-front/public/icons/location/green.png diff --git a/traque-front/public/icons/location/red.png b/server/traque-front/public/icons/location/red.png similarity index 100% rename from traque-front/public/icons/location/red.png rename to server/traque-front/public/icons/location/red.png diff --git a/traque-front/public/icons/logout.png b/server/traque-front/public/icons/logout.png similarity index 100% rename from traque-front/public/icons/logout.png rename to server/traque-front/public/icons/logout.png diff --git a/traque-front/public/icons/mapstyle.png b/server/traque-front/public/icons/mapstyle.png similarity index 100% rename from traque-front/public/icons/mapstyle.png rename to server/traque-front/public/icons/mapstyle.png diff --git a/traque-front/public/icons/marker/blue.png b/server/traque-front/public/icons/marker/blue.png similarity index 100% rename from traque-front/public/icons/marker/blue.png rename to server/traque-front/public/icons/marker/blue.png diff --git a/traque-front/public/icons/marker/grey.png b/server/traque-front/public/icons/marker/grey.png similarity index 100% rename from traque-front/public/icons/marker/grey.png rename to server/traque-front/public/icons/marker/grey.png diff --git a/traque-front/public/icons/marker/red.png b/server/traque-front/public/icons/marker/red.png similarity index 100% rename from traque-front/public/icons/marker/red.png rename to server/traque-front/public/icons/marker/red.png diff --git a/traque-front/public/icons/names.png b/server/traque-front/public/icons/names.png similarity index 100% rename from traque-front/public/icons/names.png rename to server/traque-front/public/icons/names.png diff --git a/traque-front/public/icons/parameters.png b/server/traque-front/public/icons/parameters.png similarity index 100% rename from traque-front/public/icons/parameters.png rename to server/traque-front/public/icons/parameters.png diff --git a/traque-front/public/icons/path.png b/server/traque-front/public/icons/path.png similarity index 100% rename from traque-front/public/icons/path.png rename to server/traque-front/public/icons/path.png diff --git a/traque-front/public/icons/placement.png b/server/traque-front/public/icons/placement.png similarity index 100% rename from traque-front/public/icons/placement.png rename to server/traque-front/public/icons/placement.png diff --git a/traque-front/public/icons/play.png b/server/traque-front/public/icons/play.png similarity index 100% rename from traque-front/public/icons/play.png rename to server/traque-front/public/icons/play.png diff --git a/traque-front/public/icons/reset.png b/server/traque-front/public/icons/reset.png similarity index 100% rename from traque-front/public/icons/reset.png rename to server/traque-front/public/icons/reset.png diff --git a/traque-front/public/icons/trash.png b/server/traque-front/public/icons/trash.png similarity index 100% rename from traque-front/public/icons/trash.png rename to server/traque-front/public/icons/trash.png diff --git a/traque-front/public/icons/user/black.png b/server/traque-front/public/icons/user/black.png similarity index 100% rename from traque-front/public/icons/user/black.png rename to server/traque-front/public/icons/user/black.png diff --git a/traque-front/public/icons/user/green.png b/server/traque-front/public/icons/user/green.png similarity index 100% rename from traque-front/public/icons/user/green.png rename to server/traque-front/public/icons/user/green.png diff --git a/traque-front/public/icons/user/red.png b/server/traque-front/public/icons/user/red.png similarity index 100% rename from traque-front/public/icons/user/red.png rename to server/traque-front/public/icons/user/red.png diff --git a/traque-front/public/icons/zones.png b/server/traque-front/public/icons/zones.png similarity index 100% rename from traque-front/public/icons/zones.png rename to server/traque-front/public/icons/zones.png diff --git a/traque-front/public/images/logo_traque.png b/server/traque-front/public/images/logo_traque.png similarity index 100% rename from traque-front/public/images/logo_traque.png rename to server/traque-front/public/images/logo_traque.png diff --git a/traque-front/public/images/missing_image.jpg b/server/traque-front/public/images/missing_image.jpg similarity index 100% rename from traque-front/public/images/missing_image.jpg rename to server/traque-front/public/images/missing_image.jpg diff --git a/traque-front/tailwind.config.js b/server/traque-front/tailwind.config.js similarity index 100% rename from traque-front/tailwind.config.js rename to server/traque-front/tailwind.config.js diff --git a/traque-front/util/configurations.js b/server/traque-front/util/configurations.js similarity index 100% rename from traque-front/util/configurations.js rename to server/traque-front/util/configurations.js diff --git a/traque-front/util/functions.js b/server/traque-front/util/functions.js similarity index 100% rename from traque-front/util/functions.js rename to server/traque-front/util/functions.js diff --git a/traque-front/util/types.js b/server/traque-front/util/types.js similarity index 100% rename from traque-front/util/types.js rename to server/traque-front/util/types.js diff --git a/traque-app/doc/apk_android.md b/traque-app/doc/apk_android.md deleted file mode 100644 index 378a3ef..0000000 --- a/traque-app/doc/apk_android.md +++ /dev/null @@ -1,96 +0,0 @@ -# How to create an apk - -An apk is an app file that can be installed on an android device without the need of google play store. This tutorial will explain the steps to create the apk of the current project and download it on an android device. Each step has precisions, however some of those precisions may not be suited for your device, don't hesitate to find help on the Internet or ask ChapGPT. - -## Set up your environnement - -This section will cover the set up of your environnement in order to have the tools to either send the apk of your app on your device or create a virtual android device. - -### Tutorial - -Follow this [tutorial](https://reactnative.dev/docs/set-up-your-environment?os=linux&platform=android). - -### Precisions - -* The `.bashrc` file is located in your home directory (`cd ~`). -* The Watchman installation isn't necessary. -* If you want to test your app on a physical android device, follow the next section. - -## Create the android folder - -This section will cover the creation of the android folder if it isn't created yet. - -### Tutorial - -* Go in your project folder (`traque-app`). -* Run `npm i` -* Run `npx expo prebuild --platform android` - -## Create and add the app key - -This section will cover the creation of the app key which is required by google play store. You will need the `.keystore` file associated to the app. If no one in the team have created it yet follow *Tutorial Part A* then *Tutorial Part B*, else get the `.keystore` file, the storePassword, the keyAlias and the keyPassword, and follow *Tutorial Part B*. - -### Tutorial Part A - -* Go in the folder `traque-app/android/app/`. -* Run `keytool -genkey -v -keystore release.keystore -alias traque_key -keyalg RSA -keysize 2048 -validity 10000`, note that `release` and `traque_key` can be modified if you want. - -### Tutorial Part B - -* Go in the folder `traque-app/android/app/`. -* Here paste the `.keystore` file associated with your app. -* Modify the android bracket of the `traque-app/android/app/build.gradle` file as follows : - -```txt -android { - ... - signingConfigs { - ... - release { - storeFile file('TO_BE_FILLED.keystore') - storePassword 'TO_BE_FILLED' - keyAlias 'TO_BE_FILLED' - keyPassword 'TO_BE_FILLED' - } - } - buildTypes { - ... - release { - ... - signingConfig signingConfigs.release - } - } - ... -} -``` - -## Create the apk - -This section will cover the creation of the apk of the app that can be download and installed on any android device. - -### Tutorial - -* Go in the folder `traque-app/android/`. -* Run `./gradlew assembleRelease`. -* At the end, the created apk will be located in the `traque-app/android/app/build/outputs/apk/release/` folder. - -### Precisions - -While running `./gradlew assembleRelease`, you can have this error : - -```txt -Task :expo-modules-core:compileDebugKotlin FAILED -e: This version (1.5.15) of the Compose Compiler requires Kotlin version 1.9.25 but you appear to be using Kotlin version 1.9.24 which is not known to be compatible. -``` - -Follow these steps to fix it : - -* In the `android/build.gradle` file, replace the line `classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')` by `classpath('org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25')`. -* In the `traque-app/android/` folder, run `./gradlew assembleRelease` again. - -### Other precisions - -If the build fail for obscure reasons, it may be usefull to delete entirely the `node_modules/` folder and recreate it by running `npm i`. -If problems persist, you may also delete entirely the `android/` folder and recreate it. -If the problem persist, you may also delete the `~/.gradle/caches/` folder. -If the problem persist, stop working on the project, you can't go against god's will. diff --git a/traque-app/doc/dev_build_android.md b/traque-app/doc/dev_build_android.md deleted file mode 100644 index d2e54ab..0000000 --- a/traque-app/doc/dev_build_android.md +++ /dev/null @@ -1,66 +0,0 @@ -# How to create a local developpement build with Expo - -Expo go is great to start a React Native project with Expo but reaches its limits when background localisation or server notifications have to be implemented and tested. This tutorial will explain the steps to create the debug android app of the current project (ie developpement build) and download it on an android device. A similar process can be done to test the IOS app but it requires a Mac so this won't be covered in this tutorial. A virtual android device can be created with Android Studio (explained later) but the process to send the app on the virtual device isn't covered in this tutorial. Here is a [youtube video](https://youtu.be/cs-zgHjt5RQ?si=Fzxik7zreek07uC0) that may help you. Each step has precisions, however some of those precisions may not be suited for your device, don't hesitate to find help on the Internet or ask ChapGPT. - -## Set up your environnement - -This section will cover the set up of your environnement in order to have the tools to either send the apk of your app on your device or create a virtual android device. - -### Tutorial - -Follow this [tutorial](https://reactnative.dev/docs/set-up-your-environment?os=linux&platform=android). - -### Precisions - -* The `.bashrc` file is located in your home directory (`cd ~`). -* The Watchman installation isn't necessary. -* If you want to test your app on a physical android device, follow the next section. - -## Set up your physical android device - -This section will cover the actions to perform on your device to be able to download the apk of the app. - -### Tutorial - -Follow the first section of this [tutorial](https://reactnative.dev/docs/running-on-device?os=linux&platform=android). - -### Precisions - -* In some devices, you may also enable the *install via USB* option. -* When your device is connected, keep in your mind that a pop up asking authorizations can appear on it. - -## Build the native app - -This section will cover the building of the app and the sending on your device. - -### Tutorial - -* Go in your project folder (`traque-app`). -* Run `npm i` -* Run `npx expo prebuild --platform android` -* Connect your device to your computer with a USB cable and and run `npx expo run:android`. This will build the app and send it on your device. The operation can last for up to 15 minutes. -* The application should appear on your device. At this point there is no more need of the USB cable (you can disable *USB debugging*). - -### Precisions - -While running `npx expo run:android`, you can have this error : - -```txt -Task :expo-modules-core:compileDebugKotlin FAILED -e: This version (1.5.15) of the Compose Compiler requires Kotlin version 1.9.25 but you appear to be using Kotlin version 1.9.24 which is not known to be compatible. -``` - -Follow these steps to fix it : - -* In the `android/build.gradle` file, replace the line `classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')` by `classpath('org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25')`. -* In the `traque-app` folder, run `npx expo run:android` again. - -## Run the app - -This section will explain how to run the app. The process is really similar to the one to run the app on Expo go and can be done with your device on the same WI-FI network as your computer. - -### Tutorial - -* Start the developpement server by running `npm start`, a blue *development build* should appear in your terminal. -* Scan the QR code that appears to start developping. -* If the app crashes, you may need to restart the developpement server.