Giter Club home page Giter Club logo

chesspecker's Introduction


chesspecker logo


chesspecker, open-source app to practice chess!

LINTER

Discord

Join us to discuss issues and ideas: on discord.

Run in local

Create a new .env file

cp .env.example .env

After launching docker on your machine, build the images with:

docker-compose up -d --build

Finally, connect to the docker container and populate the database:

docker exec -it mongo /bin/sh
mongorestore dump --gzip

Navigate to http://localhost:3000

And happy coding!

When you're done

docker-compose down

chesspecker's People

Contributors

henribruvier avatar pnodet avatar thelapinmalin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chesspecker's Issues

Add i18n to translate website easily

Describe the feature you'd like to request

Adding i18n would allow collaborators to easily translate the site into different languages

Describe alternatives you've considered

No response

Clean API backend

Move the backend from the old express repository to nextjs api routes

Design footer

Add styling to the footer.

Items:

  • Github
  • Sponsor page
  • Discord

Rewards mechanisms

Reward user progression

Would be cool to encourage users to keep training and to improve their tactical skills.

  • #8
  • #9
  • Notifications?

Authentication middleware

Improve the authentication system

Using the session we could check if user is already login
We could also some basic routes protection

Running timer when auto-move disabled

If auto-move is disabled, when a puzzle is completed the app waits for the user to click on "next puzzle" to change the puzzle.
However the timer keeps running while the user is not playing.

Auto play disable on navigators

Some navigators don't allow auto play by default.
When playing a set the first move is always from the computer and it's sound is considered as auto play.

To trick the navigator one way would be to play a sound when the user clicks on a button, for example on entering the site in the success login page.

Only drawback is if some users skip this page and go straight to the playing page.

Dashboard page: visualize puzzle set data

Display the user progression for each puzzle set

Puzzle set state

  • Number of times you completed this puzzle set
  • Total average grade (convert number to letters? ie: 6 is A... 1 is F)
  • Total time spent on this puzzle set

Global progression

  • Last total time spent compared to first or average time spent
  • Last total average grade compared to first or average average grade

Current progression

  • Progress (number of puzzle solved / total number of puzzles)
  • Time spent since the start of this run
  • ETA to complete the puzzle set
  • Average grade for this run.
  • Are you on your way to a new best score? (new best average grade?)

Detailed puzzle state

  • List of each puzzle with it's average grade
  • On click allow user to re-play this puzzle

Create documentation

Describe the feature you'd like to request

Creating a list of all params needed and response type of each backend route would make contributing easier.

It would also be a first step towards opening a public api for other devs.

Describe the solution you'd like

We could add a docs folder in the repo.

We could host it on GitHub pages by creating a sub domain (ie: docs.chesspecker.com)

Describe alternatives you've considered

No response

handle leave, start and restart

  • Start (we don't do it for now, I don't think it is a good UX)
  • Leave button
  • Handle restart

On restart maybe redirect to a custom "Good job!" page with a button to play again or view in the dashboard (or switch to spaced-repetition one-day)

Deactivating Spaced Repetition prevents puzzles from loading

Describe the Bug

Puzzles do not load after deactivation

Expected Behavior

Puzzles should be available

To Reproduce

  1. Do a series of puzzles
  2. Enable Spaced Repetition
  3. Continue working on the puzzles
  4. Deactivate
  5. Load puzzles - nothing loads

image
Click on Play and no puzzles are available
image

Puzzles were loading previously, i.e. up until I decided to see what would happen if I deactivated
image

What browser are you using? (if relevant)

No response

Responsive UI

Make the UI mobile-friendly. It's mostly css tweaking.
Some exceptions as:

  • the set creation process, maybe it should be on three different pages on mobile

Trophies system

Let's create a trophy system!

We would need to:

  • Create a list of collectible trophies
  • Design the trophies
  • #10
  • On puzzle completion, check if user should receive a trophy?
  • Add a nice animation when rewarded
  • Add a page to see all trophies (colored when obtained, gray-ed otherwise)

All puzzles graded F in the dashboard

Describe the Bug

Although I got all type of grades when solving the puzzles the dashboard page shows grades F for all the puzzles. This is for summary and average grade the same issue. Also the „last time“ entry shows „infinity%“

Expected Behavior

Should list the grades of the previous puzzles correctly and should show the correct time for the last trial.

To Reproduce

My lichesss name is evierefuenf. Check out the sets „normal“ and „test“ if you can.

What browser are you using? (if relevant)

Chrome

handle KeyPress

Return to dashboard on 'q' or escape
Move to next puzzle aka skip on 's'

Add custom data

Feature suggestion: Many times, users wants to build their own cards with comments/themes for that specific puzzle card. This can help to build huge knowledge over a period of time. This is just like the way the great chess coach Dvoretsky use to maintain thematic cards! So, please check if such feature to allow user to build his own data set can be provided. Thanks.

