refacto - ReadMe.md and README_EN.md.md

This commit is contained in:
Kevin Mitressé
2024-06-17 11:57:14 +02:00
parent 2c19ad560b
commit caf9295925
2 changed files with 69 additions and 80 deletions
+33 -30
View File
@@ -1,6 +1,6 @@
# Cards Rush - Projet Développement Web - 2024
English version available [here](README_EN.md)
Version anglaise disponible [ici](README_EN.md)
## Auteurs :
- [Kevin MITRESSÉ](http://kmitresse.free.fr)
@@ -8,73 +8,76 @@ English version available [here](README_EN.md)
## Installation
Pour pouvoir lancer le projet, il vous faut avoir docker et maven d'installé sur votre machine.
Pour pouvoir lancer le projet, vous devez avoir Docker et Maven installés sur votre machine.
### Installation de docker desktop
### Installation de Docker Desktop
Pour installer docker desktop, rendez-vous sur le site officiel de docker et téléchargez la version correspondant à votre système d'exploitation.
Pour installer Docker Desktop, rendez-vous sur le site officiel de Docker et téléchargez la version correspondant à votre système d'exploitation.
Lien : [Docker Desktop](https://www.docker.com/products/docker-desktop)
### Installation de maven
### Installation de Maven
Pour installer maven, rendez-vous sur le site officiel de maven et téléchargez la version correspondant à votre système d'exploitation.
Pour installer Maven, rendez-vous sur le site officiel de Maven et téléchargez la version correspondant à votre système d'exploitation.
Lien vers un tutoriel d'installation : [Maven](https://www.baeldung.com/install-maven-on-windows-linux-mac)
Tutoriel d'installation : [Maven](https://www.baeldung.com/install-maven-on-windows-linux-mac)
### Prérequis supplémentaires (uniquement pour windows)
Sur windows, il est nécessaire d'avoir installé un système de terminal bash comme git bash ou windows terminal.
### Prérequis supplémentaires (uniquement pour Windows)
`Recommandé` Lien vers git bash (Facile d'utilisation et regroupe toutes les commandes bash) : [Git Bash](https://git-scm.com/downloads)
Sur Windows, il est nécessaire d'avoir installé un terminal bash comme Git Bash ou Windows Terminal.
Lien vers windows terminal : [Windows Terminal](https://www.microsoft.com/fr-fr/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab)
`Recommandé` Télécharger Git Bash (Facile d'utilisation et regroupe toutes les commandes bash) : [Git Bash](https://git-scm.com/downloads)
Télécharger Windows Terminal : [Windows Terminal](https://www.microsoft.com/fr-fr/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab)
### Installation du projet
Une fois tous les outils installés.
Lancez les commandes suivantes pour installer le projet :
Depuis un terminal bash (ou git bash), se positionner à la racine du projet puis lancez les commandes suivantes:
Une fois tous les outils installés, suivez ces étapes pour installer le projet :
```` bash
Depuis un terminal bash (ou Git Bash), positionnez-vous à la racine du projet puis lancez les commandes suivantes :
```bash
# Création des scripts .sql
./mysql/build.sh
# Lancement du container docker contenant la base de données
# project_devweb est le nom du projet, vous pouvez le changer à votre guise
# retirer la commande -p project_devweb si vous ne souhaitez pas nommer le projet, il portera par défaut le nom du dossier contenant le projet
# Lancement du container Docker contenant la base de données
# "cardsRush" est le nom du projet, vous pouvez le changer à votre guise
# Retirez la commande -p cardsRush si vous ne souhaitez pas nommer le projet, il portera par défaut le nom du dossier contenant le projet
docker-compose -p cardsRush up -d
# Installation des dépendances maven
# Installation des dépendances Maven
mvn clean package
mvn install
````
```
## Lancement du projet
Depuis IntelliJ, ouvrir l'onglet `file > project structure` et vérifier que les artefacts suivants sont bien présents :
Depuis IntelliJ, ouvrez l'onglet `File > Project Structure` et vérifiez que les artefacts suivants sont bien présents :
- project: war
- project: war exploded
![Onglet project_structure.png](readmeTools/project_structure.png)
Nous utilisons tomcat pour lancer notre projet.
Nous utilisons Tomcat pour lancer notre projet.
Sur IntelliJ, vous pouvez ajouter une configuration Tomcat depuis l'onglet "edit run configurations", puis en cliquant sur le bouton "+" en haut à gauche de la fenêtre de lancement.
Sur IntelliJ, vous pouvez ajouter une configuration Tomcat depuis l'onglet "Edit Run Configurations", puis en cliquant sur le bouton "+" en haut à gauche de la fenêtre de lancement.
Éditez la configuration comme suit (le port utilisé pour Tomcat conseillé est 8080, mais vous pouvez le changer si vous le souhaitez ou s'il est déjà utilisé par un autre service sur votre machine) :
Editez la configuration comme suit (le port utilisé pour Tomcat conseillé est 8080, mais vous pouvez le changer si vous le souhaitez ou s'il est déjà utilisé par un autre service sur votre machine) :
![Configuration Tomcat.png](readmeTools/tomcat_configuration.png)
![Configuration Tomcat2.png](readmeTools/tomcat_deployment.png)
Enfin, allumez votre container docker contenant la base de données puis lancez l'application depuis votre navigateur.
Enfin, allumez votre container Docker contenant la base de données, puis lancez l'application depuis votre navigateur.
## Parties multijoueurs
Cards Rush est un jeu multijoueurs. Pour joueur avec vos amis en local, vous devez être connecté au même réseau (même wifi, même partage de connexion, etc...).
Cards Rush est un jeu multijoueurs. Pour jouer avec vos amis en local, vous devez être connecté au même réseau (même Wi-Fi, même partage de connexion, etc.).
Le lien a utiliser pour accéder au jeu est le suivant : `http://ip:8080/cardsrush_war_exploded/` (ip étant l'adresse ip de la machine hébergeant le serveur Tomcat).
Le lien à utiliser pour accéder au jeu est le suivant : `http://ip:8080/cardsrush_war_exploded/` (où "ip" est l'adresse IP de la machine hébergeant le serveur Tomcat).
L'application n'étant pas encore hébérgée en ligne, il est nécessaire de lancer l'application sur une machine et de partager l'adresse ip de cette machine pour que les autres joueurs puissent se connecter.
L'application n'étant pas encore hébergée en ligne, il est nécessaire de lancer l'application sur une machine et de partager l'adresse IP de cette machine pour que les autres joueurs puissent se connecter.
## Potentielles améliorations à prévoir:
## Potentielles améliorations à prévoir
- Hebergement du jeu en ligne.
- Hébergement du jeu en ligne.
- Ajout d'un chat pour les parties multijoueurs lorsque l'application sera hébergée en ligne.
+35 -49
View File
@@ -1,91 +1,77 @@
# Cards Rush - Web Development Project - 2024
Version française disponible [ici](README.md)
[Version française disponible ici](README_FR.md)
## Authors:
- [Kevin MITRESSÉ](http://kmitresse.free.fr)
- [Lucàs VABRE](https://portfolio-lucasvbr.vercel.app/)
## Installation
To be able to run the project, you need to have Docker and Maven installed on your machine.
To be able to run the project, you need to have docker and maven installed on your machine.
### Installation of docker desktop
To install docker desktop, go to the official docker website and download the version corresponding to your operating system.
### Installation of Docker Desktop
To install Docker Desktop, go to the official Docker website and download the version corresponding to your operating system.
Link: [Docker Desktop](https://www.docker.com/products/docker-desktop)
### Installation of maven
### Installation of Maven
To install Maven, go to the official Maven website and download the version corresponding to your operating system.
To install maven, go to the official maven website and download the version corresponding to your operating system.
Installation tutorial: [Maven](https://www.baeldung.com/install-maven-on-windows-linux-mac)
Link to an installation tutorial: [Maven](https://www.baeldung.com/install-maven-on-windows-linux-mac)
### Additional prerequisites (only for Windows)
On Windows, you need to have installed a bash terminal system like Git Bash or Windows Terminal.
### Additional prerequisites (only for windows)
Recommended: Download Git Bash (Easy to use and groups all bash commands): [Git Bash](https://git-scm.com/downloads)
On windows, you need to have installed a bash terminal system like git bash or windows terminal.
Download Windows Terminal: [Windows Terminal](https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab)
`Recommended` Link to git bash (Easy to use and groups all bash commands): [Git Bash](https://git-scm.com/downloads)
### Project Installation
Once all the tools are installed, run the following commands to install the project:
Link to windows terminal: [Windows Terminal](https://www.microsoft.com/fr-fr/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab)
### Project installation
Once all the tools are installed.
Run the following commands to install the project:
From a bash terminal (or git bash), go to the root of the project and run the following commands:
```` bash
From a bash terminal (or Git Bash), navigate to the root of the project and run the following commands:
```bash
# Create the .sql scripts
./mysql/build.sh
# Launch the docker container containing the database
# project_devweb is the name of the project, you can change it as you wish
# remove the -p project_devweb command if you do not want to name the project, it will default to the name of the folder containing the project
# Launch the Docker container containing the database
# "cardsRush" is the name of the project, you can change it as you wish
# Remove the -p cardsRush command if you do not want to name the project, it will default to the name of the folder containing the project
docker-compose -p cardsRush up -d
# Install maven dependencies
# Install Maven dependencies
mvn clean package
mvn install
````
## Launch of the project
From IntelliJ, open the `file > project structure` tab and check that the following artifacts are present:
```
## Launch of the Project
From IntelliJ, open the `File > Project Structure` tab and check that the following artifacts are present:
- project: war
- project: war exploded
![Onglet project_structure.png](readmeTools/project_structure.png)
![Project Structure](readmeTools/project_structure.png)
We use tomcat to launch our project.
We use Tomcat to launch our project.
On IntelliJ, you can add a Tomcat configuration from the "edit run configurations" tab, then by clicking on the "+" button at the top left of the launch window.
In IntelliJ, you can add a Tomcat configuration from the "Edit Run Configurations" tab, then by clicking on the "+" button at the top left of the launch window.
Edit the configuration as follows (the port used for Tomcat is 8080, but you can change it if you wish or if it is already used by another service on your machine):
![Configuration Tomcat.png](readmeTools/tomcat_configuration.png)
![Configuration Tomcat2.png](readmeTools/tomcat_deployment.png)
![Tomcat Configuration](readmeTools/tomcat_configuration.png)
![Tomcat Deployment](readmeTools/tomcat_deployment.png)
Finally, start your docker container containing the database and launch the application from your browser.
Finally, start your Docker container containing the database and launch the application from your browser.
## Multiplayer games
## Multiplayer Games
Cards Rush is a multiplayer game. To play with your friends locally, you must be connected to the same network (same wifi, same connection sharing, etc...).
Cards Rush is a multiplayer game. To play with your friends locally, you must be connected to the same network (same Wi-Fi, same connection sharing, etc.).
The link to use to access the game is as follows: `http://ip:8080/cardsrush_war_exploded/` (ip being the ip address of the machine hosting the Tomcat server).
The link to use to access the game is as follows: `http://ip:8080/cardsrush_war_exploded/` (where "ip" is the IP address of the machine hosting the Tomcat server).
As the application is not yet hosted online, it is necessary to launch the application on a machine and share the ip address of this machine so that other players can connect.
Since the application is not yet hosted online, you need to launch the application on a machine and share the IP address of this machine so that other players can connect.
## Potential improvements to consider:
## Potential Improvements to Consider
- Hosting the game online.
- Adding a chat for multiplayer games when the application is hosted online.
## Potentielles améliorations à prévoir:
- Hebergement du jeu en ligne.
- Ajout d'un chat pour les parties multijoueurs lorsque l'application sera hébergée en ligne.