Skip to content

Remove realtime-api, memory-tools & platform app; clean up all references#488

Merged
locnguyen1986 merged 8 commits into
mainfrom
feat/code-improve
Jun 18, 2026
Merged

Remove realtime-api, memory-tools & platform app; clean up all references#488
locnguyen1986 merged 8 commits into
mainfrom
feat/code-improve

Conversation

@locnguyen1986

@locnguyen1986 locnguyen1986 commented Feb 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes three decommissioned components and all of their wiring/references across the monorepo, leaving every shipped service building cleanly.

Removed components

  • services/realtime-api/ — WebRTC/LiveKit realtime service (port 8186)
  • services/memory-tools/ — semantic memory service (port 8090)
  • apps/platform/ — Next.js admin & docs site (port 3000)
  • services/mcp-tools/tools/vector-store-service/ — BGE-M3 vector store sub-binary

Stats: 8 commits · 392 files · ~71.7k deletions.

What's in this PR

1. Component + docs/test removal (original feat/code-improve work)

  • Deletes the three components above, plus doc restructure, E2E test reorg (adds api.spec.ts), and the matching docker-compose.yml / Makefile cleanup.

2. Dead infra/CI/config wiring removed (822b66c5)

  • CI: dropped build-realtime-api / build-memory-tools / build-vector-store jobs + path filters (ci-backend-dev.yml, deprecated-ci-backend-prod.yml) — these referenced deleted Dockerfiles and would fail CI.
  • Kong: removed the realtime-api-svc route from kong.yml and the Helm kong-deployment.yaml template.
  • k8s: deleted the realtime-api deployment/secret templates and the realtimeApi values blocks in all three values files.
  • Monitoring: removed the memory-tools Prometheus scrape job + alert.
  • Config: removed the Realtime/LiveKit block from .env.template and the dev:platform/build:platform scripts from root package.json.

3. memory-tools client integration removed from shipped services (5c6ed183)

  • llm-api: deleted the internal/infrastructure/memory client, memory_handler.go, the chat-handler load/observe calls, the ProvideMemoryClient/ProvideMemoryHandler providers (wire regenerated), and the MEMORY_* config.
  • mcp-tools: deleted the memory_retrieve MCP tool and its wiring; removed MEMORY_TOOLS_URL / MCP_ENABLE_MEMORY_RETRIEVE.
  • go-common: removed the unused realtime-api analytics events.
  • Kept (deliberately, to avoid a DB migration / API-contract change): the DB-persisted UserSettings.MemoryConfig, the generic prompt MemoryModule (fed by header/conversation memory), and mcp-tools VECTOR_STORE_URL (used by file_search).

4. Final cleanup + build-break fixes (a0803cea)

  • Fixed two pre-existing compile breaks the branch had introduced:
    • jan-cli: removed the dangling docsCmd registration (cmd_docs.go was deleted). jan-cli compiles again.
    • mcp-tools: deleted the stale, out-of-sync root main.go and pointed build-mcp + the swagger generator at ./cmd/server (the authoritative wire entrypoint Docker builds). go build ./... now passes.
  • jan-cli: removed the realtime/memory setup-wizard wiring and the realtime-api swagger entries.
  • Env examples (.env.template, config/production.env.example) and three Grafana dashboards cleaned of memory-tools/bge-m3 references.
  • Regenerated mcp-tools swagger (drops memory_retrieve) and the combined spec (drops realtime + memory).

Verification

  • go build ./... passes for llm-api, mcp-tools, response-api, media-api, and jan-cli.
  • go vet clean on changed Go packages.
  • All edited YAML / JSON (Kong, k8s values, Prometheus, Grafana dashboards, swagger specs) validated.

Notes

  • This branch consolidates the previously-stacked chore/remove-memory-realtime-refs and chore/finish-memory-realtime-cleanup branches (fast-forwarded in), so they're now redundant and can be deleted.
  • Out of scope (pre-existing): go vet non-constant-format-string warnings in tools/jan-cli/cmd_request.go.

