From 332bfd8d52e1b965c02f31693c35ae65a545caa5 Mon Sep 17 00:00:00 2001 From: Alexander Zinn Date: Fri, 5 Sep 2025 23:47:11 -0400 Subject: [PATCH] Add README --- README.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c894e50 --- /dev/null +++ b/README.md @@ -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 \ No newline at end of file