Skip to content

Pokerchip$ is an application that allows you to play poker without physical chips. Thanks to it, players can simulate their chips in real time, which allows for comfortable gameplay even when they do not have traditional poker accessories with them. The perfect solution for playing on the go when taking a poker set would be a big problem.

License

Notifications You must be signed in to change notification settings

w3rr0/pokerchips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

320 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stargazers Issues project_license LinkedIn


Logo

Pokerchip$ is an application that allows you to play poker without physical chips. Thanks to it, players can simulate their chips in real time, which allows for comfortable gameplay even when they do not have traditional poker accessories with them. The perfect solution for playing on the go when taking a poker set would be a big problem.
Try Yourself »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

For who

For all those who, whether away or at home, want to play poker with friends but do not have a poker set with them. Now all you need to play is cards.

Why pokerchip$

It's simple! Pokerchip$ is easy to understand, free, and gives you full control over your chips. It doesn't restrict your style of play in any way. You can play by your own rules, and the chip system won't limit you.

Background

The idea was born when I noticed that on many trips with friends we wanted to play poker, but we almost never took poker accessories. Someone always had cards, and they were not a problem, and playing online is not the same as playing live, so pokerchip$ was perfect for such situations.

What's next

I've already added all the key things that I thought were necessary for the app to work well. However, if new plans appear, I'll be introducing them on an ongoing basis.

(back to top)

Built With

fastapi react azure

  • Backend
    • FastAPI 0.115
    • Python 3.12
  • Frontend
    • React 19
  • Server
    • Azure App Service
    • Azure Static Web App

(back to top)

Design

Here's a design sample from the current version of the app:

home-mobile create-mobile join-mobile
gameplay-mobile gameplay-tablet

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running, follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • Python

    check if you have the required version of python installed

    python3.12 --version

    if you don't have it installed, download it from the official website: python.org (or other preferred source)

  • npm

    npm install npm@latest -g

    or if you don't have npm installed, download it from: nodejs.org

  • pip

    pip install --upgrade pip

Installation

Git:

  1. Clone the repo

    git clone https://github.com/w3rr0/pokerchips.git

    or fork this repo to your account and clone it from there

  2. Change git remote url to avoid accidental pushes to a base project

    git remote set-url origin git remote set-url origin https://github.com/github_username/repo_name.git
    git remote -v # confirm the changes

Frontend:

  1. Go to the front directory

    cd front
  2. create environment

    Linux/Mac:

    echo -e "VITE_API_URL=http://localhost:8000\nVITE_WS_URL=ws://localhost:8000/ws\nVITE_GITHUB_LINK=https://github.com/w3rr0/pokerchips" > .env.development

    Windows:

    echo VITE_API_URL=http://localhost:8000 > .env.development
    echo VITE_WS_URL=ws://localhost:8000/ws >> .env.development
    echo VITE_GITHUB_LINK=https://github.com/w3rr0/pokerchips >> .env.development

    or if necessary, replace the values with yours

  3. Install NPM packages

    npm install --legacy-peer-deps

Backend:

  1. Go back to root

    cd ..
  2. Create virtual env

    python3.12 -m venv .venv
  3. Activate virtual env

    Linux/Mac:

    source .venv/bin/activate

    Windows

    .venv\Scripts\activate
  4. go to the backend directory

    cd backend
  5. Install dependencies

    pip3 install -r requirements.txt
  6. create env Linux/Mac:

    echo -e "ALLOW_CREDENTIALS=True\nALLOWED_ORIGINS=http://localhost:5173" > .env

    Windows:

    echo ALLOW_CREDENTIALS=True > .env && echo ALLOWED_ORIGINS=http://localhost:5173 >> .env

    or change values if u need to

Startup

  1. Open root in a new terminal window and start the backend server

    uvicorn backend.main:app --reload
  2. Repeat this action but with the frontend

    cd front
    npm run dev
  3. Go to the URL you get this way, and you're done!

(back to top)

Tests

To make sure everything on the backend has been set up correctly, you can run tests

In the new terminal (with an active virtual environment):

pytest backend/tests/test_app.py

(back to top)

Usage

Home

To start the game, you have two options, either to join a friend's room or create your own. Enter your nickname (between 1 and 15 characters) and select one of these options by clicking the appropriate button.

Join

When joining, you must enter the PIN of the room you want to join and choose your starting token value (from 0 to 10,000, the default is 2,500). Once you do this, confirm with the button, and you will be transferred to the game

Create

If you are the one creating the room, you also have to choose your starting value of your tokens and the maximum number of players that can play at the same time (from 2 to 9, but if you don't care about the limit, I recommend leaving it at 9, you never know if someone will want to join you 😉)

Gameplay

Once you join a room, you will see all the information about the room such as:

  • PIN
  • Current number of players
  • Player limit in room

A table that simulates the one during live play, containing:

  • At the bottom
    • your avatar with information about the current value of all tokens
    • tokens corresponding to the amount you selected
  • In the middle
    • the amount currently placed on the table by all players
    • the value of the bet you are currently placing
  • At the top
    • avatars of the rest of the players along with the amount they have (If you are alone in the room, a message will be displayed that there are no other players)

An additional section for controlling the game where you will find:

  • control buttons
    • collecting your chips from the table
    • collecting the winnings, i.e., all the chips on the table
    • leaving the room
  • an additional chat section (if you are using a device with a large enough screen, such as a PC, laptop, or some tablets), where you will find:
    • messages sent by other users since you joined the room
    • gameplay history, from which you can learn about who:
      • join
      • left
      • win (and how much)

To place a bet, simply click on a chip with the appropriate value.

All events are updated continuously for each player without the need to refresh the page.

For a more detailed explanation of how everything works under the hood, please visit the documentation for the individual functions found in the project source files.

(back to top)

Contributing

Any contributions you make are greatly appreciated!

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Linkedin: Konrad Mateja

Project Link: https://github.com/w3rr0/pokerchips

(back to top)

About

Pokerchip$ is an application that allows you to play poker without physical chips. Thanks to it, players can simulate their chips in real time, which allows for comfortable gameplay even when they do not have traditional poker accessories with them. The perfect solution for playing on the go when taking a poker set would be a big problem.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •