# TL-RTC-APP Real-time IM application with chat channels, audio/video calls, file sharing, and admin management. For Chinese documentation, see [README_ZH.md](README_ZH.md). ## Requirements - Node.js 16+ - npm - MySQL 5.7+ - Redis 4.0+ ## Quick Start 1. Install dependencies: ```bash npm install ``` 2. Start in HTTP mode: ```bash npm run http ``` 3. Or start in HTTPS mode (recommended for media features): ```bash npm run https ``` 4. Build frontend resources: ```bash npx gulp default ``` 5. Open app URLs: - App: `http://localhost:9096` (or `https://localhost:9096`) - Admin: `http://localhost:9098/system.html` (or `https://localhost:9098/system.html`) ## Session Summary (2026-05-02) This section summarizes the major changes completed in this working session. ### Functional Changes - Removed shared clipboard module from backend, frontend, routing, permissions, tables, services, and build assets. - Updated SSO subject handling to pass through all `subject_type` values directly. - Ensured subject users always create/join main channels during SSO flow. ### Data Model and DB Fixes - Updated `tl_channel.store_type` from integer-based logic to string-based subject type support. - Fixed friend channel initialization failure caused by `storeType` type mismatch in channel service. - Restored `tl_user.sso_id` to `BIGINT(20) UNSIGNED` and aligned service defaults back to numeric behavior. - Cleaned incompatible `sso_id` values before schema restore where necessary. ### Frontend and Media Stability - Fixed `getUserMedia` legacy compatibility by normalizing old APIs to Promise-based behavior. - Added clearer media error messages (`NotAllowedError`, `NotFoundError`, `NotReadableError`, `SecurityError`, unsupported browser). - Added pre-check for available `audioinput` devices to avoid direct runtime `NotFoundError` surprises. ### Runtime and Deployment Notes - Rebuilt both product and admin frontend bundles after changes: - `npx gulp web` - `npx gulp system` - Resolved HTTPS startup failure (`ERR_SSL_EE_KEY_TOO_SMALL`) by replacing weak cert/key with stronger local cert material. - Diagnosed Windows "flashing cmd" symptom as PM2 process restart loops; resolved by fixing startup-time data/type issues. ### Git and Remote - Updated remote to private Git server via SSH and successfully pushed `main`. ## License MIT. See [LICENSE](LICENSE). ## Disclaimer See [DISCLAIMER.md](DISCLAIMER.md).