diff --git a/server/README.md b/server/README.md index b26066e..5284d1c 100644 --- a/server/README.md +++ b/server/README.md @@ -34,5 +34,6 @@ npm start ## Security - **Rate Limiting**: IP-based connection limits and socket-based event limits. -- **Token Handshake**: Requires a valid token defined in `shared/constants.js`. +- **Token Handshake**: Requires a valid token defined in the root `shared/constants.js`. +- **Single Source of Truth**: The server imports constants directly from the root `shared/` directory. - **In-Memory**: Rooms are automatically pruned after 2 hours of inactivity. diff --git a/shared/README.md b/shared/README.md index 1736ae9..ccc1f68 100644 --- a/shared/README.md +++ b/shared/README.md @@ -4,7 +4,7 @@ This directory contains constants and protocol definitions used by both the exte ## Syncing with the Extension > [!IMPORTANT] -> Every time this file is modified, you must run `scripts/sync-constants.sh` to keep the extension's copy up to date. +> Every time this file is modified, you must run `node scripts/build-extension.js` to keep the extension's copy up to date. Because Chrome Extensions cannot load files outside their root directory, `constants.js` must be copied to `extension/shared/constants.js` whenever it is modified.