How keybittech/awayto-v3 works
Main Components Structure
a) Frontend Layer (TypeScript/React)
• 'ts' directory structure with key modules:
• Auth Module
• WebSocket Module
• Groups Module
• Services Module
• Forms Module
• Common Components
• Hooks system for state management
b) Backend Services
• Go API Server
• HTTP/REST endpoints
• WebSocket handlers
• Middleware components
• Authentication integration
• Java Authentication Service (Keycloak)
• Custom event listeners
• User registration
• Theme customization
c) Infrastructure Layer
• Database (PostgreSQL)
• Redis (for session management)
• TURN Server
• Static File Server (for landing page)
Connection Flows
• Client-Server communication (both REST and WebSocket)
• Authentication flows through Keycloak
• Database interactions
• WebSocket real-time communications
• File storage operations
Key Technical Elements to Highlight
• Blue rectangles: Core services (Go API, Keycloak, Database)
• Green rectangles: Frontend modules
• Yellow diamonds: Communication protocols (REST, WebSocket)
• Purple circles: Infrastructure components (Redis, TURN)
• Orange rectangles: Development/deployment tools
Specific Implementation Details
Important architectural features:
• Protocol Buffer definitions (proto directory)
• Database migration scripts structure
• Docker containerization setup
• Authentication flow with Keycloak
• WebSocket real-time communication system
• And role-based access control
Deployment Architecture
Containerized structure:
• Docker compose setup
• Service dependencies
• Network isolation
• Volume mounts
[Frontend Layer (React/TypeScript)]
• ↕ HTTP/WS
[API Gateway (Go)]
• ↕
• [Services Layer]
• [Auth Service (Keycloak)]
• [TURN Server]
• [Static File Server]
• ↕
[Data Layer]
• [PostgreSQL]
• [Redis]
Important Considerations:
1. Use clear separation between frontend modules while showing their interconnections through the hooks system