No description
  • TypeScript 95.2%
  • CSS 4%
  • Shell 0.5%
  • Dockerfile 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
reinitialized 1949f70de9
Some checks failed
Immutable Bleu image release / validate (push) Failing after 1m22s
Immutable Bleu image release / publish (push) Has been skipped
Terse task docs-refresh: Refresh the audit register and release-readi…
Outcome:
Updated the approved documentation scope:

- `docs/repository-audit.md`
- `docs/release-readiness.md`

Changes include:

- Added resolved findings for:
- Bleu Client login-origin and gateway-origin guards
- Typed self-update failures
- Corrected update counters and status vocabulary
- Local BleuAgent provisioning visibility
- Browser-bundle/static asset caching
- Concurrent managed-product health probes
- Unused-symbol TypeScript compiler gate
- Documented post-refactor ownership boundaries, including `admin-state.ts`, `metrics.ts`, page routes, self-update modules, and store repositories.
- Updated shrink-only budgets to:
- `application.ts`: **432,645 bytes / 12,167 lines**
- `sqlite-store.ts`: **260,941 bytes / 7,045 lines**
- CMMC browser modules: **472 lines**
- Other current ceilings retained from `scripts/module-budget.ts`.
- Clearly retained the open questions about:
- Member-app redesign scope
- Docker-less CMMC self-update
- Pending authoritative release evidence
- Expanded release QA for the corrected behavior and security invariants.

Validation:

- `git diff --check`: **passed**
- Outdated budget-value scan: **passed**
- `bun run check:repo-health`: **unavailable** because `bun` is not installed in the environment.
Evidence: task docs-refresh; added 0, modified 2, deleted 0; validation unavailable `bun run check:repo-health`.

Changed paths:
- modified: docs/release-readiness.md
- modified: docs/repository-audit.md

Plan: bleu-audit-2026-08
Revision: 0
Task: docs-refresh
2026-08-05 00:12:10 -05:00
.forgejo/workflows Terse task T03: Stamp real build version and commit into images 2026-08-03 22:16:43 -05:00
.githooks feat(cmmc): support custom scheduled tasks and add commit-msg hook 2026-07-05 16:57:25 -05:00
.github/workflows Terse task T03: Stamp real build version and commit into images 2026-08-03 22:16:43 -05:00
.vscode Simplify Terse VS Code route settings 2026-08-03 17:32:19 -05:00
apps Terse task application-split-hydration: Extract admin-state hydration… 2026-08-05 00:08:55 -05:00
docs Terse task docs-refresh: Refresh the audit register and release-readi… 2026-08-05 00:12:10 -05:00
infra Terse task T03: Stamp real build version and commit into images 2026-08-03 22:16:43 -05:00
packages Terse task T05: Member shell: real identity, sign-in/out controls, co… 2026-08-04 07:58:43 -05:00
planning Terse task T22: Retire the quarantined Bleu Client unreleased modules 2026-08-03 22:26:41 -05:00
scripts Terse task application-split-hydration: Extract admin-state hydration… 2026-08-05 00:08:55 -05:00
wiki chore: ignore craftmax and plannerx tool artifact files 2026-07-11 15:04:06 -05:00
.clinerules Terse task T10-stale-contributor-docs: Correct stale contributor docu… 2026-08-04 19:54:12 -05:00
.dockerignore ci: add release workflow and improve CMMC app types 2026-06-23 15:08:48 -05:00
.gitignore chore: ignore craftmax and plannerx tool artifact files 2026-07-11 15:04:06 -05:00
.mcp.json chore: record latest Codemax planning session metadata 2026-07-10 11:24:09 -05:00
bun.lock chore: add repository audit plan and governance docs 2026-07-09 17:20:01 -05:00
bunfig.toml ci: add dependency audit and coverage gates to release 2026-07-09 19:21:52 -05:00
flake.lock docs: add Nix development shell configuration 2026-06-25 17:06:29 -05:00
flake.nix ci: add docker buildx support to release workflow and flake 2026-06-29 12:05:49 -05:00
package.json Terse task t1-budget-guardrails: Workspace module-size and boundary r… 2026-08-03 11:06:47 -05:00
README.md Terse task T4-setup-public-url-guardrails: Guard First Start Wizard p… 2026-08-04 19:44:51 -05:00
tsconfig.base.json Terse task unused-symbol-gate: Enable noUnusedLocals/noUnusedParamete… 2026-08-04 23:55:35 -05:00
tsconfig.tools.json docs: add release readiness docs and app guidance updates 2026-07-07 14:55:40 -05:00

