Skip to content

Kennethlee83/WeADRedflag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

WeAD RedFlag - AI Psychological Safety Monitor

License: Proprietary Node.js Express.js

๐Ÿšจ Overview

WeAD RedFlag is an AI-powered psychological safety monitoring platform that uses advanced AI models to analyze conversations and detect potential mental health concerns in real-time.

Key Features

  • ๐Ÿค– AI-Powered Analysis - Advanced natural language processing
  • ๐Ÿ”ด Real-Time Monitoring - Instant red flag detection
  • ๐Ÿ’ฌ WebSocket Communication - Real-time chat analysis
  • ๐Ÿ”’ Privacy-First - Secure, encrypted conversations
  • ๐Ÿ“Š Risk Assessment - Multi-level severity scoring
  • ๐ŸŒ Mobile Optimized - Works on all devices
  • ๐Ÿ” Enterprise Security - JWT authentication, rate limiting

๐Ÿ—๏ธ Architecture

Backend (Node.js + Express)

  • Framework: Express.js 5.1
  • WebSocket: Real-time communication with ws
  • Security: Helmet, CORS, rate limiting
  • AI Integration: Multiple AI model support
  • Authentication: JWT-based auth system

Frontend

  • HTML5/CSS3/JavaScript - Modern responsive design
  • WebSocket Client - Real-time updates
  • Mobile-First: Optimized for mobile devices

๐Ÿ“ฆ Installation

Prerequisites

# System requirements
- Node.js 18+
- npm 8+

Clone Repository

git clone https://github.com/Kennethlee83/WeADRedflag.git
cd WeADRedflag

Setup

# Install dependencies
npm install

# Copy configuration template
cp config.example.js config.js

# Edit config.js with your API keys
nano config.js

Run Application

# Development mode
npm run dev

# Production mode
npm start

# Using PM2 (recommended for production)
npm run pm2:start

๐Ÿ”‘ Configuration

Setup Your API Keys

Create config.js from config.example.js and add:

ai: {
    claude: {
        apiKey: 'your_claude_api_key',
        model: 'claude-sonnet-4-20250514'
    },
    anthropic: {
        apiKey: 'your_anthropic_api_key'
    },
    openai: {
        apiKey: 'your_openai_api_key'
    }
}

โš ๏ธ CRITICAL: Never commit config.js to Git! Keep your API keys secret.

๐ŸŽฎ Usage

For End Users

  1. Access Platform

    • Navigate to the application URL
    • Accept terms and conditions
  2. Start Conversation

    • Type messages in the chat interface
    • AI analyzes content in real-time
  3. AI Analysis

    • System monitors for concerning patterns
    • Provides real-time feedback
    • Offers support resources

For Administrators

  1. Monitor Sessions

    • View active sessions
    • Review flagged conversations
    • Access analytics dashboard
  2. Configure Settings

    • Adjust sensitivity levels
    • Manage user access
    • Configure rate limits

๐Ÿ”’ Security Features

Enterprise-Grade Security

  • Helmet.js - Security headers
  • Rate Limiting - API abuse prevention
  • Slow Down - DDoS protection
  • JWT Authentication - Secure sessions
  • CORS Protection - Cross-origin security
  • bcrypt Hashing - Password security
  • SSL/TLS - Encrypted connections

Privacy Protection

  • No Data Retention - Sessions are temporary
  • Encrypted Communication - End-to-end encryption
  • Anonymous Analysis - No personal data stored
  • GDPR Compliant - Privacy by design

๐Ÿ“Š Technical Stack

Backend

  • Express.js 5.1 - Web framework
  • WebSocket (ws) - Real-time communication
  • AI Integration - Multiple AI providers
  • JWT - Authentication
  • bcryptjs - Password hashing

Security

  • helmet - Security headers
  • express-rate-limit - Rate limiting
  • express-slow-down - DDoS protection
  • CORS - Cross-origin protection

Performance

  • compression - Response compression
  • PM2 - Process management
  • fs-extra - Enhanced file operations

๐Ÿ—บ๏ธ Roadmap

Q4 2025

  • AI analysis integration
  • Real-time monitoring system
  • Mobile optimization
  • Public launch

Q1 2026

  • Multi-language support
  • Enhanced AI models
  • Analytics dashboard
  • API for third parties

Q2 2026

  • Blockchain integration
  • Decentralized storage
  • Token-based access
  • Community features

๐Ÿ”ง Development

Running Locally

# Install dependencies
npm install

# Start development server
npm run dev

# Access at http://localhost:3001

Production Deployment

# Build for production
npm run build

# Start with PM2
npm run pm2:start

# Monitor
npm run pm2:monit

๐Ÿ“ API Documentation

WebSocket Events

// Connect to WebSocket
const ws = new WebSocket('wss://your-domain.com');

// Send message for analysis
ws.send(JSON.stringify({
    type: 'analyze',
    message: 'user message here'
}));

// Receive analysis
ws.onmessage = (event) => {
    const data = JSON.parse(event.data);
    console.log('AI Analysis:', data);
};

๐Ÿงช Testing

# Run test suite
npm test

# Security penetration test
node test-security-penetration.js

# Mobile optimization test
node test-mobile.html

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines.

๐Ÿ”’ Security

  • AI-powered content analysis
  • Real-time threat detection
  • Secure WebSocket connections
  • Rate-limited API access

Found a security issue? Please email security@wead.io

๐Ÿ“„ License

This project is proprietary and confidential. The code is made publicly visible for verification purposes only.

All Rights Reserved - Unauthorized use, copying, modification, or distribution is strictly prohibited.

For commercial licensing inquiries: licensing@wead.io

See the LICENSE file for complete terms and conditions.

๐Ÿ“ž Contact

๐Ÿ™ Acknowledgments

  • AI Providers - For advanced language models
  • Node.js Community - For excellent tools
  • Our Users - For trusting us with sensitive conversations

Built with โค๏ธ by the WeAD Team

AI-powered psychological safety monitoring

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors