No description
  • Go 59.8%
  • Go Template 19%
  • templ 14.3%
  • Shell 2.4%
  • HCL 1.5%
  • Other 3%
Find a file
2026-12-05 00:49:53 +00:00
.forgejo/workflows ci: retry the ci-values pin when main moved 2026-12-04 16:22:28 -03:00
.github ci: remove legacy GitHub workflows 2026-12-04 09:31:47 -03:00
deploy ui: migrate chat widget and agent detail to Preact islands 2026-12-04 20:19:46 -03:00
docs obs: platform telemetry plumbing and dashboards 2026-12-04 18:32:06 -03:00
infra deploy: 56108b7db3 [skip ci] 2026-12-05 00:49:53 +00:00
pkg obs: platform telemetry plumbing and dashboards 2026-12-04 18:32:06 -03:00
services api: pass request to fail in chat json handlers 2026-12-04 20:23:20 -03:00
.dockerignore ARTEX-NG: hexagonal microservices, templ UI, CI/CD 2026-12-04 05:01:18 -03:00
.env.example obs: platform telemetry plumbing and dashboards 2026-12-04 18:32:06 -03:00
.gitattributes fix(script): start.bat 改用 CRLF 并切 UTF-8 代码页 2026-09-12 05:32:09 -04:00
.gitignore docs: English-only repo text (translate CJK/Korean comments) 2026-12-04 09:16:46 -03:00
.pre-commit-config.yaml docs: English-only repo text (translate CJK/Korean comments) 2026-12-04 09:16:46 -03:00
docker-compose.micro.yml obs: platform telemetry plumbing and dashboards 2026-12-04 18:32:06 -03:00
docker-compose.obs.yml obs: platform telemetry plumbing and dashboards 2026-12-04 18:32:06 -03:00
go.mod obs: platform telemetry plumbing and dashboards 2026-12-04 18:32:06 -03:00
go.sum obs: platform telemetry plumbing and dashboards 2026-12-04 18:32:06 -03:00
go.work frontend: task chat link; sync parallel work 2026-12-04 14:16:18 -03:00
go.work.sum obs: platform telemetry plumbing and dashboards 2026-12-04 18:32:06 -03:00
Makefile.port ui: migrate chat widget and agent detail to Preact islands 2026-12-04 20:19:46 -03:00
README.md obs: platform telemetry plumbing and dashboards 2026-12-04 18:32:06 -03:00
SECURITY.md docs: English-only repo text (translate CJK/Korean comments) 2026-12-04 09:16:46 -03:00
VPS_PROVIDERS.md ARTEX-NG: hexagonal microservices, templ UI, CI/CD 2026-12-04 05:01:18 -03:00

ARTEX-NG

Reimplementation of artex-global as independent microservices. Every service is a Go module with the same shape:

services/<name>/
  domain/    pure types, rules and state machines (stdlib only)
  ports/     interfaces the domain needs
  app/       use cases, depending only on domain + ports
  adapters/  NATS, Postgres, Redis, S3, HTTP, provider APIs
  cmd/       composition root

Adapters point inward; the domain never imports an adapter. Contracts live in pkg/contracts (versioned artex.v1.*), platform plumbing in pkg/platform.

Services

Service Responsibility In Out
gateway edge, request IDs, Redis rate limit, reverse proxy HTTP api
api REST + templ/htmx UI, auth cookie HTTP NATS commands/queries
chatter per-task chat, Telegram topic bridge, announcements Telegram, NATS chat/events chat store, LLM, NATS commands
orchestrator task/intent state machine, durable dispatch NATS commands JetStream work
worker one intent per job, LLM loop + bash sandbox JetStream work results/activity
llm-gateway provider keys, streaming, failover, usage HTTP/SSE + NATS request/reply provider APIs
traffic MITM recorder, query API, bodies in S3 target traffic Postgres index + S3
catalog read model for tasks/assets/findings NATS queries Postgres (+Redis cache)
notifier finding fan-out, retry ladder, channels JetStream events webhooks
reporter report/export artifacts JetStream report jobs S3

Postgres owns metadata, JetStream owns hand-off and fan-out, Redis owns ephemeral state (rate limits, locks, cache), S3 owns bodies/artifacts.

Local development

make -f Makefile.port tidy
make -f Makefile.port verify     # build + vet + unit tests
make -f Makefile.port build      # binaries in bin/

A local topology is in docker-compose.micro.yml (Postgres, NATS, Redis, MinIO). Add docker-compose.obs.yml for Loki, Tempo and Grafana; see docs/observability.md.

CI/CD

Woodpecker (.woodpecker.yml) runs on every push to main: verify, build and push every image to the in-cluster Zot registry keyed by commit SHA, then helm upgrade the release in artex-apps. It never relies on a developer pushing images by hand.

Required repo secret: kubeconfig.

Kubernetes

infra/helm/artexng deploys the services plus Postgres, Redis, NATS and MinIO, with PDB-less single-replica stateful stores (fine for the current node pool), default-deny networking and one ingress.

helm upgrade --install artexng infra/helm/artexng -n artex-apps --create-namespace

The API asks for ADMIN_PASSWORD (generated by Helm) at /login.

Upstream

No import path references github.com/Autumn-27/artex; the old monolith is gone. Behaviour was reimplemented against the contracts, not vendored.