Bleu

Bleu is a Bun/TypeScript workspace for community operations and native community services.

  • CMMC is the administrative control plane for accounts, communities, policy, membership, cases, privacy, audit, product provisioning, and fleet management.
  • BleuBridge imports external community state and applies CMMC-owned actions through versioned service APIs.
  • BleuSocial owns native channels, threads, messages, reactions, events, engagement, notifications, news, profiles, and media-room metadata; its live WebSocket gateway has polling fallback.
  • Bleu Client is the member-facing web app and same-origin HTTP/WebSocket gateway to community BleuSocial services. Sign-in delegates to CMMC, which remains authoritative for identity and authorization.
  • BleuAgent is the outbound-only deployment agent used by CMMC-managed targets.

Release scope and known pre-release risks are tracked in docs/release-readiness.md. Planning material is directional and is not a release claim.

Quick start

Requirements: Bun and Git. The optional pinned Nix shell also supplies Node, Docker Compose, SQLite, curl, and common POSIX tools.

git clone <repository-url>
cd bleu
nix develop # optional
bun install --frozen-lockfile
bun run dev:cmmc

CMMC listens on http://127.0.0.1:3000, serves its branded landing page at /, and stores development data in data/cmmc.sqlite by default. On first start, use the one-time setup token printed in the service log. In the Instance step, enter browser-facing CMMC and Bleu Client origins; single-label container hosts such as http://cmmc:3000 are not prefilled and produce a warning because members' browsers may not resolve them. Loopback origins remain supported for local development. Only a clean database is supported: nightly and prototype CMMC databases are not migrated. Back up any data that must be retained, then run bun run dev:cmmc:reset only for disposable local state (the command is destructive). CMMC creates schema version 26; BleuSocial creates its clean migration sequence (versions 1 and 2).

Start another component in a separate terminal when needed:

# Bridge requires a Bridge-scoped CMMC service credential.
BLEUBRIDGE_CMMC_BASE_URL=http://127.0.0.1:3000 \
BLEUBRIDGE_SERVICE_TOKEN=cmmc_svc_... \
BLEUBRIDGE_ADMIN_TOKEN=bridge_admin_local_dev_token \
bun run dev:bleubridge

# Social may start unconfigured; these values enable CMMC bootstrap.
BLEUSOCIAL_CMMC_BASE_URL=http://127.0.0.1:3000 \
BLEUSOCIAL_SERVICE_TOKEN=cmmc_svc_... \
bun run dev:bleusocial

# Client needs a generic token with communities:read for gateway routing.
BLEU_CLIENT_CMMC_BASE_URL=http://127.0.0.1:3000 \
BLEU_CLIENT_CMMC_PUBLIC_URL=http://127.0.0.1:3000 \
BLEU_CLIENT_SERVICE_TOKEN=cmmc_svc_... \
bun run dev:bleuclient

# Agent credentials are generated by CMMC Fleet Management. The token must
# be in an owner-only file; BLEUAGENT_TOKEN is intentionally rejected.
umask 077
mkdir -p data
printf '%s' 'cmmc_agent_...' > data/bleuagent-token
BLEUAGENT_CMMC_BASE_URL=http://127.0.0.1:3000 \
BLEUAGENT_TARGET_ID=<deployment-target-id> \
BLEUAGENT_TOKEN_FILE=data/bleuagent-token \
bun run dev:bleuagent

