-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
114 lines (92 loc) · 2.31 KB
/
README
File metadata and controls
114 lines (92 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# iChess - Online Chess Platform
A real-time multiplayer chess platform built with React, Firebase, and TypeScript.
## Features
### Game Modes
- Single Player vs Computer (Multiple difficulty levels)
- Live Online Multiplayer
- Private Games with Friends
- Tournament System
### Tournament Features
- Swiss Tournament Format
- Real-time Tournament Brackets
- Live Game Viewing
- Tournament Chat
- Player Rankings
- Tournament Countdown Timer
### Game Features
- Real-time Chess Games
- Time Controls (Multiple formats)
- Move Validation
- Game Chat
- Premove Support
- Take Back Requests
- Draw Offers
- Player Statistics
### Social Features
- Global Chat
- User Profiles
- Rating System
- Game History
## Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- Firebase Account
## Installation
1. Clone the repository:
```bash
git clone https://github.com/Codeeaner/iChess.git
cd ichess
```
2. Install dependencies:
``` bash
npm install
```
3. Configure Firebase:
- Create a Firebase project
- Enable Authentication and Firestore
- Copy your Firebase config
- Create .env file:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
VITE_FIREBASE_APP_ID=your_app_id
## Running the Project
Development mode:
```bash
npm run dev
```
Build for production:
```bash
npm run build
```
## Project Structure
/src
/components # React components
/firebase # Firebase configuration
/hooks # Custom React hooks
/lib # Utility functions
/store # State management
/types # TypeScript types
/styles # CSS/Tailwind styles
## Key Components
- GameBoard: Chess board implementation
- GameLobby: Game mode selection
- TournamentLobby: Tournament management
- PrivateGame: Private game implementation
- Chat: Real-time chat system
- Stats: Player statistics
## Firebase Collections
- users: User profiles
- games: Active and completed games
- tournaments: Tournament data
- messages: Chat messages
## Contributing
- Fork the repository
- Create a feature branch
- Submit a pull request
## License
- Regarding to the license file
## Support
- Open an issue for bug reports or feature requests.