Compare commits
1 Commits
d8fe4a9dc6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 332bfd8d52 |
79
README.md
Normal file
79
README.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# Chatrooms
|
||||
|
||||
A collection of chatting rooms built with WebSocket technology.
|
||||
|
||||
## Overview
|
||||
|
||||
This project consists of a WebSocket server and web frontend for real-time chat functionality. The server implements a custom WebSocket protocol, and the frontend provides a simple web interface for connecting to chat rooms.
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
chatrooms/
|
||||
├── server/ # WebSocket server implementation
|
||||
│ └── src/
|
||||
│ ├── net/ # Network layer and WebSocket implementation
|
||||
│ └── index.ts # Server entry point
|
||||
├── frontend/web/ # Web frontend
|
||||
│ └── src/
|
||||
│ ├── main.ts # Frontend WebSocket client
|
||||
│ └── style.css # Styles
|
||||
└── package.json # Root workspace configuration
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
- **Server**: Node.js TypeScript server with custom WebSocket implementation
|
||||
- **Frontend**: Vanilla TypeScript web client using Vite for development
|
||||
- **Workspace**: Managed as npm workspaces for monorepo development
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Node.js (version specified in `.nvmrc`)
|
||||
- npm
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Start the server
|
||||
```bash
|
||||
npm run dev:server
|
||||
```
|
||||
|
||||
The server will start on port 3000.
|
||||
|
||||
### Start the web frontend
|
||||
```bash
|
||||
npm run dev:web
|
||||
```
|
||||
|
||||
### Linting
|
||||
|
||||
```bash
|
||||
# Lint server code
|
||||
npm run lint:server
|
||||
|
||||
# Lint and fix server code
|
||||
npm run lint:fix:server
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Custom WebSocket server implementation
|
||||
- Real-time bidirectional communication
|
||||
- Connection management with keep-alive
|
||||
- TypeScript throughout the stack
|
||||
- Development tools with hot reload
|
||||
|
||||
## Author
|
||||
|
||||
Alexander Zinn
|
||||
|
||||
## License
|
||||
|
||||
ISC
|
||||
Reference in New Issue
Block a user