How openops-cloud/openops works
Project type and purpose
• OpenOps is a full-stack, No-Code FinOps automation platform.
• It consists of:
• A React-based browser UI (packages/react-ui & packages/ui-components)
• A TypeScript backend API (packages/server/api)
• A background worker (packages/server/worker)
• A sandboxed flow engine (packages/engine)
• A CLI (packages/cli)
• A library of “blocks” (packages/blocks/*) that connect to AWS, Azure, Slack, etc.
• Shared libraries (packages/server/shared & packages/shared) and end-to-end tests.
File structure for architectural hints
• Top-level directories:
• devcontainer, Docker, CI/CD files – containerized deployment
• deploy/docker-compose – local install
• nx.json & project.json – Nx monorepo orchestration
• packages/** – separate Nx projects (blocks, engine, openops core logic, react UI, server API, worker, CLI, UI-components, shared libs)
• tests-e2e – browser automation against real stack
• Notice “blocks” follow a plugin pattern (each integration is a block project).
• Backend uses controllers, modules, entities, migrations (Postgres & SQLite).
• Worker uses Redis as queue and pub/sub.
• Engine uses isolated-vm or v8-isolate for sandbox execution of workflow steps.
Extract additional insights from README
• OpenOps can be run as a managed service or via Docker-Compose locally.
• Deep integrations with cloud providers (AWS, Azure, GCP) plus Slack, GitHub, Jira, Snowflake, etc.
• Key domains: workflow editor & versioning, analytics, tables database, approvals.
Main components & interactions
a. Components
• Browser / React UI – user builds & runs workflows
• API Service – HTTP REST (Nest/Fastify) endpoints & WebSocket gateway
• PostgreSQL – primary data store for users, projects, flows, logs, templates
• Redis – message broker for queue and pub/sub (flow-runs, triggers, real-time updates)
• Worker – consumes Redis jobs, calls Engine, writes results back to API/DB
• Engine – sandboxed code executor that loads block definitions & runs steps
• Blocks Registry – Nx-managed packages of integration code (AWS, Azure, Slack, etc.)
• CLI – developer tooling to scaffold blocks/triggers and sync to server
• External Services – AWS, Azure, GCP, Slack, GitHub, Jira, Snowflake, Databricks, etc.
b. Data flows & relationships
1. User → React UI (HTTP / WebSocket) → API
2. API persists workflow definitions, version metadata → PostgreSQL
3. User triggers a flow run → API enqueues “flow-run” job in Redis
4. Worker subscribes to Redis queue → pulls job → invokes Engine
5. Engine loads block code & context → executes step(s) → returns events/results
6. Worker writes step results via API → API updates PostgreSQL
7. API publishes real-time progress via Redis pub/sub → WebSocket → React UI
8. Blocks call out to external cloud and SaaS APIs (AWS SDK, Azure REST, Slack API, etc.)
c. Architectural patterns & principles
• Modular plugin architecture for blocks – each integration is a self-contained Nx project
• Event-driven / message-oriented for decoupling (Redis queue/pubsub)
• Sandbox isolation for untrusted user code (isolated-vm or V8 isolate)
• Monorepo with Nx for fast, consistent builds & shared code
• Clear separation of concerns: UI, API, background processing, engine, data stores
d. Key technologies & frameworks
• React + Vite (packages/react-ui)
• Node.js + TypeScript + Fastify/Nest controllers (packages/server/api)
• Redis (queue + pub/sub)
• PostgreSQL (and SQLite for tests)
• isolated-vm / V8 isolate (packages/engine)
• Nx monorepo tooling, Jest/Karma for tests
• Docker / Docker-Compose for local environments
• GitHub Actions for CI/CD