Infrastructure
Infrastructure and architecture map of the Adapta ONE ecosystem — service-to-service communication, deployment, local development, and CI/CD.
Document generated from reading the
github.com/adapta-schoolorganization (≈40 repositories, all private except the*-releases). Starting point:adapta-one-agentis a full-stack Next.js app — the web frontend and the backend (API routes) live in the same repo, and this same API is consumed byadapta-one-mobile. From there we mapped the remaining product and infrastructure repositories.
Read date: 2026-06-24.
1. Block overview (by subsystem)
The organization contains four product lines + a cross-cutting infrastructure/automation layer:
| Line | Repositories |
|---|---|
| Adapta ONE (agent) | adapta-one-agent (web+API), adapta-one-mobile, adapta-one-agent-desktop (+-releases), adapta-one, adapta-one-global, one-admin, adapta-chroma, opera-ui |
| ONE backends | adapta-one-agent-backend, adapta-one-backend, adapta-one-agentic-backend |
| ONE microservices | adapta-one-document-rag, adapta-one-sheet-services, adapta-one-document-services, adapta-one-youtube-services, adapta-one-agent-credits-service, adapta-one-agent-chat-export, adapta-one-agent-notification, adapta-one-scheduler-service, adapta-deep-research, mobile-voice-chat-server, revenuecat-webhook, adapta-internal-services |
| Adapta Wizard (formerly Meetings) | adapta-wizard, adapta-wizard-backend, adapta-wizard-releases |
| Adapta Plays | adapta-plays, adapta-plays-scheduler-service, adapta-plays-sheet-service, adapta-plays-webhook-test-microservice |
| Infra / CI-CD / Automation | iac-terraform, iac-kubernetes, github-actions-workflows, n8n-pipeline, n8n-workflows-src |
| Ops (standalone script) | adapta-one-product-ops |
2. Communication diagram — Adapta ONE ecosystem
Runtime communication connections between the subsystems. The arrows indicate who calls whom (direction of the request).
Summary of the main connections:
adapta-one-mobilehas no backend of its own — it talks toadapta-one-agent(agent.adapta.one) for agent resources, toadapta-one-agent-backend(api-agent.adapta.one) as the external backend, and toone-adminfor the model catalog. It always sendsAuthorization: Bearer <Clerk token>+X-Client-Platform: mobile.adapta-one-agentis the hub: it serves the web UI, is the API for mobile/desktop, calls the microservices (RAG, sheet), the external backend, and the LLMs. It also syncs the Prisma schema toadapta-one-agent-backendandadapta-one-agent-chat-export(workflowsync-prisma-schema.yml).- Several microservices call back to the central backend under different variable names:
AGENT_BACKEND_URL,ADAPTA_ONE_AGENT_URL,ONE_API_BASE_URL,MAIN_SERVICE_URL,ONE_BACKEND_URL. - Auth is cross-cutting: Clerk across almost the entire ecosystem (exception:
one-adminuses Better Auth). - Redis is the common broker (BullMQ in
scheduleranddeep-research); PostgreSQL via Prisma is the standard database for the Node services; vector storage in Qdrant/Astra.
3. Infrastructure & deployment diagram (whole org)
How code becomes production. There are two deployment patterns that coexist.
Map of "how each repo is delivered"
| Pattern | Repositories |
|---|---|
| A — Vercel (deploy via Git integration, no deploy GitHub Actions) | adapta-one-agent, adapta-one, adapta-one-global, one-admin, adapta-chroma, adapta-plays |
B — ECR → ArgoCD → EKS (reusable workflows + Helm chart/ in the repo) | adapta-one-agent-backend, adapta-one-backend, adapta-one-agentic-backend, adapta-one-document-rag, adapta-one-sheet-services, adapta-one-agent-credits-service, adapta-one-agent-chat-export, adapta-one-agent-notification, adapta-one-scheduler-service, adapta-wizard-backend, n8n-pipeline |
| Electron + GitHub Releases (auto-update) | adapta-one-agent-desktop → …-desktop-releases; adapta-wizard → adapta-wizard-releases |
| EAS Build / OTA (Expo) | adapta-one-mobile |
| GitHub Packages (private npm) | opera-ui (semantic-release) |
| Docker/Procfile or no CI defined | adapta-one-document-services, adapta-one-youtube-services, mobile-voice-chat-server, revenuecat-webhook, adapta-deep-research, adapta-internal-services, adapta-plays-sheet-service, adapta-plays-webhook-test-microservice |
| GitOps (declarative definition, no pipeline) | iac-kubernetes (ArgoCD auto-sync), n8n-workflows-src |
| Terraform/Atlantis (PR comment plan/apply) | iac-terraform |
| Local script | adapta-one-product-ops |
AWS layer (provisioned by
iac-terraform, primary regionsa-east-1, account720035686972): EKS, ~15 ECR repositories, RDS (dedicated Aurora + Postgres: credits, notification, one-admin, wizard…), DynamoDB, S3, SQS, KMS, CloudFront, WAF, Lambda, Route53/ACM/SES, and the OIDC rolegithub-actions-org-adapta-schoolthat CI assumes. In-cluster layer (iac-kubernetesvia ArgoCD): cert-manager, ingress-nginx, AWS ALB, Envoy Gateway, external-secrets, Karpenter, Velero, Datadog, Redis operator, and the n8n stack (DEV/PROD) on the marketing cluster (us-east-1).
4. Per-repository blocks (quick reference)
Adapta ONE line (clients)
adapta-one-agent— Next.js 16 / React 19, full-stack (front + ~235 API routes). Ecosystem hub. Clerk auth, Prisma/Postgres, Vercel AI SDK, Redis/Upstash, QStash, Qdrant. Deploy via Vercel. CI: quality-checks (typecheck/lint/test/Sonar) + Lighthouse + Prisma schema sync.adapta-one-mobile— Expo SDK 55 / RN 0.83. Mobile client; consumesadapta-one-agent+adapta-one-agent-backend+one-admin. Clerk + Apple Auth, RevenueCat, Amplitude, Sentry. EAS build + OTA (no GitHub Actions).adapta-one-agent-desktop(+-releases) — Electron 28/React 18 "Adapta ONE 26". Consumes the API, the external backend, and the wizard-backend. Release via electron-builder → releases repo.adapta-one/adapta-one-global— earlier Next.js 14 frontends of the product (Vercel).adapta-oneconnects to the agent-backend viaNEXT_PUBLIC_API_AGENT_URL.one-admin— Next.js 16, admin panel for the model catalog consumed by web/mobile/desktop. Better Auth, Prisma/Postgres, publishes the catalog to Vercel Edge Config.adapta-chroma— despite the name, it is not a vector DB: it is the admin back-office (companies/users/licenses/announcements/analytics). Next.js 15, Clerk, Prisma, Sanity, S3, BigQuery. Deploy via Vercel.opera-ui— shared design system (@adapta-school/opera-ui), shadcn/ui + Storybook, published to GitHub Packages.
ONE backends (Fastify/Mastra, EKS)
adapta-one-agent-backend— active backend (api-agent.adapta.one). Fastify + Mastra, Prisma/Postgres, Redis, BullMQ, Astra/Qdrant, S3. Calls RAG and Sheet.adapta-one-backend— legacy/established backend (one-backend). Almost identical stack; extra integrations (MercadoPago, Cademi, HubSpot, WhatsApp).adapta-one-agentic-backend— lean prototype (Bun + Fastify + Mastra), agent memory in Postgres.
ONE microservices
adapta-one-document-rag— RAG/OCR/PPT (Fastify, Reducto, Textract, LangChain). EKS.adapta-one-sheet-services— spreadsheet analysis (FastAPI + pandas + OpenAI). EKS.adapta-one-document-services— document rerank/split (FastAPI + sentence-transformers). Docker/Procfile.adapta-one-youtube-services— YouTube video transcription (FastAPI). Docker/Procfile.adapta-one-agent-credits-service— credits service (Fastify + Prisma + Clerk). EKS.adapta-one-agent-chat-export— SQS worker: exports chats, decrypts, S3 + email. EKS.adapta-one-agent-notification— announcements/notifications (Fastify + Clerk + S3/CloudFront). EKS.adapta-one-scheduler-service— BullMQ scheduler (Outlook/Paragon, post-meeting actions). EKS.adapta-deep-research— asynchronous deep research (BullMQ worker + WS gateway, Firecrawl, AI SDK). Docker (no GH Actions). ⚠️ Redis Cloud credentials committed indocker-compose.yml.mobile-voice-chat-server— WebSocket proxy for voice/realtime (OpenAI Realtime + Gemini). Plain Node.revenuecat-webhook— RevenueCat subscription webhook → provisions licenses inone-backend. Plain Node.adapta-internal-services— user provisioning + Cademi/Resend integration (Fastify + Clerk + Prisma).
Adapta Wizard (formerly "Adapta Meetings")
adapta-wizard(+-releases) — Electron desktop for meeting capture/transcription/chat.adapta-wizard-backend— Express API dedicated to the Wizard (Prisma, Clerk, AssemblyAI, S3/KMS, Paragon). EKS. Also called byadapta-one-agent-desktop.
Adapta Plays
adapta-plays— Next.js web product (Vercel). Astra vector, MeetGeek, scheduler, WhatsApp/WS.adapta-plays-scheduler-service— BullMQ jobs (Express + Redis).adapta-plays-sheet-service— spreadsheet processing (FastAPI).adapta-plays-webhook-test-microservice— webhook testing utility (WS + JWT).
Infra / CI-CD / Automation
iac-terraform— Terraform + Terragrunt + Atlantis. Provisions the entire AWS base (EKS, ECR, RDS, S3, SQS, IAM/OIDC, DNS, CloudFront). State in S3 + DynamoDB lock.iac-kubernetes— ArgoCD GitOps (App-of-Apps + ApplicationSet matrix). Add-ons, operators, and the n8n stack. Auto-sync with prune + self-heal.github-actions-workflows— library of reusable workflows (create-release,build-image-to-ecr,scan-analyze,deploy-argocd). It is the org's CI/CD standard.n8n-pipeline— control plane that promotes n8n workflows from DEV (flow-dev.adaptahub.org) to read-only PROD (flow.adaptahub.org). Deployed via Pattern B.n8n-workflows-src— GitOps store of workflow artifacts (workflow.json+manifest.json+history/).adapta-one-product-ops— standalone Python script to categorize feedback (OpenAI). No deploy.
5. Local development quick start
Common prerequisites: Node (use each repo's
.nvmrc), pnpm (ONE apps) or npm (mobile), Docker (microservices/Postgres), and the variables from.env.example/.env. Auth via Clerk requires dev keys. Do not commit secrets.
adapta-one-agent (web + API — the hub)
cd adapta-one-agent
nvm use # Node 22.18.0
pnpm install
pnpm prisma:generate # gera o client Prisma
cp .env.example .env # preencha CLERK_*, DATABASE_URL, REDIS_URL, AI_GATEWAY_API_KEY, etc.
pnpm dev # Next.js em http://localhost:3000
# qualidade: pnpm typecheck && pnpm lint && pnpm testadapta-one-mobile (Expo / React Native)
cd adapta-one-mobile
nvm use
npm install
cp .env.example .env # EXPO_PUBLIC_API_URL=https://agent.dev.adapta.one
# EXPO_PUBLIC_EXTERNAL_BACKEND=https://api-agent-dev.adapta.one
# EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=...
npx expo start # ou: npm run ios / npm run androidBy default the app points to the remote dev environments (
*.dev.adapta.one). To run against a local backend, pointEXPO_PUBLIC_API_URLto youradapta-one-agent(use the LAN IP, notlocalhost, on a physical device).
Backends (adapta-one-agent-backend / adapta-one-backend)
cd adapta-one-agent-backend
pnpm install
pnpm prisma generate
cp .env.example .env # CLERK_*, DATABASE_URL (Postgres), REDIS_URL, chaves de LLM
docker compose up -d # quando houver compose (Postgres/Redis locais)
pnpm dev # FastifyPython microservices (sheet / document / youtube)
cd adapta-one-sheet-services
python3.9 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8080 # OPENAI_API_KEY / AWS_* no ambienteNode microservices with a queue (scheduler-service, deep-research)
cd adapta-one-scheduler-service
npm install
docker compose up -d redis # backend do BullMQ
cp .env.example .env # REDIS_URL, ONE_API_BASE_URL, JWT_SECRET
npm run dev # dashboard Bull Board em /admin/queuesDesktop apps (Electron)
cd adapta-one-agent-desktop # ou adapta-wizard
pnpm install
cp .env.example .env # RENDERER_API_URL, MAIN_CLERK_*, etc.
pnpm devInfra
# iac-terraform (NÃO aplica em prod localmente — use Atlantis via PR)
cd iac-terraform/cloud/aws/.../<env>/.../<service>
terragrunt plan
# iac-kubernetes — é declarativo; valide o chart localmente
helm dependency build <path-do-chart> && helm template <path-do-chart>6. CI/CD — what happens after a PR is merged into main
There are two flows depending on the repository type.
Flow A — Next.js frontends (Vercel)
Repos: adapta-one-agent, adapta-one, adapta-one-global, one-admin, adapta-chroma, adapta-plays.
- PR opened → the quality CI runs (in
adapta-one-agent:quality-checks-standards.yml→prisma:generate, typecheck, lint,test:coverage, SonarQube + quality gate,pnpm audit; plus Lighthouse). - Merge into the environment branch (
development/production) → Vercel's Git integration detects the push and performs an automatic build + deploy (no deploy GitHub Actions).vercel.jsondefines the functions'maxDuration(up to 800s for streaming). adapta-one-agentalso triggerssync-prisma-schema.ymlon merge, propagating the Prisma schema toadapta-one-agent-backendandadapta-one-agent-chat-export.
There is no image promotion: Vercel creates preview deployments per PR and promotes the build from the production branch.
Flow B — Containerized services (ECR → ArgoCD → EKS)
Repos: all backends/microservices with chart/ + .github/workflows/ci-*.yaml (e.g.: adapta-one-agent-backend, -credits-service, -chat-export, -notification, -document-rag, -sheet-services, scheduler-service, adapta-wizard-backend, n8n-pipeline).
Each repo calls the reusable workflows from adapta-school/github-actions-workflows@vX.Y.Z. The chain after the push to the environment branch (develop / staging / production):
Step by step:
- Trigger — a push to the environment branch (
develop/staging/production) triggersci-<env>.yaml. Docs-only changes are ignored. create-release— computes the next semver (semver-release-action) and creates a GitHub Release/tag; produces therelease-tagused as the image tag and as the revision in ArgoCD.build-image-to-ecr— authenticates to AWS via OIDC (rolegithub-actions-org-adapta-school, no static credentials), runsdocker buildx(cross-build arm64/Graviton) and pushes the image to ECR (account720035686972), with tags:latestand:<release-tag>, injecting Datadog Git metadata.scan-analyze(optional) — SonarQube (thescheduler-service, for example, skips this step).deploy-argocd— via the ArgoCD CLI againstargocd.foundation.management.adapta.tools:argocd app create --upsertpointing to the app's own repo (pathchart/,revision=<release-tag>,--values values-<env>.yaml,--helm-set image.tag=<release-tag>andrun_migrations), followed byargocd app sync(or letting auto-sync act).- ArgoCD reconciles on EKS: it renders the Helm with the new tag, runs migrations via Helm hooks, and brings up the pods on Graviton/ARM64 nodes autoscaled by Karpenter, behind ALB/ingress-nginx/Envoy, using RDS/Redis/S3/SQS and secrets via external-secrets, with Datadog observability.
Base provisioned separately: infra changes (clusters, ECR, RDS, IAM, DNS) live in
iac-terraformand follow PR → Atlantis (plan/applyby comment). In-cluster platform changes (add-ons, operators, n8n stack) live iniac-kubernetesand are applied by ArgoCD auto-sync (App-of-Apps + ApplicationSet) — with no image pipeline.
Other release flows
- Desktop (Electron) —
mac-release.yml/windows-release.ymlrunelectron-builder, sign and publish artifacts to the*-releasesrepos; clients receive them via auto-update. - Mobile (Expo) — no GitHub Actions: releases via EAS Build + store submit, and fixes via EAS Update (OTA); both triggered manually by the npm scripts.
opera-ui—ci-cd.ymlwith semantic-release publishes the npm package to GitHub Packages.- n8n —
n8n-pipelinepromotes workflows (not an image) from DEV→PROD and versions them inn8n-workflows-src. Then8n-customimage bump is manual iniac-kubernetes.
7. Notes and points of attention
adapta-chroma≠ vector database — it is a Next.js admin panel; the name is misleading.adapta-one-agent-notification— the README is a mistaken copy ofchat-export's; the code/package.jsonis the correct source.- ⚠️
adapta-deep-research—docker-compose.ymlcontains a Redis Cloud connection string with committed credentials; it is recommended to rotate it and move it to secrets. masterbranch in docs — several READMEs citemasterfor ArgoCD/Atlantis, but the real default ismain(and ArgoCD usesrevision: HEAD). Outdated documentation.- Backend convergence —
adapta-one-backend(legacy),adapta-one-agent-backend(active), andadapta-one-agentic-backend(prototype) share the package nameadapta-one-backend, indicating evolution from a common template.