websocket_sdk Free
WebSocket client abstraction with dart:io or Phoenix implementation.
Version: 1.0.0
Variables
| Variable | Type | Default | Description |
|---|---|---|---|
| appName | string | — | The name of your application |
| websocketLibrary | enum (dart, phoenix) | dart | The WebSocket library to use |
| isForMonorepo | boolean | true | Whether this is being generated as part of a monorepo |
Usage
Interactive
bash
archipelago generate websocket_sdkNon-interactive (CI)
bash
archipelago generate websocket_sdk --config my_config.jsonConfig Template
json
{
"@appName": "The name of your application",
"appName": "MyApp",
"@websocketLibrary": "The WebSocket library to use (dart | phoenix)",
"websocketLibrary": "dart",
"@isForMonorepo": "Whether this is being generated as part of a monorepo",
"isForMonorepo": true
}Generated Structure
Always generated:
infrastructure/
└── websocket_sdk_api/
├── lib/
│ ├── websocket_sdk_api.dart
│ └── src/
│ ├── client/
│ │ └── websocket_client.dart
│ ├── exceptions/
│ │ ├── exceptions.dart
│ │ ├── websocket_closed_exception.dart
│ │ ├── websocket_connection_exception.dart
│ │ ├── websocket_exception.dart
│ │ └── websocket_send_exception.dart
│ ├── interceptor/
│ │ └── websocket_interceptor.dart
│ ├── message/
│ │ ├── websocket_message.dart
│ │ └── websocket_message_type.dart
│ └── state/
│ └── connection_state.dart
├── pubspec.yaml
└── README.mdWhen websocketLibrary is dart:
infrastructure/
└── websocket_sdk_dart/
├── lib/
│ ├── websocket_sdk_dart.dart
│ └── src/
│ ├── client/
│ │ └── dart_websocket_client.dart
│ ├── config/
│ │ └── websocket_config.dart
│ └── di/
│ ├── injector.dart
│ ├── injector.module.dart
│ └── register_module.dart
├── pubspec.yaml
└── README.mdWhen websocketLibrary is phoenix:
infrastructure/
└── websocket_sdk_phoenix/
├── lib/
│ ├── websocket_sdk_phoenix.dart
│ └── src/
│ ├── channel/
│ │ └── phoenix_channel_manager.dart
│ ├── client/
│ │ └── phoenix_websocket_client.dart
│ ├── config/
│ │ └── phoenix_config.dart
│ └── di/
│ ├── injector.dart
│ └── register_module.dart
├── pubspec.yaml
└── README.md