Default local ports are CMMC 3000, BleuBridge 3001, BleuSocial 3002, and Bleu Client 3003. BLEU_CLIENT_CMMC_BASE_URL is the internal server-to-server origin. Optional BLEU_CLIENT_CMMC_PUBLIC_URL is an origin-only browser-facing override; without it, Bleu Client uses the public CMMC origin advertised by gateway metadata, then falls back to the internal origin. Bleu Client /login redirects to CMMC's /login flow; after authentication, the member shell provides sign-out and community switching. Social message, thread, and profile reads are cursor-paginated, message pages carry reaction summaries, and the browser consumes live message/reaction/notification deltas through the same-origin /api/gateway WebSocket with polling fallback.

Validate a change

bun run check:repo-health
bun run check
bun test
bun run test:coverage
bun run audit
bun run build
bun run backup:drill
bun scripts/sensitive-scan.ts

bun run ci:pr is the canonical fast pull-request gate and bun run ci:release is the canonical local release gate. Run one workspace suite with bun run --cwd apps/<name> test, where <name> is cmmc, bleubridge, bleusocial, bleuclient, or bleuagent.

Docker development

docker compose -f infra/docker/compose.yml up --build

The base stack starts CMMC and Bleu Client. Optional profiles start internal product services:

COMPOSE_PROFILES=bridge BLEUBRIDGE_SERVICE_TOKEN=cmmc_svc_... \
docker compose -f infra/docker/compose.yml up --build

COMPOSE_PROFILES=social BLEUSOCIAL_SERVICE_TOKEN=cmmc_svc_... \
docker compose -f infra/docker/compose.yml up --build

Bridge and Social bind to host loopback; CMMC and Bleu Client are published on ports 3000 and 3003. Data is held in separate cmmc-data and bleusocial-data volumes. Compose passes BLEU_BUILD_VERSION and BLEU_BUILD_COMMIT as build arguments to all five images; runtime status and rendered build footnotes therefore identify the built version and commit. This is development topology, not an internet-facing deployment. Production must combine the base file with the security overlay, use immutable image digests and mounted secret files, terminate TLS at a trusted reverse proxy, and keep internal services and Docker authority off public networks. Follow the deployment guide, security guide, and backup/restore guide.

For the published :indev sandbox, use bun run indev:test, bun run indev:launch, bun run indev:console, or bun run indev:cleanup --dry-run. See the incident runbooks before destructive cleanup.

Repository layout

  • apps/cmmc: control plane, REST API, WebUI, SQLite store, and tests.
    • src/server/: server composition plus implemented route-family modules such as agent-routes.ts, audit-routes.ts, deployment-routes.ts, and privacy-routes.ts.
    • src/store/repositories/: domain persistence implementations behind src/store/sqlite-store.ts and the store contracts.
    • src/ui/views/: bounded server-rendered layouts, pages, and primitives composed through src/ui/views.ts.
    • src/static/app/: bounded browser runtime, route, tab, form, and incremental-rendering modules; src/static/styles.css is the served entry point for the consolidated src/static/styles/ layer set.
  • apps/bleubridge: synchronization service and generic/Discord adapters.
  • apps/bleusocial: native community API, route-family modules, /api/gateway WebSocket transport, and independent SQLite store.
  • apps/bleuclient: member web app and CMMC-routed same-origin HTTP/WebSocket Social gateway. The former src/unreleased/ tree has been removed; target product-registry/platform work remains documentation-only.
  • apps/bleuagent: outbound deployment agent.
  • packages/http, shared, social-web, ssr, ui, db: shared runtime and UI packages. SQLite remains the supported store adapter; experimental PostgreSQL is isolated behind @bleu/db/experimental-postgres.
  • infra/docker: image, Compose, and indev tooling.

Documentation

The current documentation contract is v1:

Versioning applies to the documentation contract, not to every browser route. Service integrations should use /api/service/v1/*; unversioned administrative and member routes may evolve with the application release.