Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S04 us12 #98

Merged
merged 4 commits into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 27 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,39 @@
## Concept

This template is meant to serve as a foundation for every P2/P3 following the React-Express-MySQL stack, as learned in Wild Code School.
It's pre-configured with a set of tools which'll help students produce industry-quality and easier-to-maintain code, while staying a pedagogical tool.

## Setup & Use

### Windows users

Be sure to run these commands in a git terminal to avoid [issues with newline formats](https://en.wikipedia.org/wiki/Newline#Issues_with_different_newline_formats):

```
git config --global core.eol lf
git config --global core.autocrlf false
```
## Jeu Elixir Maker

### Project Initialization
Ce jeu a été créé dans le cadre du projet n°2 de notre formation.
L'utilisation de React et d'une API était obligatoire pour la
réalisation de ce projet.
Les consignes : travailler en équipe et en agilité, respecter les consignes et travailler avec "git" dans un laps de temps donné.

- In VSCode, install plugins **Prettier - Code formatter** and **ESLint** and configure them
- Clone this repo, enter it
- If you are using `yarn` or `pnpm`, adapt the `config/cli` in `package.json`
- Run command `npm install` (or equivalent using `yarn` or `pnpm`)
- Create environment files (`.env`) in both `backend` and `frontend`: you can copy `.env.sample` files as starters (**don't** delete them)

### Before you start

- To ensure compatibility and prevent conflicts, please consistently employ a **single** package manager: `npm`, `yarn`, or `pnpm`.

### Available Commands

- `db:migrate` : Run the database migration script
- `db:seed` : Run the database seed script
- `dev` : Starts both servers (frontend + backend) in one terminal
- `dev-front` : Starts the React frontend server
- `dev-back` : Starts the Express backend server
- `lint` : Runs validation tools (will be executed on every _commit_, and refuse unclean code)

## FAQ
## Concept

### Tools
Entrez dans l'univers des potions magiques !!

- _Concurrently_ : Allows for several commands to run concurrently in the same CLI
- _Husky_ : Allows to execute specific commands that trigger on _git_ events
- _Vite_ : Alternative to _Create-React-App_, packaging less tools for a more fluid experience
- _ESLint_ : "Quality of code" tool, ensures chosen rules will be enforced
- _Prettier_ : "Quality of code" tool as well, focuses on the styleguide
- _ Airbnb Standard_ : One of the most known "standards", even though it's not officially linked to ES/JS
Vous pourrez réaliser votre rêve en devenant un sorcier en recréant une potion avec l'aide des ingrédients proposés.
Plusieurs niveaux au choix.
A toi de jouer !

### Deployment with Traefik
## Team

> ⚠️ Prerequisites : You must have installed and configured Traefik on your VPS beforehand.
> https://github.com/WildCodeSchool/vps-traefik-starter-kit/
L'équipe du Vogue Merry :

For deployment, you have to go to `secrets` → app `actions` on the github repo to insert via `New repository secret` :
- [Morgane](https://github.com/Enagrom5) (alias Hermione Granger)
- [Baris](https://github.com/BarisRz) (alias Harry Potter)
- [Elie](https://github.com/Hkaiser45) (alias Tom Jédusor)
- [Sébastien](https://github.com/sebztz) (alias Ron Weasley)
- [Christophe](https://github.com/Chrisbrn2625) (alias Maugrey Fol oeil)

- SSH_HOST : IP address of your VPS
- SSH_USER : SSH login to your VPS
- SSH_PASSWORD : SSH connection password to your VPS
### Langages et outils utilisés

And a public variable from the tab `/settings/variables/actions`
[![My Skills](https://skillicons.dev/icons?i=git,react,scss,tailwind,photoshop,discord,github,figma&theme=light)](https://skillicons.dev)

- PROJECT_NAME : the name of the project used to create the subdomain for frontend.
API utilisée : https://docs.potterdb.com/fr

The backend subdomain will be automatically created with the suffix -backend.
The global variable VITE_BACKEND_URL will be automatically created and pre-filled on the basis of this information.
### Si vous voulez utiliser le projet :

Use this same tab to add the other environment variables required for the project if any.
```
git config --global core.eol lf
git config --global core.autocrlf false
npm install
npm run dev-front
```