Commit graph

24 commits

Author SHA1 Message Date
839d68c20f
new file: src/frontend/contexts/MessagingContext.jsx 2026-02-05 15:17:56 +00:00
d4456915f0
modified: package-lock.json 2026-02-05 07:48:04 +00:00
de54903c15
new file: astro-site/src/components/auth/SupabaseLogin.jsx
new file:   astro-site/src/components/auth/SupabaseLogin.jsx
2026-02-03 09:09:36 +00:00
48f095c8ad
new file: src/backend/signaling-server/chat-schema.sql 2026-02-03 09:09:21 +00:00
fa1d0fcc70
Merge pull request #2 from AeThex-Corporation/claude/find-fix-bug-mkkscfv6hiao6uvi-LBUkV
Claude/find fix bug mkkscfv6hiao6uvi lb uk v
2026-01-18 23:43:32 -07:00
Claude
1dcb357313
Implement comprehensive fixes for remaining critical issues
This commit addresses the remaining high-priority issues identified in the
comprehensive codebase analysis, implementing proper notification systems,
error handling, input validation, and race condition fixes.

1. CRITICAL: Implement Stripe webhook notifications
   - Created new NotificationService for centralized notification handling
   - Supports both in-app notifications and email queuing
   - Implemented all 4 missing webhook notifications:
     * Subscription downgrade notifications
     * Payment success receipts
     * Payment failure alerts with recovery action
     * Trial ending reminders with days remaining calculation
   - Notifications stored in database and emitted via Socket.io
   - File: src/backend/services/notificationService.js (NEW)
   - Updated: src/backend/routes/webhooks/stripeWebhook.js

2. HIGH: Add comprehensive error handling to socket event handlers
   - Wrapped all socket event handlers in try-catch blocks
   - Emit error events back to clients when operations fail
   - Prevents server crashes from unhandled socket errors
   - Provides user feedback for failed socket operations
   - File: src/backend/services/socketService.js

3. HIGH: Fix race condition in Chat component
   - Added activeConversationRef to track current conversation
   - Check conversation ID before updating messages after async load
   - Clear messages immediately when switching conversations
   - Prevents stale messages from appearing when rapidly switching
   - File: src/frontend/components/Chat/Chat.jsx

4. HIGH: Add input validation to messaging service
   - Validate userId and conversationId are valid strings
   - Ensure message content is not empty and under 10K chars
   - Validate contentType against allowed types
   - Validate metadata structure
   - Provides clear error messages for invalid input
   - File: src/backend/services/messagingService.js

5. MEDIUM: Replace hardcoded URLs with environment variables
   - Updated AuthContext to use VITE_API_URL env variable
   - Maintains localhost fallback for development
   - File: src/frontend/contexts/AuthContext.jsx

6. Documentation: Update .env.example
   - Added FRONTEND_URL configuration
   - Documented ALLOW_DEV_BYPASS security flag
   - Added critical warnings for TURN server configuration
   - Added Stripe configuration variables
   - File: .env.example

These fixes significantly improve:
- User experience (notifications for all payment events)
- System reliability (proper error handling, race condition fixes)
- Security (input validation prevents malicious input)
- Maintainability (proper environment configuration)
2026-01-19 06:41:28 +00:00
Claude
13d926a9c5
Fix critical security vulnerabilities and array access bugs
This commit addresses multiple high-priority security and reliability issues
found during comprehensive codebase analysis:

1. CRITICAL: Remove hardcoded TURN server credentials
   - Removed dangerous default secret 'default-secret-change-me'
   - Now throws error if TURN_SECRET env var not set
   - Also requires TURN_SERVER_HOST and TURN_SERVER_PORT to be configured
   - Prevents attackers from generating valid TURN credentials
   - File: src/backend/services/callService.js

2. HIGH: Add array bounds checking before accessing database results
   - Added validation before accessing rows[0] in multiple locations
   - Prevents "Cannot read property of undefined" runtime crashes
   - Provides clear error messages when records not found
   - Files affected:
     - src/backend/services/callService.js (conversation lookup)
     - src/backend/services/messagingService.js (user lookup)
     - src/backend/services/gameforgeIntegration.js (integration & conversation creation)