- Remove expired docs (roadmap, kubernetes, user-management-todo, image-generation)
- Consolidate search-related guides (exa, tavily, search-fallback)
- Update docs layout navigation to match current structure
- Sync web app docs to use markdown files with path mapping
- Update API, architecture, guides, and configuration docs
- Remove duplicate Postman collections (response-aio, response-agent-slide)
- Add comprehensive API test suite (api.spec.ts) for auth, models,
  chat, conversations, media, and health checks
- Add tests/e2e/automation/README.md with structure documentation
- Update Playwright config with API-only project

Current structure:
- 18 Postman collections (reduced from 20)
- 2 Playwright spec files (increased from 1)
- API coverage: auth, models, chat, conversations, media, health
Copilot AI review requested due to automatic review settings February 8, 2026 09:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears to decommission the apps/platform Next.js application (admin panel + docs) by removing the app’s code, documentation content, build tooling, and related CI workflows, and then updating top-level repository docs to reflect the new structure.

Changes:

  • Removed the apps/platform application (admin UI + Fumadocs-based docs) and its supporting scripts/config.
  • Deleted large portions of MDX documentation and generated API reference content that lived under apps/platform/content.
  • Removed CI workflows and release jobs that built/deployed the platform app (and also removed some service image build jobs), and updated repo documentation (README/AGENTS/CLAUDE) to match.

Reviewed changes

