https://github.com/mohammad-al-refai/tic-tac-toe-full-stack
Full stack end to end implementation of multiplayer online tic tac toe
https://github.com/mohammad-al-refai/tic-tac-toe-full-stack
kotlin react spring-boot typescript
Last synced: 3 months ago
JSON representation
Full stack end to end implementation of multiplayer online tic tac toe
- Host: GitHub
- URL: https://github.com/mohammad-al-refai/tic-tac-toe-full-stack
- Owner: Mohammad-Al-Refai
- Created: 2024-09-01T12:20:03.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-01-13T13:57:16.000Z (5 months ago)
- Last Synced: 2025-01-16T09:56:29.520Z (5 months ago)
- Topics: kotlin, react, spring-boot, typescript
- Language: Kotlin
- Homepage: https://tic-tac-toe-rmph.onrender.com
- Size: 742 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tic Tac Toe ✖️⭕
[demo](https://github.com/user-attachments/assets/82a60580-8c07-47bd-a76a-fdfd5e4ef3c5)
## Backend
### Tech Stack
* Language:
* [Kotlin](https://kotlinlang.org/)
* Build Tools:
* [Gradle](https://gradle.org)
* Database:
* [PostgreSQL](https://www.postgresql.org)
* [Postgres R2DBC Driver](https://mvnrepository.com/artifact/org.postgresql/r2dbc-postgresql)
* Framework:
* [Spring 6.x/Spring Boot 3.x](https://spring.io)
* [Spring Data R2DBC](https://spring.io/projects/spring-data-r2dbc)### Initialize database
* Create database with name `tic-tac-toe` then make sure it works on port 5432
- Set the PostgreSQL user name in `spring.r2dbc.username` and the password in `spring.r2dbc.password` in application.properties in the resource folder### Run project
```bash
./gradlew bootRun
```### Build
#### Docker
```bash
docker build -t tic-tac-toe . & docker-compose up
```#### Gradle
```bash
./gradlew build
```## Frontend
### Tech Stack
* Language:
* TypeScript
* Build Tools:
* Vite
* Framework:
* React### Install dependencies
```bash
yarn install
```### Run project
Make sure to change the URL in `frontend\src\game\gameViewModel.ts`
```
const WS = "ws://{your_device_ip}:8080/ws";
```Then Run:
```bash
yarn dev --host
```### Build
```bash
yarn build
```