Giter Club home page Giter Club logo

rps-game's Introduction

Rock Paper Scissors Game

AI Build Backend Build Frontend Build

Welcome to the Rock Paper Scissors game powered by Red Hat OpenShift AI! ๐Ÿš€

This game uses a Quarkus backend and a React frontend. The game integrates machine learning models to process your move, giving it a modern twist to the classic game!

Roshambo on iPhone

Architecture Overview

The Quarkus backend provides a configuration payload to the UI. This payload includes a feature flag that will enable or disable an image recognition feature. You can find this configuration in the Qukarus application.properties file. Enabling this feature will allow users to take pictures of their hand to select rock, paper, or scissors. The image is sent to a Python service (code in roshambo-ai folder) that uses a model provided by OpenShift AI to determine the user's selection.

Roshambo Architecture

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Before you begin, you will need to have the following installed:

  • Node.js (v18 or v20) and npm
  • Java Development Kit (v17)
  • Maven

Optionally, you might want to the Quarkus backend upload captured images to AWS S3. This requires creating an S3 bucket and configuring an IAM user with write access to the bucket. Check roshambo-backend/README.md for more information.

Local Development

  • Clone the repository to your local machine.
  • Navigate to the root directory of the project.
  • Install frontend dependencies using npm install in the frontend directory (roshambo-ui).
  • Install backend dependencies using mvn install in the backend directory (roshambo-backend).
  • Start the Quarkus backend using ./mvnw quarkus:dev.
  • Start the React development server using npm run dev.
  • Visit http://localhost:5173 in your web browser to view the application (view the README in the roshambo-ui folder for details about SSL and iOS Camera access)

Deployment on OpenShift

Refer to the redhat-developer-demos/rps-game-manifests repository.

Built With

  • React - The web framework used.
  • TypeScript - The main language for the frontend.
  • XState - State management for the frontend, and bot players.
  • Quarkus - Used for the backend.
  • Tailwind CSS - Used for styling.

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Authors

License

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details.

rps-game's People

Contributors

cedricclyburn avatar cfchase avatar evanshortiss avatar fdivita avatar lordofthejars avatar

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.