Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d35ff38
Create proposal.md
CraftSteamDev Sep 28, 2022
b5eef4f
Update proposal.md
CraftSteamDev Sep 28, 2022
689a47a
Update proposal.md
CraftSteamDev Sep 28, 2022
9b41573
Project Init
invalid-email-address Oct 2, 2022
2e66d59
changed webpack config
CraftSteamDev Oct 2, 2022
9e8c620
added simple board and pieces and backend start
invalid-email-address Oct 2, 2022
6eb6544
updates
invalid-email-address Oct 3, 2022
18365d6
more progress on board
invalid-email-address Oct 3, 2022
1940a11
WORKING CHESS BOARD!
invalid-email-address Oct 4, 2022
5fb8d52
remove some stuff
invalid-email-address Oct 4, 2022
9f7245c
pickup effect
invalid-email-address Oct 4, 2022
748510c
Added game viewer, server communication
invalid-email-address Oct 4, 2022
055aa3c
Added navbar, simple authentication, remove .env
Oct 6, 2022
71e1014
Simple authentication, added navbar, remove .env
Oct 6, 2022
4f2a03a
Refactoring
CraftSteamDev Oct 6, 2022
b96583d
Added play as black, starting on other tabs
Oct 10, 2022
051e6d4
remove some files
CraftSteamDev Oct 10, 2022
39ae8ad
remove some files
CraftSteamDev Oct 10, 2022
641e0cb
added centering
CraftSteamDev Oct 10, 2022
285edfd
commit!
CraftSteamDev Oct 10, 2022
44beb93
commit
CraftSteamDev Oct 10, 2022
de01827
added engine strengths
CraftSteamDev Oct 10, 2022
3d56e2d
committing bc its been too long since the last commit
CraftSteamDev Oct 12, 2022
fe52142
finishing up
CraftSteamDev Oct 14, 2022
5eb609a
change server
CraftSteamDev Oct 14, 2022
780585a
change server
CraftSteamDev Oct 14, 2022
59fd8d6
login
CraftSteamDev Oct 14, 2022
65a1b94
readme
CraftSteamDev Oct 14, 2022
c3ae71e
update readme
CraftSteamDev Oct 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
engines
.cache/
coverage/
dist/*
!dist/index.html
node_modules/
*.log
build/*
package-lock.json
.idea/*
yarn.lock

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.env
57 changes: 15 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,22 @@
# Final Project
*Due before the start of class, October 13th (final day of the term)*
#WebChess: https://webware.craftsteamg.com/

For your final project, you'll implement a web application that exhibits understanding of the course materials.
This project should provide an opportunity to both be creative and to pursue individual research and learning goals.
WebChess was created by Cooper Dean, Harrison Rubin, Zachary Sarrett and Henry Yoder.

## General description
Your project should consist of a complete Web application, exhibiting facets of the three main sections of the course material:
1. WebChess is a chess website where a user can play chess against both StockFish and Komodo, two chess engines. Webchess allows the user to decide which bot they want to play against, what difficulty level they want the computer to be, and which color they want to play as. The user can look at the stats page to see their stats, including total games played, which engine they have played against most, their wins, draws and losses against each engine, and the average difficulty of each bot they play against.
In the game history tab, the user can see every game they have previously played, and look through them move by move.

- Static web page content and design. You should have a project that is accessible, easily navigable, and features significant content.
- Dynamic behavior implemented with JavaScript (TypeScript is also allowed if your group wants to explore it).
- Server-side programming *using Node.js*. Typically this will take the form of some sort of persistent data (database), authentication, and possibly server-side computation.
- A video (less than five minutes) where each group member explains some aspect of the project. An easy way to produce this video is for you all the groups members to join a Zoom call that is recorded; each member can share their screen when they discuss the project or one member can "drive" the interface while other members narrate (this second option will probably work better.) The video should be posted on YouTube or some other accessible video hosting service. Make sure your video is less than five minutes, but long enough to successfully explain your project and show it in action. There is no minimum video length.
2. In order to login, you must login through Github.

## Project ideation
Excellent projects typically serve someone/some group; for this assignment you need to define your users and stakeholders. I encourage you to identify projects that will have impact, either artistically, politically, or in terms of productivity.
3. We used React, React-Bootstrap, Express, Node, MongoDB, ChartJS, PGN parsers, and chess engines. We used React-Bootstrap for designing the interface and the website in general. We used PGN (Portable Game Notation) Parsers to parse through the chess moves. The chess engines we implemented were StockFish(https://stockfishchess.org/) and Komodo(https://komodochess.com/). We used ChartJS for the pie charts.

### Deliverables
4. Challenges:
- We had trouble getting the stats page to sync up with the user's games.
- The game history buttons for next and previous were difficult to get working

#### Form Team (due 9/25)
Students are will work in teams of 3-5 students for the project; teams of two can be approved with the permission of the instructor. Working in teams should help enable you to build a good project in a limited amount of time. Use the `#project-logistics` channel in Discord to pitch ideas for final projects and/or find fellow team members as needed.
5. Contributions:
- Cooper: Cooper connected the endpoints to the server and client side, and did helped get the stats page synced and the game history page working.
- Harry: Harry did the majority of the backend work, as well as drawing the main chess board / moving pieces.
- Zach: Zach worked on some of the client side logic, including the logic for getting a result/finishing a game (win, draw, loss), as well as writing the about page, and helping Cooper with the endpoints.
- Henry: Henry did a lot of interface work on the front end, making the website look good.

Teams must be in place by end of day on Sunday, September 25th. If you have not identified a team at this point, you will be assigned a team. You will be given some class time on Monday to work on your proposal, but please plan on reserving additional time outside of class as needed.

#### Proposal (due 9/27)
Provide an outline of your project direction and the names of associated team members.
The outline should have enough detail so that staff can determine if it meets the minimum expectations, or if it goes too far to be reasonable by the deadline. Please include a general description of a project, and list of key technologies/libraries you plan on using (e.g. React, Three.js, Svelte, TypeScript etc.). Two to four paragraps should provide enough level of detail. Name the file proposal.md and submit a pull request by Tuesday, September 27th at 11:59 PM (end of day). Only one pull request is required per team.

There are no other scheduled checkpoints for your project.

#### Turning in Your Project
Submit a second PR on the final project repo to turn in your app and code. Again, only one pull request per team.

Deploy your app, in the form of a webpage, to Glitch/Heroku/Digital Ocean or some other service; it is critical that the application functions correctly wherever you post it.

The README for your second pull request doesn’t need to be a formal report, but it should contain:

1. A brief description of what you created, and a link to the project itself (two paragraphs of text)
2. Any additional instructions that might be needed to fully use your project (login information etc.)
3. An outline of the technologies you used and how you used them.
4. What challenges you faced in completing the project.
5. What each group member was responsible for designing / developing.
6. A link to your project video.

Think of 1,3, and 4 in particular in a similar vein to the design / tech achievements for A1—A4… make a case for why what you did was challenging and why your implementation deserves a grade of 100%.

## FAQs

- **Can I use XYZ framework?** You can use any web-based frameworks or tools available, but for your server programming you need to use Node.js. Your client-side scripting language should be either JavaScript or TypeScript.
6. Link to the video: https://www.youtube.com/watch?v=BY2wCf78UjA&ab_channel=henryyoder
75 changes: 75 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"name": "webware-final-project",
"version": "0.1.0",
"private": true,
"dependencies": {
"@chess-fu/fen-parser": "^1.1.4",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"body-parser": "^1.20.0",
"bootstrap": "^5.2.2",
"chart": "^0.1.2",
"chart.js": "^3.9.1",
"chess-creator": "^1.0.1",
"chess-node": "^1.1.0",
"chess-pgn": "^0.1.10",
"chessops": "^0.12.5",
"connect-ensure-login": "^0.1.1",
"cors": "^2.8.5",
"d3": "^7.6.1",
"d3-collection": "^1.0.7",
"dotenv": "^16.0.3",
"express": "^4.18.1",
"express-session": "^1.17.3",
"js-cookie": "^3.0.1",
"konva": "^8.3.12",
"mongoose": "^6.6.5",
"node-uci": "^1.3.4",
"passport": "^0.6.0",
"passport-github": "^1.1.0",
"passport-local": "^1.0.0",
"pgn-parser": "^2.2.0",
"react": "^18.2.0",
"react-bootstrap": "^2.5.0",
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
"react-konva": "^18.2.2",
"react-router-bootstrap": "^0.26.2",
"react-router-dom": "^6.4.2",
"react-scripts": "5.0.1",
"serve-favicon": "^2.5.0",
"use-image": "^1.1.0",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"prettier": {
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
}
16 changes: 16 additions & 0 deletions proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Team Members: Harrison Rubin, Cooper Dean, Henry Yoder, Zachary Sarrett

Final Project Idea:

Play chess against StockFish. The WebApp will host a chessboard where the user plays a game against a computer. Game state will be saved to the user's account. The backend receives the position from the from end, then provides back the best move according to the engine.

Technologies:
- Express
- We are thinking about using react, not sure yet.
- MongoDB


Some thing that we might include:
- Difficulty slider
- Game Replays
- Save previous games
Binary file added public/favicon.ico
Binary file not shown.
26 changes: 26 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Battle Chess Bots Online - Webware 22 Final Project"
/>
<title>WebChess</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor"
crossorigin="anonymous"
/>
<script defer="defer" src="/static/js/main.886b8cc0.js"></script>
<link href="/static/css/main.4c6bd8f0.css" rel="stylesheet" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>

27 changes: 27 additions & 0 deletions public/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Log in with GitHub!</title>
</head>
<body style="background-color: rgb(248, 179, 202)">
<div
style="
position: absolute;
top: 30vh;
left: 50vw;
transform: translate(-50%, -50%);
text-align: center;
"
>
<h1 style="font-family: sans-serif">WebChess</h1>
<button
onclick="window.location.href='/auth'"
style="width: 20vw; height: 4vh"
>
Log in with GitHub
</button>
</div>
</body>
</html>
62 changes: 62 additions & 0 deletions public/pieces/DrewImage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions public/pieces/LoseImage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading