machinaos 0.0.1 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.template +71 -71
- package/LICENSE +21 -21
- package/README.md +163 -87
- package/bin/cli.js +62 -106
- package/client/.dockerignore +45 -45
- package/client/Dockerfile +68 -68
- package/client/dist/assets/index-DFSC53FP.css +1 -0
- package/client/dist/assets/index-fJ-1gTf5.js +613 -0
- package/client/dist/index.html +14 -0
- package/client/eslint.config.js +34 -16
- package/client/nginx.conf +66 -66
- package/client/package.json +61 -48
- package/client/src/App.tsx +27 -27
- package/client/src/Dashboard.tsx +1200 -1172
- package/client/src/ParameterPanel.tsx +302 -300
- package/client/src/components/AIAgentNode.tsx +315 -321
- package/client/src/components/APIKeyValidator.tsx +117 -117
- package/client/src/components/ClaudeChatModelNode.tsx +17 -17
- package/client/src/components/CredentialsModal.tsx +1200 -306
- package/client/src/components/GeminiChatModelNode.tsx +17 -17
- package/client/src/components/GenericNode.tsx +356 -356
- package/client/src/components/LocationParameterPanel.tsx +153 -153
- package/client/src/components/ModelNode.tsx +285 -285
- package/client/src/components/OpenAIChatModelNode.tsx +17 -17
- package/client/src/components/OutputPanel.tsx +470 -470
- package/client/src/components/ParameterRenderer.tsx +1873 -1873
- package/client/src/components/SkillEditorModal.tsx +3 -3
- package/client/src/components/SquareNode.tsx +812 -796
- package/client/src/components/ToolkitNode.tsx +365 -365
- package/client/src/components/auth/LoginPage.tsx +247 -247
- package/client/src/components/auth/ProtectedRoute.tsx +59 -59
- package/client/src/components/base/BaseChatModelNode.tsx +270 -270
- package/client/src/components/icons/AIProviderIcons.tsx +50 -50
- package/client/src/components/maps/GoogleMapsPicker.tsx +136 -136
- package/client/src/components/maps/MapsPreviewPanel.tsx +109 -109
- package/client/src/components/maps/index.ts +25 -25
- package/client/src/components/parameterPanel/InputSection.tsx +1094 -1094
- package/client/src/components/parameterPanel/LocationPanelLayout.tsx +64 -64
- package/client/src/components/parameterPanel/MapsSection.tsx +91 -91
- package/client/src/components/parameterPanel/MiddleSection.tsx +867 -571
- package/client/src/components/parameterPanel/OutputSection.tsx +80 -80
- package/client/src/components/parameterPanel/ParameterPanelLayout.tsx +81 -81
- package/client/src/components/parameterPanel/ToolSchemaEditor.tsx +436 -436
- package/client/src/components/parameterPanel/index.ts +41 -41
- package/client/src/components/shared/DataPanel.tsx +142 -142
- package/client/src/components/shared/JSONTreeRenderer.tsx +105 -105
- package/client/src/components/ui/AIResultModal.tsx +203 -203
- package/client/src/components/ui/ApiKeyInput.tsx +93 -0
- package/client/src/components/ui/CodeEditor.tsx +81 -81
- package/client/src/components/ui/CollapsibleSection.tsx +87 -87
- package/client/src/components/ui/ComponentItem.tsx +153 -153
- package/client/src/components/ui/ComponentPalette.tsx +320 -320
- package/client/src/components/ui/ConsolePanel.tsx +151 -43
- package/client/src/components/ui/ErrorBoundary.tsx +195 -195
- package/client/src/components/ui/InputNodesPanel.tsx +203 -203
- package/client/src/components/ui/MapSelector.tsx +313 -313
- package/client/src/components/ui/Modal.tsx +151 -148
- package/client/src/components/ui/NodeOutputPanel.tsx +1150 -1150
- package/client/src/components/ui/OutputDisplayPanel.tsx +381 -381
- package/client/src/components/ui/QRCodeDisplay.tsx +182 -0
- package/client/src/components/ui/TopToolbar.tsx +736 -736
- package/client/src/components/ui/WorkflowSidebar.tsx +293 -293
- package/client/src/config/antdTheme.ts +186 -186
- package/client/src/contexts/AuthContext.tsx +221 -221
- package/client/src/contexts/ThemeContext.tsx +42 -42
- package/client/src/contexts/WebSocketContext.tsx +2144 -1971
- package/client/src/factories/baseChatModelFactory.ts +255 -255
- package/client/src/hooks/useAndroidOperations.ts +118 -164
- package/client/src/hooks/useApiKeyValidation.ts +106 -106
- package/client/src/hooks/useApiKeys.ts +238 -238
- package/client/src/hooks/useAppTheme.ts +17 -17
- package/client/src/hooks/useComponentPalette.ts +50 -50
- package/client/src/hooks/useDragAndDrop.ts +123 -123
- package/client/src/hooks/useDragVariable.ts +88 -88
- package/client/src/hooks/useExecution.ts +319 -313
- package/client/src/hooks/useParameterPanel.ts +176 -176
- package/client/src/hooks/useReactFlowNodes.ts +188 -188
- package/client/src/hooks/useToolSchema.ts +209 -209
- package/client/src/hooks/useWhatsApp.ts +196 -196
- package/client/src/hooks/useWorkflowManagement.ts +45 -45
- package/client/src/index.css +314 -314
- package/client/src/nodeDefinitions/aiAgentNodes.ts +335 -335
- package/client/src/nodeDefinitions/aiModelNodes.ts +340 -340
- package/client/src/nodeDefinitions/androidServiceNodes.ts +383 -383
- package/client/src/nodeDefinitions/chatNodes.ts +135 -135
- package/client/src/nodeDefinitions/codeNodes.ts +54 -54
- package/client/src/nodeDefinitions/index.ts +14 -14
- package/client/src/nodeDefinitions/locationNodes.ts +462 -462
- package/client/src/nodeDefinitions/schedulerNodes.ts +220 -220
- package/client/src/nodeDefinitions/skillNodes.ts +17 -5
- package/client/src/nodeDefinitions/utilityNodes.ts +284 -284
- package/client/src/nodeDefinitions/whatsappNodes.ts +821 -865
- package/client/src/nodeDefinitions.ts +101 -103
- package/client/src/services/dynamicParameterService.ts +95 -95
- package/client/src/services/execution/aiAgentExecutionService.ts +34 -34
- package/client/src/services/executionService.ts +227 -231
- package/client/src/services/workflowApi.ts +91 -91
- package/client/src/store/useAppStore.ts +578 -581
- package/client/src/styles/theme.ts +513 -508
- package/client/src/styles/zIndex.ts +16 -16
- package/client/src/types/ComponentTypes.ts +38 -38
- package/client/src/types/INodeProperties.ts +287 -287
- package/client/src/types/NodeTypes.ts +27 -27
- package/client/src/utils/formatters.ts +32 -32
- package/client/src/utils/googleMapsLoader.ts +139 -139
- package/client/src/utils/locationUtils.ts +84 -84
- package/client/src/utils/nodeUtils.ts +30 -30
- package/client/src/utils/workflow.ts +29 -29
- package/client/src/vite-env.d.ts +12 -12
- package/client/tailwind.config.js +59 -59
- package/client/tsconfig.json +25 -25
- package/client/vite.config.js +35 -35
- package/install.ps1 +308 -0
- package/install.sh +343 -0
- package/package.json +81 -70
- package/scripts/build.js +174 -51
- package/scripts/clean.js +40 -40
- package/scripts/start.js +234 -210
- package/scripts/stop.js +301 -325
- package/server/.dockerignore +44 -44
- package/server/Dockerfile +45 -45
- package/server/constants.py +244 -249
- package/server/core/cache.py +460 -460
- package/server/core/config.py +127 -127
- package/server/core/container.py +98 -98
- package/server/core/database.py +1296 -1210
- package/server/core/logging.py +313 -313
- package/server/main.py +288 -288
- package/server/middleware/__init__.py +5 -5
- package/server/middleware/auth.py +89 -89
- package/server/models/auth.py +52 -52
- package/server/models/cache.py +24 -24
- package/server/models/database.py +235 -210
- package/server/models/nodes.py +435 -455
- package/server/pyproject.toml +75 -72
- package/server/requirements.txt +83 -83
- package/server/routers/android.py +294 -294
- package/server/routers/auth.py +203 -203
- package/server/routers/database.py +150 -150
- package/server/routers/maps.py +141 -141
- package/server/routers/nodejs_compat.py +288 -288
- package/server/routers/webhook.py +90 -90
- package/server/routers/websocket.py +2239 -2127
- package/server/routers/whatsapp.py +761 -761
- package/server/routers/workflow.py +199 -199
- package/server/services/ai.py +2444 -2414
- package/server/services/android_service.py +588 -588
- package/server/services/auth.py +130 -130
- package/server/services/chat_client.py +160 -160
- package/server/services/deployment/manager.py +706 -706
- package/server/services/event_waiter.py +675 -785
- package/server/services/execution/executor.py +1351 -1351
- package/server/services/execution/models.py +1 -1
- package/server/services/handlers/__init__.py +122 -126
- package/server/services/handlers/ai.py +390 -355
- package/server/services/handlers/android.py +69 -260
- package/server/services/handlers/code.py +278 -278
- package/server/services/handlers/http.py +193 -193
- package/server/services/handlers/tools.py +146 -32
- package/server/services/handlers/triggers.py +107 -107
- package/server/services/handlers/utility.py +822 -822
- package/server/services/handlers/whatsapp.py +423 -476
- package/server/services/maps.py +288 -288
- package/server/services/memory_store.py +103 -103
- package/server/services/node_executor.py +372 -375
- package/server/services/scheduler.py +155 -155
- package/server/services/skill_loader.py +1 -1
- package/server/services/status_broadcaster.py +834 -826
- package/server/services/temporal/__init__.py +23 -23
- package/server/services/temporal/activities.py +344 -344
- package/server/services/temporal/client.py +76 -76
- package/server/services/temporal/executor.py +147 -147
- package/server/services/temporal/worker.py +251 -251
- package/server/services/temporal/workflow.py +355 -355
- package/server/services/temporal/ws_client.py +236 -236
- package/server/services/text.py +110 -110
- package/server/services/user_auth.py +172 -172
- package/server/services/websocket_client.py +29 -29
- package/server/services/workflow.py +597 -597
- package/server/skills/android-skill/SKILL.md +4 -4
- package/server/skills/code-skill/SKILL.md +123 -89
- package/server/skills/maps-skill/SKILL.md +3 -3
- package/server/skills/memory-skill/SKILL.md +1 -1
- package/server/skills/web-search-skill/SKILL.md +154 -0
- package/server/skills/whatsapp-skill/SKILL.md +3 -3
- package/server/uv.lock +461 -100
- package/server/whatsapp-rpc/.dockerignore +30 -30
- package/server/whatsapp-rpc/Dockerfile +44 -44
- package/server/whatsapp-rpc/Dockerfile.web +17 -17
- package/server/whatsapp-rpc/README.md +139 -139
- package/server/whatsapp-rpc/bin/whatsapp-rpc-server +0 -0
- package/server/whatsapp-rpc/cli.js +95 -95
- package/server/whatsapp-rpc/configs/config.yaml +6 -6
- package/server/whatsapp-rpc/docker-compose.yml +35 -35
- package/server/whatsapp-rpc/docs/API.md +410 -410
- package/server/whatsapp-rpc/node_modules/.package-lock.json +259 -0
- package/server/whatsapp-rpc/node_modules/chalk/license +9 -0
- package/server/whatsapp-rpc/node_modules/chalk/package.json +83 -0
- package/server/whatsapp-rpc/node_modules/chalk/readme.md +297 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/index.d.ts +325 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/index.js +225 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/utilities.js +33 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
- package/server/whatsapp-rpc/node_modules/commander/LICENSE +22 -0
- package/server/whatsapp-rpc/node_modules/commander/Readme.md +1148 -0
- package/server/whatsapp-rpc/node_modules/commander/esm.mjs +16 -0
- package/server/whatsapp-rpc/node_modules/commander/index.js +26 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/argument.js +145 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/command.js +2179 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/error.js +43 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/help.js +462 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/option.js +329 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/suggestSimilar.js +100 -0
- package/server/whatsapp-rpc/node_modules/commander/package-support.json +16 -0
- package/server/whatsapp-rpc/node_modules/commander/package.json +80 -0
- package/server/whatsapp-rpc/node_modules/commander/typings/esm.d.mts +3 -0
- package/server/whatsapp-rpc/node_modules/commander/typings/index.d.ts +884 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/README.md +89 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/index.js +39 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/parse.js +91 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/util/escape.js +47 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/package.json +73 -0
- package/server/whatsapp-rpc/node_modules/execa/index.d.ts +955 -0
- package/server/whatsapp-rpc/node_modules/execa/index.js +309 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/command.js +119 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/error.js +87 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/kill.js +102 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/pipe.js +42 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/promise.js +36 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/stdio.js +49 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/stream.js +133 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/verbose.js +19 -0
- package/server/whatsapp-rpc/node_modules/execa/license +9 -0
- package/server/whatsapp-rpc/node_modules/execa/package.json +90 -0
- package/server/whatsapp-rpc/node_modules/execa/readme.md +822 -0
- package/server/whatsapp-rpc/node_modules/get-stream/license +9 -0
- package/server/whatsapp-rpc/node_modules/get-stream/package.json +53 -0
- package/server/whatsapp-rpc/node_modules/get-stream/readme.md +291 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/array-buffer.js +84 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/array.js +32 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/buffer.js +20 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/contents.js +101 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/index.d.ts +119 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/index.js +5 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/string.js +36 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/utils.js +11 -0
- package/server/whatsapp-rpc/node_modules/get-them-args/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/get-them-args/README.md +95 -0
- package/server/whatsapp-rpc/node_modules/get-them-args/index.js +97 -0
- package/server/whatsapp-rpc/node_modules/get-them-args/package.json +36 -0
- package/server/whatsapp-rpc/node_modules/human-signals/LICENSE +201 -0
- package/server/whatsapp-rpc/node_modules/human-signals/README.md +168 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/core.js +273 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/main.d.ts +73 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/main.js +70 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/realtime.js +16 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/signals.js +34 -0
- package/server/whatsapp-rpc/node_modules/human-signals/package.json +61 -0
- package/server/whatsapp-rpc/node_modules/is-stream/index.d.ts +81 -0
- package/server/whatsapp-rpc/node_modules/is-stream/index.js +29 -0
- package/server/whatsapp-rpc/node_modules/is-stream/license +9 -0
- package/server/whatsapp-rpc/node_modules/is-stream/package.json +44 -0
- package/server/whatsapp-rpc/node_modules/is-stream/readme.md +60 -0
- package/server/whatsapp-rpc/node_modules/isexe/LICENSE +15 -0
- package/server/whatsapp-rpc/node_modules/isexe/README.md +51 -0
- package/server/whatsapp-rpc/node_modules/isexe/index.js +57 -0
- package/server/whatsapp-rpc/node_modules/isexe/mode.js +41 -0
- package/server/whatsapp-rpc/node_modules/isexe/package.json +31 -0
- package/server/whatsapp-rpc/node_modules/isexe/test/basic.js +221 -0
- package/server/whatsapp-rpc/node_modules/isexe/windows.js +42 -0
- package/server/whatsapp-rpc/node_modules/kill-port/.editorconfig +12 -0
- package/server/whatsapp-rpc/node_modules/kill-port/.gitattributes +1 -0
- package/server/whatsapp-rpc/node_modules/kill-port/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/kill-port/README.md +140 -0
- package/server/whatsapp-rpc/node_modules/kill-port/cli.js +25 -0
- package/server/whatsapp-rpc/node_modules/kill-port/example.js +21 -0
- package/server/whatsapp-rpc/node_modules/kill-port/index.js +46 -0
- package/server/whatsapp-rpc/node_modules/kill-port/logo.png +0 -0
- package/server/whatsapp-rpc/node_modules/kill-port/package.json +41 -0
- package/server/whatsapp-rpc/node_modules/kill-port/pnpm-lock.yaml +4606 -0
- package/server/whatsapp-rpc/node_modules/kill-port/test.js +16 -0
- package/server/whatsapp-rpc/node_modules/merge-stream/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/merge-stream/README.md +78 -0
- package/server/whatsapp-rpc/node_modules/merge-stream/index.js +41 -0
- package/server/whatsapp-rpc/node_modules/merge-stream/package.json +19 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/index.d.ts +52 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/index.js +71 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/license +9 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/package.json +45 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/readme.md +90 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/index.d.ts +90 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/index.js +52 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/license +9 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/index.d.ts +31 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/index.js +12 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/license +9 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/package.json +41 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/readme.md +57 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/package.json +49 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/readme.md +104 -0
- package/server/whatsapp-rpc/node_modules/onetime/index.d.ts +59 -0
- package/server/whatsapp-rpc/node_modules/onetime/index.js +41 -0
- package/server/whatsapp-rpc/node_modules/onetime/license +9 -0
- package/server/whatsapp-rpc/node_modules/onetime/package.json +45 -0
- package/server/whatsapp-rpc/node_modules/onetime/readme.md +94 -0
- package/server/whatsapp-rpc/node_modules/path-key/index.d.ts +40 -0
- package/server/whatsapp-rpc/node_modules/path-key/index.js +16 -0
- package/server/whatsapp-rpc/node_modules/path-key/license +9 -0
- package/server/whatsapp-rpc/node_modules/path-key/package.json +39 -0
- package/server/whatsapp-rpc/node_modules/path-key/readme.md +61 -0
- package/server/whatsapp-rpc/node_modules/shebang-command/index.js +19 -0
- package/server/whatsapp-rpc/node_modules/shebang-command/license +9 -0
- package/server/whatsapp-rpc/node_modules/shebang-command/package.json +34 -0
- package/server/whatsapp-rpc/node_modules/shebang-command/readme.md +34 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/index.d.ts +22 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/index.js +2 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/license +9 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/package.json +35 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/readme.md +33 -0
- package/server/whatsapp-rpc/node_modules/shell-exec/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/shell-exec/README.md +60 -0
- package/server/whatsapp-rpc/node_modules/shell-exec/index.js +47 -0
- package/server/whatsapp-rpc/node_modules/shell-exec/package.json +29 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/LICENSE.txt +16 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/README.md +74 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/browser.js +10 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/index.js +279 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/package.json +3 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/signals.js +42 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/browser.js +4 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/index.js +275 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/package.json +3 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/signals.js +39 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/package.json +106 -0
- package/server/whatsapp-rpc/node_modules/strip-final-newline/index.js +14 -0
- package/server/whatsapp-rpc/node_modules/strip-final-newline/license +9 -0
- package/server/whatsapp-rpc/node_modules/strip-final-newline/package.json +43 -0
- package/server/whatsapp-rpc/node_modules/strip-final-newline/readme.md +35 -0
- package/server/whatsapp-rpc/node_modules/which/CHANGELOG.md +166 -0
- package/server/whatsapp-rpc/node_modules/which/LICENSE +15 -0
- package/server/whatsapp-rpc/node_modules/which/README.md +54 -0
- package/server/whatsapp-rpc/node_modules/which/bin/node-which +52 -0
- package/server/whatsapp-rpc/node_modules/which/package.json +43 -0
- package/server/whatsapp-rpc/node_modules/which/which.js +125 -0
- package/server/whatsapp-rpc/package-lock.json +272 -0
- package/server/whatsapp-rpc/package.json +30 -30
- package/server/whatsapp-rpc/schema.json +1294 -1294
- package/server/whatsapp-rpc/scripts/clean.cjs +66 -66
- package/server/whatsapp-rpc/scripts/cli.js +162 -162
- package/server/whatsapp-rpc/src/go/whatsapp/history.go +166 -166
- package/server/whatsapp-rpc/src/python/pyproject.toml +15 -15
- package/server/whatsapp-rpc/src/python/whatsapp_rpc/__init__.py +4 -4
- package/server/whatsapp-rpc/src/python/whatsapp_rpc/client.py +427 -427
- package/server/whatsapp-rpc/web/app.py +609 -609
- package/server/whatsapp-rpc/web/requirements.txt +6 -6
- package/server/whatsapp-rpc/web/rpc_client.py +427 -427
- package/server/whatsapp-rpc/web/static/openapi.yaml +59 -59
- package/server/whatsapp-rpc/web/templates/base.html +149 -149
- package/server/whatsapp-rpc/web/templates/contacts.html +240 -240
- package/server/whatsapp-rpc/web/templates/dashboard.html +319 -319
- package/server/whatsapp-rpc/web/templates/groups.html +328 -328
- package/server/whatsapp-rpc/web/templates/messages.html +465 -465
- package/server/whatsapp-rpc/web/templates/messaging.html +680 -680
- package/server/whatsapp-rpc/web/templates/send.html +258 -258
- package/server/whatsapp-rpc/web/templates/settings.html +459 -459
- package/client/src/components/ui/AndroidSettingsPanel.tsx +0 -401
- package/client/src/components/ui/WhatsAppSettingsPanel.tsx +0 -345
- package/client/src/nodeDefinitions/androidDeviceNodes.ts +0 -140
- package/docker-compose.prod.yml +0 -107
- package/docker-compose.yml +0 -104
- package/docs-MachinaOs/README.md +0 -85
- package/docs-MachinaOs/deployment/docker.mdx +0 -228
- package/docs-MachinaOs/deployment/production.mdx +0 -345
- package/docs-MachinaOs/docs.json +0 -75
- package/docs-MachinaOs/faq.mdx +0 -309
- package/docs-MachinaOs/favicon.svg +0 -5
- package/docs-MachinaOs/installation.mdx +0 -160
- package/docs-MachinaOs/introduction.mdx +0 -114
- package/docs-MachinaOs/logo/dark.svg +0 -6
- package/docs-MachinaOs/logo/light.svg +0 -6
- package/docs-MachinaOs/nodes/ai-agent.mdx +0 -216
- package/docs-MachinaOs/nodes/ai-models.mdx +0 -240
- package/docs-MachinaOs/nodes/android.mdx +0 -411
- package/docs-MachinaOs/nodes/overview.mdx +0 -181
- package/docs-MachinaOs/nodes/schedulers.mdx +0 -316
- package/docs-MachinaOs/nodes/webhooks.mdx +0 -330
- package/docs-MachinaOs/nodes/whatsapp.mdx +0 -305
- package/docs-MachinaOs/quickstart.mdx +0 -119
- package/docs-MachinaOs/tutorials/ai-agent-workflow.mdx +0 -177
- package/docs-MachinaOs/tutorials/android-automation.mdx +0 -242
- package/docs-MachinaOs/tutorials/first-workflow.mdx +0 -134
- package/docs-MachinaOs/tutorials/whatsapp-automation.mdx +0 -185
- package/nul +0 -0
- package/scripts/check-ports.ps1 +0 -33
- package/scripts/kill-port.ps1 +0 -154
package/docs-MachinaOs/README.md
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# MachinaOs Documentation
|
|
2
|
-
|
|
3
|
-
This folder contains the Mintlify documentation for MachinaOs.
|
|
4
|
-
|
|
5
|
-
## Setup
|
|
6
|
-
|
|
7
|
-
1. Create a new repository `trohitg/machinaos-docs` on GitHub
|
|
8
|
-
2. Copy the contents of this folder to the new repository
|
|
9
|
-
3. Connect the repository to Mintlify:
|
|
10
|
-
- Go to [mintlify.com](https://mintlify.com)
|
|
11
|
-
- Click "Get Started" and sign in with GitHub
|
|
12
|
-
- Select your `machinaos-docs` repository
|
|
13
|
-
- Mintlify will automatically deploy your docs
|
|
14
|
-
|
|
15
|
-
## Local Development
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
# Install Mintlify CLI
|
|
19
|
-
npm install -g mintlify
|
|
20
|
-
|
|
21
|
-
# Run local dev server
|
|
22
|
-
cd docs-mintlify
|
|
23
|
-
mintlify dev
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
The docs will be available at http://localhost:3000
|
|
27
|
-
|
|
28
|
-
## Structure
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
docs-mintlify/
|
|
32
|
-
├── docs.json # Mintlify configuration
|
|
33
|
-
├── introduction.mdx # Home page
|
|
34
|
-
├── installation.mdx # Setup guide
|
|
35
|
-
├── quickstart.mdx # Quick start tutorial
|
|
36
|
-
├── faq.mdx # FAQ page
|
|
37
|
-
├── tutorials/ # Step-by-step guides
|
|
38
|
-
│ ├── first-workflow.mdx
|
|
39
|
-
│ ├── ai-agent-workflow.mdx
|
|
40
|
-
│ ├── whatsapp-automation.mdx
|
|
41
|
-
│ └── android-automation.mdx
|
|
42
|
-
├── nodes/ # Node documentation
|
|
43
|
-
│ ├── overview.mdx
|
|
44
|
-
│ ├── ai-models.mdx
|
|
45
|
-
│ ├── ai-agent.mdx
|
|
46
|
-
│ ├── whatsapp.mdx
|
|
47
|
-
│ ├── android.mdx
|
|
48
|
-
│ ├── webhooks.mdx
|
|
49
|
-
│ └── schedulers.mdx
|
|
50
|
-
├── deployment/ # Deployment guides
|
|
51
|
-
│ ├── docker.mdx
|
|
52
|
-
│ └── production.mdx
|
|
53
|
-
├── logo/ # Logo assets
|
|
54
|
-
│ ├── dark.svg
|
|
55
|
-
│ └── light.svg
|
|
56
|
-
├── images/ # Screenshots and diagrams
|
|
57
|
-
└── favicon.svg # Browser favicon
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Adding Content
|
|
61
|
-
|
|
62
|
-
1. Create new `.mdx` files in the appropriate folder
|
|
63
|
-
2. Add frontmatter with title and description:
|
|
64
|
-
```mdx
|
|
65
|
-
---
|
|
66
|
-
title: Page Title
|
|
67
|
-
description: Brief description
|
|
68
|
-
---
|
|
69
|
-
```
|
|
70
|
-
3. Update `docs.json` navigation to include new pages
|
|
71
|
-
4. Commit and push - Mintlify auto-deploys
|
|
72
|
-
|
|
73
|
-
## Mintlify Components
|
|
74
|
-
|
|
75
|
-
Common components used in docs:
|
|
76
|
-
|
|
77
|
-
- `<Card>` - Feature cards with icons
|
|
78
|
-
- `<CardGroup>` - Grid layout for cards
|
|
79
|
-
- `<Tabs>` - Tabbed content
|
|
80
|
-
- `<Accordion>` - Collapsible sections
|
|
81
|
-
- `<Info>`, `<Warning>`, `<Tip>` - Callout boxes
|
|
82
|
-
- `<ParamField>` - Parameter documentation
|
|
83
|
-
- `<Check>` - Success checkmarks
|
|
84
|
-
|
|
85
|
-
See [Mintlify docs](https://mintlify.com/docs) for full component reference.
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Docker Setup
|
|
3
|
-
description: Run MachinaOs with Docker Compose
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Docker Setup
|
|
7
|
-
|
|
8
|
-
The easiest way to run MachinaOs is with Docker Compose.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
- Docker 20.10+
|
|
13
|
-
- Docker Compose 2.0+
|
|
14
|
-
- 2GB RAM minimum
|
|
15
|
-
|
|
16
|
-
## Quick Start
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
# Clone the repository
|
|
20
|
-
git clone https://github.com/trohitg/MachinaOS.git
|
|
21
|
-
cd MachinaOs
|
|
22
|
-
|
|
23
|
-
# Build images
|
|
24
|
-
npm run docker:build
|
|
25
|
-
|
|
26
|
-
# Start all services
|
|
27
|
-
npm run docker:up
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
This starts 4 containers:
|
|
31
|
-
- **frontend** - React app on port 3000
|
|
32
|
-
- **backend** - FastAPI server on port 3010
|
|
33
|
-
- **whatsapp** - Go WhatsApp service on port 9400
|
|
34
|
-
- **redis** - Cache on port 6379 (optional)
|
|
35
|
-
|
|
36
|
-
## Container Overview
|
|
37
|
-
|
|
38
|
-
| Container | Image | Port | Purpose |
|
|
39
|
-
|-----------|-------|------|---------|
|
|
40
|
-
| frontend | machinaos-frontend | 3000 | React UI |
|
|
41
|
-
| backend | machinaos-backend | 3010 | API server |
|
|
42
|
-
| whatsapp | machinaos-whatsapp | 9400 | WhatsApp bridge |
|
|
43
|
-
| redis | redis:7-alpine | 6379 | Cache (optional) |
|
|
44
|
-
|
|
45
|
-
## Configuration
|
|
46
|
-
|
|
47
|
-
### Environment Variables
|
|
48
|
-
|
|
49
|
-
Create a `.env` file in the project root:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# Ports
|
|
53
|
-
VITE_CLIENT_PORT=3000
|
|
54
|
-
PYTHON_BACKEND_PORT=3010
|
|
55
|
-
WHATSAPP_RPC_PORT=9400
|
|
56
|
-
|
|
57
|
-
# Authentication
|
|
58
|
-
AUTH_MODE=single
|
|
59
|
-
JWT_SECRET_KEY=your-secret-key-min-32-chars
|
|
60
|
-
|
|
61
|
-
# Cache (optional)
|
|
62
|
-
REDIS_ENABLED=false
|
|
63
|
-
|
|
64
|
-
# AI API Keys (optional)
|
|
65
|
-
OPENAI_API_KEY=
|
|
66
|
-
ANTHROPIC_API_KEY=
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Redis (Optional)
|
|
70
|
-
|
|
71
|
-
Redis is disabled by default for local development. To enable:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# In .env
|
|
75
|
-
REDIS_ENABLED=true
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Then start with Redis profile:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
docker-compose --profile redis up -d
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Common Commands
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
# Start services
|
|
88
|
-
npm run docker:up
|
|
89
|
-
|
|
90
|
-
# View logs
|
|
91
|
-
npm run docker:logs
|
|
92
|
-
|
|
93
|
-
# Stop all services
|
|
94
|
-
npm run docker:down
|
|
95
|
-
|
|
96
|
-
# Rebuild after code changes
|
|
97
|
-
npm run docker:build && npm run docker:up
|
|
98
|
-
|
|
99
|
-
# Stop and remove volumes (clean slate)
|
|
100
|
-
docker-compose down -v
|
|
101
|
-
|
|
102
|
-
# View specific service logs
|
|
103
|
-
docker-compose logs -f backend
|
|
104
|
-
|
|
105
|
-
# Restart specific service
|
|
106
|
-
docker-compose restart backend
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## Accessing Services
|
|
110
|
-
|
|
111
|
-
After starting, access:
|
|
112
|
-
|
|
113
|
-
| Service | URL |
|
|
114
|
-
|---------|-----|
|
|
115
|
-
| Frontend | http://localhost:3000 |
|
|
116
|
-
| Backend API | http://localhost:3010 |
|
|
117
|
-
| Health Check | http://localhost:3010/health |
|
|
118
|
-
| WebSocket | ws://localhost:3010/ws/status |
|
|
119
|
-
|
|
120
|
-
## Health Checks
|
|
121
|
-
|
|
122
|
-
All containers include health checks:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Check container health
|
|
126
|
-
docker-compose ps
|
|
127
|
-
|
|
128
|
-
# Check backend health
|
|
129
|
-
curl http://localhost:3010/health
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Expected health response:
|
|
133
|
-
```json
|
|
134
|
-
{
|
|
135
|
-
"status": "healthy",
|
|
136
|
-
"redis_enabled": false,
|
|
137
|
-
"version": "1.0.0"
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## Troubleshooting
|
|
142
|
-
|
|
143
|
-
<Accordion title="Container won't start">
|
|
144
|
-
Check logs for errors:
|
|
145
|
-
```bash
|
|
146
|
-
docker-compose logs backend
|
|
147
|
-
docker-compose logs frontend
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Common issues:
|
|
151
|
-
- Port already in use: Change port in `.env`
|
|
152
|
-
- Missing environment variables: Check `.env` file exists
|
|
153
|
-
</Accordion>
|
|
154
|
-
|
|
155
|
-
<Accordion title="Frontend can't connect to backend">
|
|
156
|
-
- Verify both containers are running: `docker-compose ps`
|
|
157
|
-
- Check network: containers should be on same network
|
|
158
|
-
- Check CORS settings in backend `.env`
|
|
159
|
-
</Accordion>
|
|
160
|
-
|
|
161
|
-
<Accordion title="WhatsApp service issues">
|
|
162
|
-
```bash
|
|
163
|
-
# Check WhatsApp logs
|
|
164
|
-
docker-compose logs whatsapp
|
|
165
|
-
|
|
166
|
-
# Restart WhatsApp service
|
|
167
|
-
docker-compose restart whatsapp
|
|
168
|
-
```
|
|
169
|
-
</Accordion>
|
|
170
|
-
|
|
171
|
-
<Accordion title="Out of disk space">
|
|
172
|
-
Clean up Docker resources:
|
|
173
|
-
```bash
|
|
174
|
-
docker system prune -af
|
|
175
|
-
docker builder prune -af
|
|
176
|
-
```
|
|
177
|
-
</Accordion>
|
|
178
|
-
|
|
179
|
-
## Resource Usage
|
|
180
|
-
|
|
181
|
-
Typical resource consumption:
|
|
182
|
-
|
|
183
|
-
| Container | Memory | CPU |
|
|
184
|
-
|-----------|--------|-----|
|
|
185
|
-
| frontend | ~50 MB | Low |
|
|
186
|
-
| backend | ~150 MB | Medium |
|
|
187
|
-
| whatsapp | ~30 MB | Low |
|
|
188
|
-
| redis | ~10 MB | Low |
|
|
189
|
-
|
|
190
|
-
## Data Persistence
|
|
191
|
-
|
|
192
|
-
Data is stored in Docker volumes:
|
|
193
|
-
|
|
194
|
-
| Volume | Purpose |
|
|
195
|
-
|--------|---------|
|
|
196
|
-
| backend-data | SQLite database, uploads |
|
|
197
|
-
| whatsapp-data | WhatsApp session |
|
|
198
|
-
| redis-data | Cache data |
|
|
199
|
-
|
|
200
|
-
To backup data:
|
|
201
|
-
```bash
|
|
202
|
-
docker cp machinaos-backend-1:/app/data ./backup
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## Development Mode
|
|
206
|
-
|
|
207
|
-
For development with hot reload:
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
# Use development compose file
|
|
211
|
-
docker-compose -f docker-compose.dev.yml up
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Or run services separately:
|
|
215
|
-
```bash
|
|
216
|
-
npm run dev # Starts frontend + backend with hot reload
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
## Next Steps
|
|
220
|
-
|
|
221
|
-
<CardGroup cols={2}>
|
|
222
|
-
<Card title="Production Deployment" icon="server" href="/deployment/production">
|
|
223
|
-
Deploy to a server with nginx and SSL
|
|
224
|
-
</Card>
|
|
225
|
-
<Card title="Configuration" icon="gear" href="/installation">
|
|
226
|
-
Full environment variable reference
|
|
227
|
-
</Card>
|
|
228
|
-
</CardGroup>
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Production Deployment
|
|
3
|
-
description: Deploy MachinaOs to production with nginx and SSL
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Production Deployment
|
|
7
|
-
|
|
8
|
-
Deploy MachinaOs to a production server with Docker, nginx reverse proxy, and SSL.
|
|
9
|
-
|
|
10
|
-
## Server Requirements
|
|
11
|
-
|
|
12
|
-
- Ubuntu 20.04+ or similar Linux
|
|
13
|
-
- 2+ CPU cores
|
|
14
|
-
- 2GB+ RAM
|
|
15
|
-
- Docker and Docker Compose
|
|
16
|
-
- Domain name (for SSL)
|
|
17
|
-
|
|
18
|
-
## Deployment Overview
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
Internet --> nginx (SSL) --> Docker Containers
|
|
22
|
-
|
|
|
23
|
-
+--> frontend (3000)
|
|
24
|
-
+--> backend (3010)
|
|
25
|
-
+--> whatsapp (9400)
|
|
26
|
-
+--> redis (6379)
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Step 1: Server Setup
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# Update system
|
|
33
|
-
sudo apt update && sudo apt upgrade -y
|
|
34
|
-
|
|
35
|
-
# Install Docker
|
|
36
|
-
curl -fsSL https://get.docker.com | sh
|
|
37
|
-
sudo usermod -aG docker $USER
|
|
38
|
-
|
|
39
|
-
# Install Docker Compose
|
|
40
|
-
sudo apt install docker-compose-plugin
|
|
41
|
-
|
|
42
|
-
# Install nginx
|
|
43
|
-
sudo apt install nginx certbot python3-certbot-nginx
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Step 2: Clone and Configure
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
# Clone repository
|
|
50
|
-
cd /opt
|
|
51
|
-
sudo git clone https://github.com/trohitg/MachinaOs.git
|
|
52
|
-
cd MachinaOs
|
|
53
|
-
|
|
54
|
-
# Create production environment file
|
|
55
|
-
sudo cp .env.example .env.prod
|
|
56
|
-
sudo nano .env.prod
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Production Environment
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
# .env.prod
|
|
63
|
-
VITE_CLIENT_PORT=3000
|
|
64
|
-
PYTHON_BACKEND_PORT=3010
|
|
65
|
-
WHATSAPP_RPC_PORT=9400
|
|
66
|
-
|
|
67
|
-
# Security - CHANGE THESE
|
|
68
|
-
SECRET_KEY=your-random-64-char-string
|
|
69
|
-
JWT_SECRET_KEY=your-random-32-char-string
|
|
70
|
-
API_KEY_ENCRYPTION_KEY=your-random-64-char-string
|
|
71
|
-
|
|
72
|
-
# Authentication
|
|
73
|
-
AUTH_MODE=single
|
|
74
|
-
JWT_COOKIE_SECURE=true
|
|
75
|
-
JWT_COOKIE_SAMESITE=strict
|
|
76
|
-
|
|
77
|
-
# Cache
|
|
78
|
-
REDIS_ENABLED=true
|
|
79
|
-
REDIS_URL=redis://redis:6379
|
|
80
|
-
|
|
81
|
-
# CORS - your domain
|
|
82
|
-
CORS_ORIGINS=["https://your-domain.com"]
|
|
83
|
-
|
|
84
|
-
# Logging
|
|
85
|
-
LOG_LEVEL=INFO
|
|
86
|
-
DEBUG=false
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
<Warning>
|
|
90
|
-
Generate secure random strings for SECRET_KEY, JWT_SECRET_KEY, and API_KEY_ENCRYPTION_KEY. Never use default values in production.
|
|
91
|
-
</Warning>
|
|
92
|
-
|
|
93
|
-
## Step 3: Build and Start
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
# Build production images
|
|
97
|
-
docker-compose -f docker-compose.prod.yml build
|
|
98
|
-
|
|
99
|
-
# Start services
|
|
100
|
-
docker-compose -f docker-compose.prod.yml up -d
|
|
101
|
-
|
|
102
|
-
# Verify containers
|
|
103
|
-
docker-compose -f docker-compose.prod.yml ps
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Step 4: Configure nginx
|
|
107
|
-
|
|
108
|
-
Create nginx configuration:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
sudo nano /etc/nginx/sites-available/machinaos
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
```nginx
|
|
115
|
-
server {
|
|
116
|
-
listen 80;
|
|
117
|
-
server_name your-domain.com;
|
|
118
|
-
|
|
119
|
-
location / {
|
|
120
|
-
return 301 https://$server_name$request_uri;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
server {
|
|
125
|
-
listen 443 ssl http2;
|
|
126
|
-
server_name your-domain.com;
|
|
127
|
-
|
|
128
|
-
# SSL configuration (will be added by certbot)
|
|
129
|
-
|
|
130
|
-
# Frontend
|
|
131
|
-
location / {
|
|
132
|
-
proxy_pass http://127.0.0.1:3000;
|
|
133
|
-
proxy_http_version 1.1;
|
|
134
|
-
proxy_set_header Host $host;
|
|
135
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
136
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
137
|
-
proxy_set_header X-Forwarded-Proto $scheme;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
# Backend API
|
|
141
|
-
location /api/ {
|
|
142
|
-
proxy_pass http://127.0.0.1:3010/api/;
|
|
143
|
-
proxy_http_version 1.1;
|
|
144
|
-
proxy_set_header Host $host;
|
|
145
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
146
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
147
|
-
proxy_set_header X-Forwarded-Proto $scheme;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
# WebSocket
|
|
151
|
-
location /ws/ {
|
|
152
|
-
proxy_pass http://127.0.0.1:3010/ws/;
|
|
153
|
-
proxy_http_version 1.1;
|
|
154
|
-
proxy_set_header Upgrade $http_upgrade;
|
|
155
|
-
proxy_set_header Connection "upgrade";
|
|
156
|
-
proxy_set_header Host $host;
|
|
157
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
158
|
-
proxy_read_timeout 86400;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
# Webhooks
|
|
162
|
-
location /webhook/ {
|
|
163
|
-
proxy_pass http://127.0.0.1:3010/webhook/;
|
|
164
|
-
proxy_http_version 1.1;
|
|
165
|
-
proxy_set_header Host $host;
|
|
166
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
167
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
# Health check
|
|
171
|
-
location /health {
|
|
172
|
-
proxy_pass http://127.0.0.1:3010/health;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Enable the site:
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
sudo ln -s /etc/nginx/sites-available/machinaos /etc/nginx/sites-enabled/
|
|
181
|
-
sudo nginx -t
|
|
182
|
-
sudo systemctl reload nginx
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
## Step 5: SSL Certificate
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
# Get SSL certificate from Let's Encrypt
|
|
189
|
-
sudo certbot --nginx -d your-domain.com
|
|
190
|
-
|
|
191
|
-
# Auto-renewal is configured automatically
|
|
192
|
-
# Test renewal
|
|
193
|
-
sudo certbot renew --dry-run
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
## Step 6: Firewall
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
# Allow required ports
|
|
200
|
-
sudo ufw allow 22/tcp # SSH
|
|
201
|
-
sudo ufw allow 80/tcp # HTTP (redirect)
|
|
202
|
-
sudo ufw allow 443/tcp # HTTPS
|
|
203
|
-
sudo ufw enable
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
## Verify Deployment
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
# Check health endpoint
|
|
210
|
-
curl https://your-domain.com/health
|
|
211
|
-
|
|
212
|
-
# Check containers
|
|
213
|
-
docker-compose -f docker-compose.prod.yml ps
|
|
214
|
-
|
|
215
|
-
# View logs
|
|
216
|
-
docker-compose -f docker-compose.prod.yml logs -f
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
## Maintenance
|
|
220
|
-
|
|
221
|
-
### Updates
|
|
222
|
-
|
|
223
|
-
```bash
|
|
224
|
-
cd /opt/MachinaOs
|
|
225
|
-
|
|
226
|
-
# Pull latest code
|
|
227
|
-
git pull
|
|
228
|
-
|
|
229
|
-
# Rebuild and restart
|
|
230
|
-
docker-compose -f docker-compose.prod.yml down
|
|
231
|
-
docker-compose -f docker-compose.prod.yml up --build -d
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
### Backups
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
# Backup database
|
|
238
|
-
docker cp machinaos-backend-1:/app/data/workflow.db ./backup/
|
|
239
|
-
|
|
240
|
-
# Backup WhatsApp session
|
|
241
|
-
docker cp machinaos-whatsapp-1:/app/data ./backup/whatsapp/
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### Monitoring
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
# Check resource usage
|
|
248
|
-
docker stats --no-stream
|
|
249
|
-
|
|
250
|
-
# Check logs for errors
|
|
251
|
-
docker-compose -f docker-compose.prod.yml logs --tail=100 backend
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
### Log Rotation
|
|
255
|
-
|
|
256
|
-
Add to `/etc/logrotate.d/docker`:
|
|
257
|
-
|
|
258
|
-
```
|
|
259
|
-
/var/lib/docker/containers/*/*.log {
|
|
260
|
-
rotate 7
|
|
261
|
-
daily
|
|
262
|
-
compress
|
|
263
|
-
missingok
|
|
264
|
-
delaycompress
|
|
265
|
-
copytruncate
|
|
266
|
-
}
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
## Security Checklist
|
|
270
|
-
|
|
271
|
-
<Check>
|
|
272
|
-
All secret keys are randomly generated and unique
|
|
273
|
-
</Check>
|
|
274
|
-
|
|
275
|
-
<Check>
|
|
276
|
-
SSL/TLS is enabled with valid certificate
|
|
277
|
-
</Check>
|
|
278
|
-
|
|
279
|
-
<Check>
|
|
280
|
-
JWT_COOKIE_SECURE is set to true
|
|
281
|
-
</Check>
|
|
282
|
-
|
|
283
|
-
<Check>
|
|
284
|
-
CORS_ORIGINS only includes your domain
|
|
285
|
-
</Check>
|
|
286
|
-
|
|
287
|
-
<Check>
|
|
288
|
-
DEBUG is set to false
|
|
289
|
-
</Check>
|
|
290
|
-
|
|
291
|
-
<Check>
|
|
292
|
-
Firewall is configured
|
|
293
|
-
</Check>
|
|
294
|
-
|
|
295
|
-
<Check>
|
|
296
|
-
SSH key authentication (disable password auth)
|
|
297
|
-
</Check>
|
|
298
|
-
|
|
299
|
-
## Troubleshooting
|
|
300
|
-
|
|
301
|
-
<Accordion title="502 Bad Gateway">
|
|
302
|
-
- Check if containers are running: `docker-compose ps`
|
|
303
|
-
- Verify ports match nginx config
|
|
304
|
-
- Check backend logs: `docker-compose logs backend`
|
|
305
|
-
</Accordion>
|
|
306
|
-
|
|
307
|
-
<Accordion title="WebSocket connection fails">
|
|
308
|
-
- Verify nginx WebSocket config has Upgrade headers
|
|
309
|
-
- Check proxy_read_timeout is set
|
|
310
|
-
- Ensure firewall allows connections
|
|
311
|
-
</Accordion>
|
|
312
|
-
|
|
313
|
-
<Accordion title="SSL certificate issues">
|
|
314
|
-
```bash
|
|
315
|
-
# Renew certificate manually
|
|
316
|
-
sudo certbot renew --force-renewal
|
|
317
|
-
sudo systemctl reload nginx
|
|
318
|
-
```
|
|
319
|
-
</Accordion>
|
|
320
|
-
|
|
321
|
-
<Accordion title="High memory usage">
|
|
322
|
-
- Check for memory leaks: `docker stats`
|
|
323
|
-
- Restart containers: `docker-compose restart`
|
|
324
|
-
- Increase server RAM if needed
|
|
325
|
-
</Accordion>
|
|
326
|
-
|
|
327
|
-
## Scaling
|
|
328
|
-
|
|
329
|
-
For higher load:
|
|
330
|
-
|
|
331
|
-
1. **Horizontal scaling**: Use Docker Swarm or Kubernetes
|
|
332
|
-
2. **Database**: Migrate from SQLite to PostgreSQL
|
|
333
|
-
3. **Cache**: Use Redis cluster
|
|
334
|
-
4. **Load balancer**: Add HAProxy or cloud load balancer
|
|
335
|
-
|
|
336
|
-
## Related
|
|
337
|
-
|
|
338
|
-
<CardGroup cols={2}>
|
|
339
|
-
<Card title="Docker Setup" icon="docker" href="/deployment/docker">
|
|
340
|
-
Local Docker development
|
|
341
|
-
</Card>
|
|
342
|
-
<Card title="Configuration" icon="gear" href="/installation">
|
|
343
|
-
Environment variables reference
|
|
344
|
-
</Card>
|
|
345
|
-
</CardGroup>
|