42 lines
1.0 KiB
Markdown
42 lines
1.0 KiB
Markdown
# NowChess Frontend
|
|
|
|
Angular 20 frontend for the NowChess board UI.
|
|
|
|
## Tech stack
|
|
|
|
- Angular standalone components and route-based pages
|
|
- HTTP and streaming integration for live game updates
|
|
- Asset sprites loaded from `arabian-chess/`
|
|
|
|
## Project structure
|
|
|
|
- `src/app/pages` page-level containers (`welcome`, `game`)
|
|
- `src/app/components` reusable UI pieces (`chess-board`, `chess-piece`)
|
|
- `src/app/services` API and stream integration (`GameApiService`)
|
|
- `src/app/models` shared API/domain types
|
|
- `src/app/core/chess` chess domain utilities (FEN parsing and square lookup)
|
|
- `src/environments` environment-specific API base URLs
|
|
|
|
## Run locally
|
|
|
|
```bash
|
|
npm install
|
|
npm start
|
|
```
|
|
|
|
Open `http://localhost:4200`.
|
|
|
|
Development environment defaults to:
|
|
|
|
- API: `http://localhost:8080`
|
|
- WebSocket: `ws://localhost:8080`
|
|
|
|
`src/environments/environment.ts` is production-oriented (`production: true`) and `src/environments/environment.development.ts` is development-oriented (`production: false`).
|
|
|
|
## Build and test
|
|
|
|
```bash
|
|
npm run build
|
|
npm test
|
|
```
|