Skip to content

Castrozan/clebr-chat

Repository files navigation

🚀 Frontend Chat Client

A modern frontend chat interface with comprehensive e2e testing using Playwright.

✨ Features

  • 💬 Interactive Chat Interface - Clean, modern UI with user/bot message distinction
  • 🌐 Static Frontend - Pure HTML/CSS/JavaScript implementation
  • 🔄 Live Reload - Automatic browser refresh during development
  • 🧪 E2E Testing - Comprehensive Playwright test suite for performance, security, and UX
  • Hot Reload - Automatic refresh during development

🚀 Quick Start

Prerequisites

  • Node.js (v18+)
  • Modern web browser

Development

Start the development environment:

npm run dev

This command will:

  • 🖥️ Start the chat interface at http://127.0.0.1:5500 with live reload
  • 🌐 Automatically open the chat in your browser

Available Scripts

npm run dev          # Start development server with live reload
npm run start        # Start the chat client (alias for dev)
npm test             # Run e2e tests
npm run test:all     # Run all test suites
npm run test:performance  # Run performance tests
npm run test:security     # Run security tests
npm run test:ux          # Run user experience tests

🏗️ Architecture

Frontend Chat Client (5500)
     ↓
 Live Server
 Static HTML/CSS/JS
 E2E Test Coverage

Components

  • Chat Client (chat.html) - Frontend interface with interactive chat functionality
  • E2E Tests (tests/) - Playwright test suite for performance, security, and UX validation

🧪 Testing

Run the comprehensive e2e test suite:

npm test

Test categories:

  • Performance Tests - Response time, load testing, consistency checks
  • Security Tests - Input validation, injection resistance, data protection
  • UX Tests - User experience, accessibility, interface responsiveness

Individual test suites:

npm run test:performance  # Performance and load tests
npm run test:security     # Security vulnerability tests  
npm run test:ux          # User experience tests
npm run test:all         # All tests combined

📁 Project Structure

chat-client/
├── chat.html              # Main chat interface
├── package.json           # Dependencies and scripts
├── playwright.config.js   # E2E test configuration
├── tests/
│   ├── performance/
│   │   └── performance.spec.js  # Performance tests
│   ├── security/
│   │   └── security.spec.js     # Security tests
│   ├── user-experience/
│   │   └── ux.spec.js          # UX tests
│   ├── run-all-tests.js        # Test runner
│   ├── run-performance-test.js # Performance test runner
│   ├── run-security-test.js    # Security test runner
│   ├── run-ux-test.js          # UX test runner
│   └── README.md               # Test documentation
└── README.md                   # This file

🔄 Development Workflow

  1. Start Development: npm run dev
  2. Make Changes: Edit chat.html
  3. See Changes: Browser auto-refreshes with live reload
  4. Test Changes: npm test to run e2e tests
  5. Deploy: Ready for production use

🚀 Production Deployment

For production deployment:

  1. Serve the chat.html file from any static web server
  2. Configure proper HTTPS for secure communication
  3. Set up proper CSP headers for security
  4. Run tests regularly to ensure quality

Happy coding! 🎉

About

clebr chat app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors