Skip to content

ssahoo11742/KnightStable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

banner GitHub repo size GitHub last commit

KnightStable is a chess website where users can look at previous games, openings, recent news as well as play against others

Link: NOT ONLINE

note: This site's url changes every ~24-48hrs and this website is NOT meant to be used on a small device such as a phone. For more info, check the Notes section

ks

Current Bugs

  • Bug where it creates ghost games. Found: 3/22/23. This bug sometimes pairs you in a game with no opponent

Installation

Step 1 - Clone the Project

Run the following command

git clone https://github.com/SwayamSahoo11742/KnightStable.git

Step 2 - Install everything in requirements.txt using the following command:

**Make sure you are in knightstable folder

pip install -r requirements.txt

Step 3 - Setting up the databases.

Run database.py in the staticHelpers directory to create the databases:

python database.py

**The openings and games databases will be empty at this stage and unfortunately, the games database cannot be filled, however if you want the opening database, simply run web_scraper.py in staticHelpers

Step 4 - setting authtoken with ngrok

Create an ngrok account at this link and go to their dashboard to follow instructions on how to set up an authtoken

Step 5 - Running the website

After setting up your authtoken, to run the website, open the knightstable terminal and run the following commands:

set FLASK_APP=__init__.py
flask run

It should be running in port 5000, so now you can open cmd as an administrator and run ngrok http 5000 and the link to your website will be in the ngrok terminal. You do not have to use the randomly generated link by ngrok, you can use a domain name, but for that you will need to buy ngrok premiun which is quite expensive.

**You will have to do this step each time you reset your server.

Features

  • Look at the games of others

    • Learn from higher level plays, or have a look at how lower level play is
  • Search for fun openings

    • Whether it be the famous Sicillian, or obsecure Flick Knife Attack, we have it
  • Look at recent, world-wide, chess events

    • Maybe you can go to one
  • Play against other players

    • And climb the rating ladder

Images

  • Homepage

Screenshot_20221227_110428

Screenshot_20221227_110458

  • Search Page

    Screenshot_20221227_110524
  • Opening Search Page

    image
  • Play page

    image
  • Game page

    Screenshot_20221227_110728
  • **Many more pages that cannot be displayed to keep this concise, can be viewed in the link above

Languages/tools used

  • Backend

    • Python
    • Sqlite3 (Development Database)
    • PostgreSQL (Production Database)
  • Frontend

    • JavaScript
    • HTML5
    • CSS
  • Tools and Modules

    Backend

    • Flask
    • SocketIO
    • Pyscopg2
    • BeautifulSoup4
    • Selenium

    Frontend

    • Chart.js
    • chessboard.js
    • chess.js
    • Bootstrap5
    • Jinja2

Notes

  • Due to the lack of visits, from both me and others, the product is not publicly accessible as it is not worth the cost to keep it running. Instead, the development version of this is ran on my local system since the traffic will not be high.

  • This app is using Ngrok to run and forward an SSH tunnel to my localhost.

  • The url is different every day or so because ngrok's free plan does not allow for a domain name. That being said, because there is no limit on the session duration, I will try to keep it on as much as possible but it will have to restart with a new url every other day or so.

  • The production version repository of this project is at this link


Test Contributors

Jake Pisanwarakul

Developer

Swayam Sahoo

Email: swayamsa01@gmail.com

About

Chess website with many different functionalities. Personal project

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published