Local Deployment infrastructure
Relevant source files
The following files were used as context for generating this wiki page:
Opificia AI provides a local deployment infrastructure designed for self-hosting and data sovereignty. This infrastructure allows operators to run the complete software factory loop—from ticket ingestion to pull request creation—on hardware and models they control. The system supports air-gapped environments, ensuring that no features require external vendor-hosted services.
Sources: README.md:12-16, SOVEREIGNTY.md:21-25
Architecture Overview
The local infrastructure follows a prototype stack consisting of a TypeScript-based application running on Node.js 24. It utilizes a PostgreSQL database for persistent storage, Valkey for caching/messaging, and NestJS for the server-side logic. The web interface is built with Vite, React, and Lucide icons.
Sources: AGENTS.md:12-15, README.md:18-21
Component Stack
| Component | Technology | Role |
|---|---|---|
| Runtime | Node.js 24 | Primary execution environment |
| Framework | NestJS | Server-side application logic |
| Database | PostgreSQL (via Prisma) | Data persistence for runs and events |
| Cache/Store | Valkey | State management and queueing |
| Frontend | React + Vite | Web-based operator interface |
| Workflow | pnpm 12 | Package and workspace management |
Sources: AGENTS.md:12-15, AGENTS.md:66-68
Sandbox and Runner Infrastructure
The local infrastructure executes agentic work within an isolated sandbox. This sandbox prevents agents from accessing sensitive host resources while allowing them to perform git operations, run tests, and execute bash commands.
The following diagram illustrates the interaction between the server and the local sandbox during an implementation task:
The server prepares a repository bundle from the local cache to provide the agent with a clean workspace inside the sandbox.
Sources: apps/server/src/worker/effects.service.ts:80-85, apps/server/src/worker/effects.service.ts:153-157
Networking and Security
Local deployments enforce strict network isolation to meet sovereignty commitments. The infrastructure supports three distinct network levels for sandbox environments:
- None: Total isolation with no internet access.
- Registries: Access restricted to package registries through a configured proxy.
- Open: Logged access to most HTTPS hosts through a proxy.
Sources: plugins/harness-claude/src/prompts.ts:6-12, SOVEREIGNTY.md:21-25
Data Sovereignty Controls
The infrastructure ensures that all operational data stays within the local environment. Telemetry is disabled by default and, if enabled, only connects to endpoints configured by the operator.
Sources: SOVEREIGNTY.md:33-36, SOVEREIGNTY.md:52-54
Local Development and Preview
Developers can serve specific parts of the infrastructure locally for testing and previewing changes.
Static Website Preview
The project website is a single static page with no build step. It can be served locally using Python's built-in HTTP server:
python3 -m http.server --directory website 8000
Sources: website/README.md:12-17
Web App Testing
The web app includes a fixture mode that allows testing the UI with recorded runs without requiring a running backend server.
pnpm --filter @opificia/web screenshot
Sources: AGENTS.md:79-84
Local Workspace Management
The project is structured as a pnpm workspace. The core server, web application, and SDKs are managed together to ensure compatibility during local deployment.
pnpm install
pnpm build # Generates Prisma client and builds contracts
pnpm test # Runs Vitest suites for all components
Sources: AGENTS.md:66-72
Summary
Opificia's local deployment infrastructure prioritizes self-hosting and control. By utilizing a stack of Node.js, PostgreSQL, and isolated sandboxes, it provides a secure environment for AI agents to automate software development tasks. The infrastructure's adherence to open standards and model-agnostic design allows it to function effectively even in air-gapped local networks.