GithubHelp home page GithubHelp logo

khgiddon / chess-stamps Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 71.71 MB

Chess Stamps application

Home Page: https://www.chessstamps.app

License: MIT License

Python 30.10% HTML 1.73% CSS 10.77% JavaScript 57.40%

chess-stamps's Introduction

Chess Stamps

Chess stamps is a tool for pulling statistics on your chess games played on Lichess and comparing your opening your repertoire to the population. It uses a "stamp collecting" theme.

Live URL: https://www.chessstamps.app

Getting Started

Chess Stamps uses a Flask backend and a React frontend. API calls to the Lichess API are made from the backend.

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

Prerequisites

You need to have Node.js, npm, and Python installed on your machine. You can install Node.js and npm from the official Node.js website and Python from the official Python website.

Setting Up a Virtual Environment

This project uses a virtual environment to manage Python dependencies. To set up the virtual environment:

  1. Navigate to the project directory in your terminal.
  2. Create a new virtual environment by running the following command:
python3 -m venv venv

Activate the virtual environment:

On Windows, run:

venv\Scripts\activate

On Unix or MacOS, run:

source venv/bin/activate

Installing

  1. Clone the repository:
git clone <repository_url>
  1. Navigate to the project directory:
cd <project_directory>
  1. Install the backend dependencies:
pip install -r requirements.txt
  1. Navigate to the client directory:
cd client
  1. Install the frontend dependencies:
npm install
  1. Create a .env file in the project directory and add your environment variables:
lichessToken = '<your_lichess_token>'
FLASK_ENV = 'development'
LICHESS_CLIENT_ID="lichess-oauth-flask"
SECRET_KEY="<secret_key>"
AUTH_METHOD="oauth"

Replace <your_lichess_token> with a personal access token described here. This is to provide another auth method for dev purposes without having to go through OAuth every time. To stop using OAuth, you can change the AUTH_METHOD described in .env.

<SECRET_KEY> is a static secret key for the Flask app. You can generate a secret key using the following Python code:

import secrets
print(secrets.token_hex(16))

Running the Application

To run the backend, navigate to the project directory and execute the following command:

flask run

To run the frontend, navigate to the client directory and execute the following command:

npm start

The backend will start and be available at http://localhost:5000, and the frontend will be available at http://localhost:3000.

Built With

Authors

  • Kyle Giddon

License

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

Contributing

To contribute to this project, please open an issue or a pull request.

There are some obvious rooms for improvement, such as:

  • The database is very storage-inefficient right now.
  • The UI for the "All Stamps" section can have improvements such as filtering by popularity, ply, etc.

chess-stamps's People

Contributors

khgiddon avatar

Stargazers

 avatar Alfred Freitas avatar Roy avatar  avatar Trevor Fitzgerald avatar

Watchers

 avatar

chess-stamps's Issues

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.