Skip to content

Commit a1cfeb3

Browse files
davidckimaqk
andauthored
Initial scaffolding for FE work (#47)
* Set up scaffolding for cal poker FE * Set up scaffolding for cal poker FE * Author FE tests, break out components and update readme instructions * dkim/gaming-fe: remove some boilerplate * Add missing index.html * Integrate walletconnect --------- Co-authored-by: Adam Kelly <[email protected]>
1 parent ad97541 commit a1cfeb3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+27285
-0
lines changed

resources/gaming-fe/.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

resources/gaming-fe/README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Cal Poker Game
2+
3+
## **Introduction**
4+
5+
Cal Poker is a simple real-time poker game where two players can connect, place wagers, and play turns against each other. The game uses Socket.IO for real-time communication between clients and the server.
6+
7+
## **Features**
8+
9+
- Real-time multiplayer gameplay
10+
- Simple betting system
11+
- Turn-based actions
12+
- Interactive UI with Material-UI components
13+
- Modular and maintainable codebase
14+
15+
## **Prerequisites**
16+
17+
- **Node.js**
18+
- **npm**
19+
- **TypeScript**
20+
21+
## **Setup**
22+
23+
1. **Install dependencies for the client:**
24+
```npm install```
25+
26+
2. **Starting the Server:**
27+
```node server.js```
28+
29+
3. **Start the React application:**
30+
```npm start```
31+
32+
The client will start on port 3000 by default and should open automatically in your default browser.
33+
34+
## **Usage**
35+
Open two browser windows or tabs:
36+
37+
Go to http://localhost:3000 in both.
38+
Enter a wager amount and find an opponent:
39+
40+
In both windows, enter a wager amount (e.g., 50) and click "Find an opponent".

resources/gaming-fe/jest.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "jsdom",
4+
moduleNameMapper: {
5+
"^socket.io-client$": "<rootDir>/__mocks__/socket.io-client.ts",
6+
},
7+
};

0 commit comments

Comments
 (0)