Originally posted by @gopsbits in https://github.com/chesspecker/feedback/discussions/1#discussioncomment-2412467

Improve collected puzzles' data

Currently we don't save much data on each puzzle completion. In order to display a propre dashboard and to keep track of users' progression, we need to process and save more data.

In a PuzzleSet, each puzzle should have:

  • count – number of time the puzzle was completed.
  • timeTaken[] – number of seconds spent for each puzzle completion.
  • mistakes[] – number of mistakes for each puzzle completion.
  • grades[] – grade for each puzzle completion.

Grades are calculated between 1 and 5.

1: User could not find the solution (used the cheat button or solved the puzzle with 3 or more mistakes)
2: User is having a hard time (completion with 1 or 2 mistakes)
3: User is stumbling (completion with no mistakes OR with 1 mistake and under 20 seconds)
4: User can solve this problem (completion with no mistakes and under 20 seconds)
5: User easily solves this problem (completion with no mistakes and under 6 seconds)
6: User mastered this puzzle (completion 3 times in row with a 5 grade)

Webpack 5 doesn't compile chessgound

On nextjs build, webpack fails to compile throwing:

error - Error [ERR_MODULE_NOT_FOUND]:
Cannot find module chesspecker/node_modules/chessground/util
imported from chesspecker/node_modules/chessground/autoPieces.js

and warning:

[DEP0151] DeprecationWarning:
No "main" or "exports" field defined in the package.json for chesspecker/node_modules/chessground/
resolving the main entry point "index.js",
imported from chesspecker/.next/server/pages/play/[id].js.
Default "index" lookups for the main are deprecated for ES modules.

Related to lichess-org/chessground#213

Experience system

To improve Chesspecker gamification we could add experience and levels

On each completion puzzle are graded and user receives experience points accordingly.
On puzzle set completion, user receives a bonus according to the average grade.
On trophies, user receives a bonus.

User moves to superior level when he has the needed amount of points.

Links to in order to support/sponsor you are broken or not yet implemented.

Describe the Bug

Selecting any of the buttons on https://www.chesspecker.com/sponsor does not lead to a possibility to donate to your project. Here function Bf() seems not to be implemented, yet. Similarly, https://github.com/support/chesspecker is not the page I am looking for.

Expected Behavior

I get a possibility to sent you some money.

To Reproduce

Visit the websites and click the buttons and links.

What browser are you using? (if relevant)

Firefox Version 101.0.1 (64-bit) on Fedora Linux

Typo

Describe the Bug

Typo in the spelling of "seconds"

image

Expected Behavior

Should be "seconds" not "secondes"

To Reproduce

image

What browser are you using? (if relevant)

No response

Need a better Chess board with co-ordinates

Describe the feature you'd like to request

Currently, do not see the co-ordinates of the chess board. Need to have a better chessboard.
Please keep options for users to select the board and pieces from usability point of view.

Describe alternatives you've considered

No response

Make it easier to contribute (dockerfile ?)

Describe the feature you'd like to request

I would like to contribute on my free time but there is no easy step to be able to build the project in a working state (I can launch it but it will crash as soon as I try to connect because env variable are missing). A dockerfile would be a cool nice to have for this project (create mongoose and project in one command). There is also no documentation about the env variable required to launch the project so it's a bit disturbing when you try to launch it for the first time. (I want to fix the arrow on the board that disappear after a new render I guess).

I can do the dockerfile but I'll need the default env variable to try everything

Describe alternatives you've considered

No response

Easy fix - typo in Spaced Repetition Pop Up

Describe the Bug

image

Expected Behavior

Small spelling error "Desactivate" should be "Deactivate"

To Reproduce

Turning "Spaced Repetition" off

What browser are you using? (if relevant)

No response

Failing restoring with mongorestore dump

Describe the Bug

Running mongorestore dump inside the docker image returns :

Failed: chesspecker.puzzles: error restoring from dump/chesspecker/puzzles.bson: reading bson input: invalid BSONSize: 1936876918 bytes

Expected Behavior

Restore the db.

To Reproduce

Follow Readme installation guide.

What browser are you using? (if relevant)

Mozzila (latest)

Prevent multiple re-renders

The timer causes the playing page to re-render. Which causes the chessboard to re-render every second, making drawing arrows impossible.

Two promotions available

Describe the Bug

I was solving a problem where two of my pawns could promote.

I played d8=Q, the problem went on.

Then the solution was c8c5, meaning that the correct move in that particular problem was c8=Q.

Expected Behavior

The problem does not continue when the wrong promotion is played.

To Reproduce

Find a problem with two promotions available when one of them is the right answer.
Try to play the wrong promotion.

What browser are you using? (if relevant)

No response

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.