scar-chat7/PROGRESS.md
2025-12-07 12:00:44 -07:00

6.0 KiB

SCAR Chat - Development Progress

Project Overview

Cross-platform C++20 chat client with text messaging, video streaming, and screen sharing.


Feature Implementation Status

🔧 Foundation (Dependencies: None)

  • CMake Build System - Multi-target build configuration
  • Directory Structure - Organized client/server/shared architecture
  • Third-party Integration - Argon2, JWT-CPP, nlohmann/json via FetchContent
  • Protocol Types - Message format definitions and enums

🔐 Authentication & Security (Dependencies: Foundation)

  • Argon2 Wrapper - Password hashing with salt generation
  • JWT Implementation - Token generation and validation
  • Database Schema - SQLite3 user table with USERNAME, PASSWORD, SALT, TOKEN, STATUS, ROLE, EMAIL, LAST_LOGIN, AVATAR_PIC
  • Database Operations - User CRUD, credential verification
  • SSL Configuration - Certificate/key loading and validation

🖥️ Server Core (Dependencies: Authentication & Security)

  • Boost.ASIO Server - SSL-enabled async TCP server
  • Session Management - Per-connection session handling
  • Command-line Arguments - --db, --cert, --key options
  • Config Management - JSON + hardcoded defaults failover
  • Authentication Handler - Plain-text login → salt → argon2 verification
  • Database Initialization - Auto-create scarchat.db if missing

💬 Messaging System (Dependencies: Server Core)

  • Message Protocol - Text message format and routing
  • User List Broadcasting - Online status updates (basic)
  • Message Persistence - Chat history storage in client
  • Message Routing - Server-side message dispatch to recipients

🎥 Media Capture (Dependencies: Foundation)

  • [~] Pipewire Camera Integration - Linux camera feed capture (stub created)
  • [~] X11/Wayland Screen Capture - ffmpeg + libav integration (stub created)
  • [~] Hyprland Screen Capture - xdg-desktop-portal-hyprland + DBus (stub created)
  • [~] Windows Screen Capture - ffmpeg-based capture (stub created)
  • [~] DBus Portal Integration - Screen share permissions (stub created)

📡 Media Streaming (Dependencies: Media Capture, Server Core)

  • Video Stream Protocol - Real-time media packet format
  • Stream Server Handler - Server-side stream routing
  • Bandwidth Management - Adaptive quality/compression

🎨 Qt6 Client UI (Dependencies: Foundation)

  • Main Window - Discord-like dark theme layout with status bar
  • Login Dialog - Username/password input, server config
  • User List Widget - Online users with SC avatar placeholder
  • Chat Pane Widget - Message display, input, typing indicators
  • Video Grid Widget - Multi-stream grid layout (256 streams)
  • Status Bar - Connection status, user count, clock

🔌 Client Networking (Dependencies: Qt6 Client UI, Authentication)

  • Boost.ASIO Client - SSL connection to server
  • Config Persistence - $XDG_CONFIG_HOME/scarchat/client.json for username, server, port, JWT
  • Auto-reconnect - Exponential backoff reconnection

🗄️ Database Management (Dependencies: Database Operations, Authentication)

  • DBManager CLI Tool - User administration command-line utility
  • User Creation - adduser command with Argon2 hashing
  • User Deletion - deleteuser command
  • Password Modification - modifypass command with new salt
  • Avatar Management - modifyavatar command (binary blob)
  • Email/Role Updates - modifyemail, modifyrole commands
  • User Queries - fetch, search, list commands
  • Database Location - Auto-detection (local, install, home)
  • JWT Storage - Secure token persistence

🎬 Client Media Display (Dependencies: Client Networking, Media Streaming)

  • Video Decoder - Grid widget ready for streams
  • Grid Layout Manager - Dynamic grid resizing (basic done)
  • Stream Quality Selection - User-adjustable quality settings

📦 Packaging (Dependencies: All core features complete)

  • WiX Installer - "Scar Chat.msi" Windows installer template
  • Linux Binary Packaging - scarchat and scarchat-server installation
  • Android APK - Qt for Android build configuration

Build Status

  • Linux Debug Build (Ready to test - dependencies need installation)
  • Linux Release Build (Ready to test - dependencies need installation)
  • Windows Debug Build (Ready to test - dependencies need installation)
  • Windows Release Build (Ready to test - dependencies need installation)
  • Android Build (CMake configured, needs Qt for Android)

Testing Status

  • Unit Tests - Authentication (Framework ready, tests TBD)
  • Unit Tests - Database (Framework ready, tests TBD)
  • Unit Tests - Message Protocol (Framework ready, tests TBD)
  • Integration Tests - Client-Server Communication (Manual testing possible)
  • Integration Tests - Media Streaming (Awaiting media implementation)

Current Phase: Core Implementation Complete - Media Capture Next

Implementation Summary:

  • Complete server with SSL, authentication, database, messaging
  • Complete Qt6 client with dark theme, chat, user list, status bar
  • Networking with reconnect backoff and JWT sessions
  • Windows installer template
  • 🔄 Media capture stubs (Pipewire/FFmpeg/Portal integration needed)
  • 🔄 Video streaming protocol (message types defined, handler needed)

Next Steps:

  1. Install dependencies and test build on Linux/Windows
  2. Generate SSL certificates for testing
  3. Implement Pipewire camera capture
  4. Implement screen capture backends (X11/Wayland/Windows)
  5. Add video stream message types and server routing
  6. Test end-to-end video streaming

Last Updated: 2025-12-07