Giter VIP home page Giter VIP logo

game-on's Introduction

Game On

Usage

Installation

To setup the project locally, you need to meet the following requirements:

  • Git
  • NodeJS (Version ^16, prefer installation using NVM)
  • PNPM (Version ^7 recommended, install with npm i -g pnpm)
  • Docker (Not required but useful if playwright is not compatible with your environment)

Once everything is installed, you can clone the project locally with the following command:

git clone [email protected]:Zuruuh/game-on
cd game-on

Then, install all the npm dependencies with pnpm install.

Development

To run the project locally, use the npm script dev with pnpm run dev, and the project will be served locally at http://localhost:5173. You will benefit from ViteJS Hot Module Replacement which will update all your code directly in your browser when you edit it.

Testing

Playwright is used to test the website's features. To set it up locally, try to run the command pnpm run playwright:install. If you receive an error message telling you that your os is not supported you can use the docker alternative by running pnpm run docker:build.

Once the installation step is done, simply run pnpm run playwright:test (or pnpm run docker:test if you are using docker) and everything should be good to go!

Production

To build the project for production, simply run pnpm run build and you will get your prod-ready project in the ./dist folder.

Tools

This project has multiple tools setup by default, let's take a look at all of them 🚀

  • Playwright
    • Playwright is an end-to-end test runner which is very easy to set up and get started with.
    • It allows developers to test quickly their web-app with multiple browsers & size screen.
  • Linters, Formatters, Static-Code Analyzers
  • ViteJS
    • Very popular module bundler which is known for its speed and fast-growing community.
      It utilizes Hot Module Replacement to update your code directly in your browser without loosing its state and extremely fast.
  • PostCSS
    • Tool used to apply modifications on css during build time, has a very large plugin ecosystem that can help a lot with common issues.
    • PurgeCSS
      • Reduces drastically final css bundle size by making sure every css selector is actually used in final html files, and will get rid of unused ones.
    • Autoprefixer
      • Makes sure our css will support as much browsers as possible by adding custom vendor prefixes to css declarations that might behave differently depending on the browser interpreting it.
  • GitHub Pages
    • Free web hosting offered by GitHub with easy configuration and access directly from a GitHub repository's settings
  • GitHub Actions
    • Continuous Integration
      • Since this project utilizes a lot ot linters, formatters, static-code analyzers, etc... Making sure they are correctly used is vital!
        All linters are run whenever someone pushes on a branch, and they need to all pass in order to be able to merge a pull request.
    • Continuous Deployment (w/ GitHub Pages)
      • This project uses GitHub Actions to re-deploy whenever someone updates the main branch.
        (All assets are built beforehand using ViteJS)

game-on's People

Contributors

hayvthom avatar nicolaspatschkowski avatar t3events avatar zuruuh avatar

Watchers

 avatar

game-on's Issues

Create E2E scenarios

Create tests in e2e scenarios for the already existing and the newly created feature

Depends on #7

Ajouter confirmation quand envoi réussi

Après une validation réussie, inclure un message de confirmation de la soumission réussie pour l'utilisateur (ex. "Merci ! Votre réservation a été reçue.")

Tests Manuels

  • Visualiser et tester l'interface utilisateur dans les dernières versions de Chrome et de Firefox, ainsi que dans les versions mobile et desktop. Corriger les erreurs d'affichage existantes.
  • Tester toutes les fonctionnalités des boutons et des entrées de formulaire (tester les valeurs correctes et incorrectes)

Setup CI

Setup CI with github actions to run linters (eslint & prettier)

Implémenter entrées du formulaire

(1) Lier les labels aux entrées dans le HTML en utilisant les attributs "for" et "id" dans le code existant. Corriger le code HTML quand nécessaire.
(2) Utiliser du JavaScript pur (pas de jQuery) pour terminer le formulaire :

  • Le formulaire doit être valide quand l'utilisateur clique sur "Submit"
  • Les données doivent être saisies correctement :
    (1) Le champ Prénom a un minimum de 2 caractères / n'est pas vide.
    (2) Le champ du nom de famille a un minimum de 2 caractères / n'est pas vide.
    (3) L'adresse électronique est valide.
    (4) Pour le nombre de concours, une valeur numérique est saisie.
    (5) Un bouton radio est sélectionné.
    (6) La case des conditions générales est cochée, l'autre case est facultative / peut être laissée décochée.
  • Conserver les données du formulaire (ne pas effacer le formulaire) lorsqu'il ne passe pas la validation.

Ajouter validation ou messages d'erreur

Des messages d'erreur spécifiques doivent apparaître sous l'entrée qui n'est pas correcte. Les messages d'erreur doivent s'afficher sous le champ de saisie associé. Exemples :

  • "Veuillez entrer 2 caractères ou plus pour le champ du nom."
  • "Vous devez choisir une option."
  • "Vous devez vérifier que vous acceptez les termes et conditions."
  • "Vous devez entrer votre date de naissance."

Create CD pipeline

Deploy to github pages when pushing on main.
Install dependencies with PNPM & build with vite

Fix assets

Remove unused assets & fix broken path or unexisting files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.