Copilot reviewed 137 out of 353 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/platform/src/app/admin/mcp-tools/page.tsx Removed MCP tools admin page as part of platform app decommission.
apps/platform/src/app/admin/mcp-tools/components/mcp-tool-modal.tsx Removed MCP tool edit modal with platform app removal.
apps/platform/src/app/admin/layout.tsx Removed admin layout and access checks (platform app removed).
apps/platform/src/app/(private)/layout.tsx Removed private layout wrapper (platform app removed).
apps/platform/src/app/(home)/page.tsx Removed platform home page (platform app removed).
apps/platform/src/app/(home)/layout.tsx Removed platform home layout (platform app removed).
apps/platform/source.config.ts Removed Fumadocs config as docs site is removed.
apps/platform/source.config.mjs Removed Fumadocs re-export stub with platform decommission.
apps/platform/scripts/test-import.ts Removed fumadocs import test script (no longer needed).
apps/platform/scripts/setup-env.sh Removed platform env setup helper script.
apps/platform/scripts/setup-env.bat Removed Windows platform env setup helper script.
apps/platform/scripts/generate-fumadocs-openapi.ts Removed OpenAPI→Fumadocs generation script with docs removal.
apps/platform/scripts/README.md Removed platform scripts documentation.
apps/platform/postcss.config.mjs Removed platform PostCSS config.
apps/platform/package.json Removed platform package definition/scripts/deps.
apps/platform/next.config.mjs Removed platform Next.js config (MDX integration).
apps/platform/eslint.config.mjs Removed platform ESLint config.
apps/platform/content/docs/runbooks/monitoring.mdx Removed runbook doc content from platform docs tree.
apps/platform/content/docs/runbooks/meta.json Removed runbooks nav metadata (platform docs removed).
apps/platform/content/docs/runbooks/index.mdx Removed runbooks index page (platform docs removed).
apps/platform/content/docs/quickstart.mdx Removed platform-hosted quickstart doc.
apps/platform/content/docs/meta.json Removed platform docs root navigation metadata.
apps/platform/content/docs/guides/user-settings-personalization.mdx Removed guide from platform docs tree.
apps/platform/content/docs/guides/troubleshooting.mdx Removed troubleshooting guide from platform docs tree.
apps/platform/content/docs/guides/services-template.mdx Removed services template guide from platform docs tree.
apps/platform/content/docs/guides/monitoring.mdx Removed monitoring guide from platform docs tree.
apps/platform/content/docs/guides/meta.json Removed guides nav metadata (platform docs removed).
apps/platform/content/docs/guides/mcp-testing.mdx Removed MCP testing guide from platform docs tree.
apps/platform/content/docs/guides/mcp-admin-interface.mdx Removed MCP admin interface guide from platform docs tree.
apps/platform/content/docs/guides/kong-plugins.mdx Removed Kong plugins guide from platform docs tree.
apps/platform/content/docs/guides/index.mdx Removed guides index page (platform docs removed).
apps/platform/content/docs/guides/background-mode.mdx Removed background mode guide from platform docs tree.
apps/platform/content/docs/guides/authentication.mdx Removed authentication guide from platform docs tree.
apps/platform/content/docs/conventions/workflow.mdx Removed workflow conventions doc from platform docs tree.
apps/platform/content/docs/conventions/meta.json Removed conventions nav metadata (platform docs removed).
apps/platform/content/docs/conventions/conventions.mdx Removed conventions quick reference from platform docs tree.
apps/platform/content/docs/conventions/architecture-patterns.mdx Removed architecture patterns doc from platform docs tree.
apps/platform/content/docs/configuration/service-migration.mdx Removed configuration migration doc from platform docs tree.
apps/platform/content/docs/configuration/meta.json Removed configuration nav metadata (platform docs removed).
apps/platform/content/docs/configuration/kubernetes.mdx Removed k8s config doc from platform docs tree.
apps/platform/content/docs/configuration/index.mdx Removed configuration system doc from platform docs tree.
apps/platform/content/docs/configuration/docker-compose.mdx Removed docker-compose config doc from platform docs tree.
apps/platform/content/docs/architecture/system-design.mdx Removed architecture system design doc from platform docs tree.
apps/platform/content/docs/architecture/services.mdx Removed architecture services doc from platform docs tree.
apps/platform/content/docs/architecture/security.mdx Removed security architecture doc from platform docs tree.
apps/platform/content/docs/architecture/security-advanced.mdx Removed advanced security doc from platform docs tree.
apps/platform/content/docs/architecture/observability.mdx Removed observability doc from platform docs tree.
apps/platform/content/docs/architecture/meta.json Removed architecture nav metadata (platform docs removed).
apps/platform/content/docs/architecture/index.mdx Removed architecture index doc from platform docs tree.
apps/platform/content/docs/architecture/data-flow.mdx Removed data flow doc from platform docs tree.
apps/platform/content/docs/api-reference/server-api/version/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/server-api/readyz/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/server-api/meta.json Removed generated API reference nav metadata.
apps/platform/content/docs/api-reference/server-api/healthz/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/projects-api/projects/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/projects-api/projects/patch.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/projects-api/projects/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/projects-api/projects/delete.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/projects-api/meta.json Removed generated API reference nav metadata.
apps/platform/content/docs/api-reference/model-api/models/providers/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/model-api/models/catalogs/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/model-api/meta.json Removed generated API reference nav metadata.
apps/platform/content/docs/api-reference/meta.json Removed API reference root nav metadata (platform docs removed).
apps/platform/content/docs/api-reference/conversations-api/meta.json Removed generated API reference nav metadata.
apps/platform/content/docs/api-reference/conversations-api/conversations/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/conversations-api/conversations/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/conversations-api/conversations/delete.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/conversations-api/conv-public-id/items/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/conversations-api/conv-public-id/items/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/conversations-api/conv-public-id/items/delete.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/chat-completions-api/models/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/chat-completions-api/meta.json Removed generated API reference nav metadata.
apps/platform/content/docs/api-reference/chat-completions-api/completions/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/chat-completions-api.mdx Removed API overview page (platform docs removed).
apps/platform/content/docs/api-reference/backward-compatibility.mdx Removed API compatibility doc (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/validate/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/validate-api-key/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/upgrade/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/revoke/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/refresh-token/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/meta.json Removed generated API reference nav metadata.
apps/platform/content/docs/api-reference/authentication-api/me/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/logout/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/login/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/guest-login/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/callback/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/api-keys/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/api-keys/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/authentication-api/api-keys/delete.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-provider-api/providers/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-provider-api/providers/patch.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-provider-api/providers/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-provider-api/meta.json Removed generated API reference nav metadata.
apps/platform/content/docs/api-reference/admin-model-api/models/provider-models/patch.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-model-api/models/provider-models/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-model-api/models/provider-models/bulk-toggle/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-model-api/models/catalogs/patch.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-model-api/models/catalogs/get.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-model-api/models/catalogs/bulk-toggle/post.mdx Removed generated API reference page (platform docs removed).
apps/platform/content/docs/api-reference/admin-model-api/meta.json Removed generated API reference nav metadata.
apps/platform/components.json Removed shadcn/ui components config for platform app.
apps/platform/cli.json Removed platform-local CLI alias config.
apps/platform/Dockerfile Removed platform Docker build definition.
apps/platform/.yarnrc.yml Removed platform Yarn config.
apps/platform/.source/source.config.mjs Removed generated Fumadocs source config output.
apps/platform/.prettierrc.json Removed platform Prettier config.
apps/platform/.gitignore Removed platform-specific gitignore.
apps/platform/.env.example Removed sample env for platform app.
apps/platform/.dockerignore Removed platform dockerignore.
README.md Updated repo docs to remove platform app + realtime references and adjust commands.
CLAUDE.md Updated contributor/agent guide to reflect removal of platform app and optional services list changes.
AGENTS.md Updated agent overview to reflect removal of platform app and some service references.
.github/workflows/services-release-prod.yml Removed release builds for memory-tools/vector-store/realtime images.
.github/workflows/deprecated-ci-app-platform-prod.yml Removed deprecated platform CI workflow file.
.github/workflows/ci-production-release.yml Removed production release builds for memory-tools/vector-store/realtime/platform.
.github/workflows/ci-app-platform-dev.yml Removed platform CI workflow file.
.github/workflows/app-platform-release-prod.yml Removed platform release workflow file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md
| Framework | Gin (HTTP), zerolog (logging), Wire (DI) |
| ORM | GORM + goose migrations |
| Database | PostgreSQL (ankane/pgvector:latest for API, postgres:18 for Keycloak) |
| Database | PostgreSQL (postgres:18 for Keycloak) |

Copilot AI Feb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This row now reads like PostgreSQL is only used for Keycloak, but this document still describes the Go services using an ORM (GORM) and migrations, which implies a primary service database as well. Consider updating the Database entry to explicitly cover the main application Postgres (and any extensions like pgvector if still in use), and separately note the Keycloak DB image/version.

Suggested change
| Database | PostgreSQL (postgres:18 for Keycloak) |
| Database | PostgreSQL for core services (GORM + goose migrations, optional pgvector); PostgreSQL (postgres:18) for Keycloak |

Copilot uses AI. Check for mistakes.
Comment thread README.md
```bash
# Start services
make up-full # Full stack (all 4 APIs + infrastructure)
make up-full # Full stack (all APIs + infrastructure)

Copilot AI Feb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "all APIs" is a bit ambiguous in a repo that has optional components/profiles; it may help readers if this comment names the intended set (e.g., "LLM/Response/Media/MCP + infrastructure") or clarifies whether optional profiles are included/excluded.

Suggested change
make up-full # Full stack (all APIs + infrastructure)
make up-full # Full stack (LLM/Response/Media APIs + MCP tools + infrastructure)

Copilot uses AI. Check for mistakes.
…s/platform

The feat/code-improve branch deleted the realtime-api, memory-tools, and
platform components but left their build/deploy wiring in place. Remove the
orphaned references that would otherwise break CI and deploys:

- CI: drop build-realtime-api/build-memory-tools/build-vector-store jobs and
  their path filters from ci-backend-dev.yml and deprecated-ci-backend-prod.yml
- Kong: remove realtime-api-svc route from kong.yml and the Helm
  kong-deployment.yaml template
- k8s: delete realtime-api deployment/secret templates and the realtimeApi
  values blocks in values.yaml, values-development.yaml, values-production.yaml
- Monitoring: drop the memory-tools scrape job and alert from Prometheus
- Config: remove the Realtime API/LiveKit block from .env.template and the
  dev:platform/build:platform scripts from package.json

The llm-api/mcp-tools memory client code, jan-cli setup wizard, and go-common
analytics events still reference the removed services. They are feature-flagged
and build cleanly; left for a separate change that includes wire/swagger regen.
The memory-tools service was deleted on feat/code-improve, leaving dead
client/integration code in the shipped Go services. Remove the code that
talked to the (now-gone) memory-tools HTTP service:

llm-api:
- Delete internal/infrastructure/memory client package and the chathandler
  memory_handler.go
- Remove ProvideMemoryClient / ProvideMemoryHandler and their wire-set
  members; regenerate wire_gen.go (hand-edited: wire CLI can't regen this
  tree due to a pre-existing interface{} provider on ImageHandler)
- Strip the memory load/observe calls and dead memclient formatters from
  chat_handler.go; remove MEMORY_ENABLED/MEMORY_BASE_URL/MEMORY_TIMEOUT config
- Keep: header/conversation-based prompt memory (collectPromptMemory), the
  generic prompt MemoryModule, and the DB-persisted UserSettings.MemoryConfig
  (removing it would require a migration + settings API change)

mcp-tools:
- Delete the memory_retrieve MCP tool (memory_mcp.go) and its wiring in
  mcp_route.go, routes_provider.go, main.go, and wire_gen.go
- Remove MEMORY_TOOLS_URL / MCP_ENABLE_MEMORY_RETRIEVE config
- Keep VECTOR_STORE_URL (still used by search_mcp file_search)

go-common:
- Remove the unused realtime-api analytics events (realtime-api was deleted)

Verified: go build + go vet pass for llm-api, mcp-tools (cmd/server, the
shipped entrypoint), response-api, and media-api.

Deferred to a follow-up: jan-cli setup-wizard realtime/memory removal,
env-example cleanup, Grafana dashboard panels, and swagger regen (make
swagger runs through jan-cli, which is currently broken on this branch).
Completes the removal of the deleted memory-tools/realtime-api/platform
references and fixes two compile breaks the feat/code-improve branch left behind.

Build breaks fixed:
- jan-cli: remove dangling rootCmd.AddCommand(docsCmd) in main.go (cmd_docs.go
  was deleted on the branch). jan-cli now compiles again.
- mcp-tools: delete the stale root main.go (perpetually out of sync — it lacked
  the GitHub/Gmail/Drive/Calendar connector args and didn't compile). cmd/server
  is the authoritative wire-based entrypoint (what Docker builds), so point
  Makefile build-mcp and the jan-cli swagger generator at ./cmd/server instead.
  mcp-tools 'go build ./...' now passes.

jan-cli cleanup:
- cmd_setup.go: drop the realtime + memory-tools setup wizard (flags, prompts,
  LiveKit/embedding config, profile appends, helpers applyMemoryDefaults/
  applyRealtimeDefaults/disableRealtime/applyMemorySettings/setMemoryDefaults/
  configureMemoryOptions, and the Realtime status line)
- cmd_swagger.go: remove realtime-api from the services list and combine logic
  (it made 'make swagger' fail), and generate mcp-tools docs from ./cmd/server

Env examples:
- .env.template: drop MEMORY_DB_* and MCP_ENABLE_MEMORY_RETRIEVE (keep VECTOR_STORE_*)
- config/production.env.example: drop the Memory Tools section (MEMORY_TOOLS_PORT,
  EMBEDDING_SERVICE_URL/bge-m3, EMBEDDING_CACHE_*, MEMORY_LOG_*, MEMORY_DB_*) and
  MCP_ENABLE_MEMORY_RETRIEVE (keep VECTOR_STORE_URL)

Grafana: remove memory-tools panel/targets from the service-overview,
performance-analysis, and error-analysis dashboards (all re-validated as JSON).

Swagger: regenerate mcp-tools docs (drops memory_retrieve) and the combined spec
(drops realtime + memory_retrieve) via jan-cli swagger generate/combine.

Verified: go build ./... passes for mcp-tools and jan-cli; all dashboards and
the combined swagger spec are valid JSON.
@locnguyen1986 locnguyen1986 changed the title Feat/code improve Remove realtime-api, memory-tools & platform app; clean up all references Jun 18, 2026
@locnguyen1986 locnguyen1986 merged commit 023e412 into main Jun 18, 2026
3 of 9 checks passed
@locnguyen1986 locnguyen1986 deleted the feat/code-improve branch June 18, 2026 14:58
@github-project-automation github-project-automation Bot moved this to QA in Jan Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: QA

Development

Successfully merging this pull request may close these issues.

3 participants