-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from La-404-Devinci/dev
dev
- Loading branch information
Showing
67 changed files
with
8,346 additions
and
6,203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# pixel-war | ||
|
||
La Pixel war est l'évènement organisé par La 404 Devinci dans le cadre de la COVA. | ||
|
||
Il s'agit d'une reproduction à échelle réduite et réservé au élèves du Pôle Léonard De Vinci de l'évènement éponyme organisé par Reddit. | ||
|
||
## Technologies utilisées | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th colspan="2">App</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>Frontend</td> | ||
<td>ReactJs</td> | ||
</tr> | ||
<tr> | ||
<td>Backend</td> | ||
<td>ExpressJs</td> | ||
</tr> | ||
<tr> | ||
<td>Base de données</td> | ||
<td>Mysql</td> | ||
</tr> | ||
<tr> | ||
<td>Websocket API</td> | ||
<td>Socket.io</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th colspan="2">Devops</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>Setup</td> | ||
<td>Docker</td> | ||
</tr> | ||
<tr> | ||
<td>CI/CD</td> | ||
<td>Github Actions</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
## Installation | ||
|
||
Cette section couvre la configuration à des fins de développement | ||
|
||
### Frontend | ||
|
||
Depuis la racine du projet : | ||
|
||
```sh | ||
cd ./frontend | ||
npm i | ||
npm run dev | ||
``` | ||
|
||
### Backend | ||
|
||
Depuis la racine du projet : | ||
|
||
```sh | ||
cd ./backend | ||
npm i | ||
``` | ||
|
||
Démarrez votre image MySql sur Docker : | ||
|
||
``` | ||
docker compose up -d | ||
``` | ||
|
||
Exécutez les migrations de bases de données : | ||
|
||
> **Info :** Ne pas oublier de créer un fichier .env, coller le contenu de .env.example et modifier les variables d'environnement liées à la base de données | ||
|
||
``` | ||
npx prisma migrate dev | ||
``` | ||
|
||
``` | ||
npm i --save-dev prisma@latest | ||
npm i @prisma/client@latest | ||
``` | ||
|
||
Exécuter l'application : | ||
|
||
``` | ||
npm run dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,14 @@ PORT=3000 | |
|
||
JWT_SECRET="s3cr3t" | ||
|
||
MYSQL_USER="pixelwar" | ||
MYSQL_PASSWORD="pixelwar" | ||
MYSQL_HOST="localhost" | ||
MYSQL_PORT="3336" | ||
MYSQL_DATABASE="pixelwar" | ||
|
||
REDIS_USER="" | ||
REDIS_PASSWORD="" | ||
REDIS_HOST="localhost" | ||
REDIS_PORT="3337" | ||
REDIS_DATABASE="0" | ||
DATABASE_URL="mysql://root:root@localhost:3336/pixelwar" | ||
|
||
API_URL="http://localhost:3000/api" | ||
|
||
EMAIL_HOST="smtp.gmail.com" | ||
EMAIL_PORT="587" | ||
EMAIL_USER="username" | ||
EMAIL_PASS="password" | ||
EMAIL_FROM="[email protected]" | ||
|
||
FRONTEND_URL="http://localhost:3000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
{ | ||
"env": { | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"ignorePatterns": ["node_modules", "dist", "data"], | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"indent": ["error", 4], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "double"], | ||
"semi": ["error", "always"], | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": ["warn"] | ||
} | ||
"env": { | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"ignorePatterns": ["node_modules", "dist", "data"], | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"indent": ["error", 4], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "double"], | ||
"semi": ["error", "always"], | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": ["warn"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module "french-badwords-list" { | ||
const array: string[]; | ||
export { array }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare namespace Express { | ||
export interface Request { | ||
account: Account; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.