3. HIGH: Secure development mode authentication bypass
   - Added second security layer requiring ALLOW_DEV_BYPASS='true'
   - Prevents accidental auth bypass if NODE_ENV accidentally set to 'development'
   - Added warning logs when bypass is active
   - File: src/backend/middleware/auth.js

These fixes prevent:
- TURN server abuse via known secrets
- Runtime crashes from missing database records
- Accidental authentication bypass in production environments
2026-01-19 06:38:10 +00:00
Claude
41b03b88d5
Fix silent error handling in message encryption
Previously, if encryption failed for any recipient, the error was only
logged to console and the code continued, resulting in a message being
sent that some recipients couldn't decrypt. This creates a security and
reliability issue.

Changes:
- Collect all failed encryption attempts instead of silently logging
- Throw an error if any recipient encryption fails
- Provide detailed error message listing number of failures
- Implement all-or-nothing approach to prevent partial message delivery

This ensures senders are notified immediately if message encryption
fails for any recipient, preventing silent security failures.
2026-01-19 06:31:02 +00:00
3218287c7e
Merge branch 'copilot/agreeable-beetle' 2026-01-19 05:26:21 +00:00
313b7d2518
modified: astro-site/src/components/mockup/ChatArea.jsx 2026-01-19 05:06:41 +00:00
5d43b21fce
Merge pull request #1 from AeThex-Corporation/copilot/agreeable-beetle
[WIP] Implement advanced voice, chat, and UX features for AeThex Connect
2026-01-18 19:52:03 -07:00
e6ab906dc0
Checkpoint from VS Code for coding agent session 2026-01-19 02:50:10 +00:00
ee8f78be8c
docs: Add comprehensive save point summary for session 2026-01-12 04:50:33 +00:00
3da5bc453d
feat: Complete dark gaming theme redesign for React frontend
- Updated all Chat component styles (Chat, MessageInput, MessageList, ConversationList)
- Replaced purple/pink gradients with cyan/green gaming theme
- Implemented glassmorphism effects with backdrop blur
- Updated message bubbles with gradient for own messages, dark glass for others
- Changed all light backgrounds to OLED-friendly pure black
- Added cyan glow effects and shadows throughout
- Installed react-router-dom dependency
- Updated Demo.css with full dark theme
- All components now match Astro landing site aesthetic
2026-01-12 04:47:53 +00:00
651cba733d
feat: Add sleek mobile-first design and Astro landing site
- Update design tokens with dark gaming theme (OLED-friendly)
  - Pure black backgrounds (#000000)
  - Cyan primary (#00d9ff) and neon green accent (#00ff88)
  - Glassmorphism effects and mobile-specific tokens

- Build complete React Native mobile app screens
  - HomeScreen: Chat list with dark cards and status indicators
  - MessagesScreen: Chat view with gradient bubbles and typing indicators
  - FriendsScreen: Friend list with online/offline sections and game presence
  - GamesScreen: GameForge projects with team channels
  - ProfileScreen: User profile with .aethex domain display
  - AppNavigator: Bottom tab navigation with glow effects

- Create Astro marketing landing site
  - Hero section with animated gradients and phone mockup
  - Features showcase (6 cards)
  - Pricing tiers (Free/Premium/Enterprise)
  - Download section for all platforms
  - Fully responsive dark theme

Design inspiration: BitChat, Root, Discord Dark, Telegram
Mobile-first approach with 48px touch targets and safe areas
2026-01-12 03:28:16 +00:00
5abfbb60f8
modified: README.md 2026-01-12 01:39:23 +00:00
c674d5304d
new file: packages/core/crypto/CryptoManager.ts 2026-01-10 16:30:05 +00:00
8c6341fb68
modified: .env.example 2026-01-10 08:00:59 +00:00
6dd4751ba9
Phase 4: Voice & Video Calls - Complete WebRTC Implementation
- Database schema: Extended calls/call_participants tables, added turn_credentials
- Backend: callService (390+ lines), 7 REST API endpoints, WebSocket signaling
- Frontend: WebRTC manager utility, Call React component with full UI
- Features: 1-on-1 calls, group calls, screen sharing, media controls
- Security: TURN credentials with HMAC-SHA1, 24-hour TTL
- Documentation: PHASE4-CALLS.md with complete setup guide
- Testing: Server running successfully with all routes loaded
2026-01-10 05:20:08 +00:00
659299c963
🐛 Fix: Correct database import paths in GameForge integration
- Fixed db module import path from '../db' to '../database/db'
- Applied to gameforgeIntegration.js and gameforgeRoutes.js
- Server now starts successfully with GameForge routes enabled
- Added IMPLEMENTATION-SUMMARY.md with complete Phase 3 overview
2026-01-10 05:00:18 +00:00
185e76c0c4
Phase 3: GameForge Integration - Auto-Provisioning & Role-Based Channels
🏗️ Database Schema
- Create gameforge_integrations table
- Add gameforge_project_id to conversations
- Create audit_logs table for operation tracking
- Add metadata and is_archived columns
- Implement indexes and triggers

🔧 Backend Services
- GameForgeIntegrationService (450+ lines)
  - Auto-provision projects and channels
  - Team member synchronization
  - Role-based permission enforcement
  - System notification delivery
  - Project archival management

🔐 Authentication & Security
- GameForge API key authentication
- HMAC-SHA256 signature validation
- Timestamp verification (5-minute window)
- Replay attack prevention
- Audit logging

🌐 API Endpoints (8 endpoints)
- POST /api/gameforge/projects - Provision project
- PATCH /api/gameforge/projects/:id/team - Update team
- DELETE /api/gameforge/projects/:id - Archive project
- GET /api/gameforge/projects/:id/channels - List channels
- POST /api/gameforge/projects/:id/channels - Create channel
- PATCH /api/gameforge/channels/:id - Update channel
- DELETE /api/gameforge/channels/:id - Delete channel
- POST /api/gameforge/projects/:id/notify - Send notification

🎨 Frontend Components
- GameForgeChat - Embedded chat container
- ChannelList - Channel navigation with icons
- ChannelView - Message display and input
- Responsive CSS with mobile support

📚 Documentation
- PHASE3-GAMEFORGE.md - Complete technical docs
- GAMEFORGE-EXAMPLES.md - Integration code samples
- API reference with request/response examples
- Testing guidelines and checklist

 Features
- Automatic channel provisioning on project creation
- Role-based channel permissions (dev, art, testing, etc.)
- System notifications (builds, commits, deployments)
- Team member sync with role updates
- Custom channel creation
- Project archival

📊 Stats
- 16 new files created
- 2 files updated
- ~2,750 lines of code
- 8 API endpoints
- 7 React components
2026-01-10 04:57:23 +00:00
cad2e81fc4
Phase 2: Complete Messaging System Implementation
- Added real-time messaging with Socket.io
- Created comprehensive database schema (8 tables, functions, triggers)
- Implemented messaging service with full CRUD operations
- Built Socket.io service for real-time communication
- Created React messaging components (Chat, ConversationList, MessageList, MessageInput)
- Added end-to-end encryption utilities (RSA + AES-256-GCM)
- Implemented 16 RESTful API endpoints
- Added typing indicators, presence tracking, reactions
- Created modern, responsive UI with animations
- Updated server with Socket.io integration
- Fixed auth middleware imports
- Added comprehensive documentation

Features:
- Direct and group conversations
- Real-time message delivery
- Message editing and deletion
- Emoji reactions
- Typing indicators
- Online/offline presence
- Read receipts
- User search
- File attachment support (endpoint ready)
- Client-side encryption utilities

Dependencies:
- socket.io ^4.7.5
- socket.io-client ^4.7.5
2026-01-10 04:45:07 +00:00
246a4ce5c1
Add domain verification feature - ready for integration into api.aethex.cloud 2026-01-10 03:30:15 +00:00
cef6bf1fea
Initial commit 2026-01-09 19:37:29 -07:00