Skip to content

Commit bf5bd1c

Browse files
committed
docs: add Chinese i18n, legal pages, and deploy mode cards
1 parent 6c6c650 commit bf5bd1c

55 files changed

Lines changed: 4895 additions & 174 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# AGENTS.md
2+
3+
Guidance for AI agents (Claude Code, Codex, Cursor, etc.) working in this repository.
4+
5+
## Repository
6+
7+
ObjectOS — customer-hosted runtime for ObjectStack applications. Monorepo with the marketing + docs site under `apps/docs`.
8+
9+
## Critical rules
10+
11+
### 1. English is the single source of truth for all content
12+
13+
All marketing copy, UI strings, and documentation are authored in **English first**. Chinese (`cn`) and any future locales are **translations derived from English**.
14+
15+
- **Always edit the English source first.** Never patch a translation without updating the English original — translation passes will overwrite you.
16+
- If a typo or wording change only appears in Chinese, fix English too (it almost certainly has the same issue or will after the next sync).
17+
- New content must be added to English before translations are touched.
18+
- Translations are derived artifacts; treat them like generated code that happens to be checked in.
19+
20+
### 2. Test in a real browser before claiming UI work is done
21+
22+
Type-checks and unit tests verify code correctness, not feature correctness. For any UI change in `apps/docs`, run the dev server and exercise the change in a browser before reporting done. If a tool can't drive a browser, say so explicitly rather than guessing.
23+
24+
## apps/docs (Fumadocs site)
25+
26+
Stack: Next.js 16 App Router + Fumadocs UI 16 + Fumadocs MDX. Many UI affordances (theme toggle, search modal, language switcher, sidebar, link rendering) come from Fumadocs components, not custom code. Check `node_modules/fumadocs-ui` before assuming something is broken in app code.
27+
28+
### Where things live
29+
30+
| Concern | File |
31+
|---|---|
32+
| Locale list & default | `apps/docs/lib/i18n.ts` |
33+
| Language display names | `apps/docs/app/[lang]/layout.tsx` (`LANGUAGE_NAMES`) |
34+
| Locale detection / URL rewrite | `apps/docs/middleware.ts` |
35+
| Header + logo | `apps/docs/lib/layout.shared.tsx` |
36+
| Homepage copy (en + cn) | `apps/docs/lib/homepage-i18n.ts` |
37+
| Docs MDX content | `content/docs/**/*.mdx` |
38+
| Sidebar structure / grouping | `content/docs/**/meta.json` |
39+
40+
### Locale conventions
41+
42+
- Supported locales: `en` (default), `cn`.
43+
- Default locale has no prefix (`/docs/...`); other locales are prefixed (`/cn/docs/...`). This is set by `hideLocale: 'default-locale'` in `lib/i18n.ts`.
44+
- **MDX translations:** add a sibling file with `.cn.mdx` next to the English `.mdx`. Fumadocs auto-falls-back to English when a translation is missing — you can ship translations incrementally without breaking links.
45+
- **Homepage strings:** must exist in both `en` and `cn` objects in `lib/homepage-i18n.ts` (they implement the `HomepageTranslations` interface; missing keys are a type error).
46+
- **Sidebar titles:** `meta.json` `title` fields currently render in all locales. If you localize sidebar labels, add per-locale `meta.cn.json` (Fumadocs convention) — don't translate inside the English file.
47+
48+
### Sidebar grouping
49+
50+
Folder `meta.json` files declare a section's title, page order, and `defaultOpen: false` to make the group collapsible and collapsed by default. The root `content/docs/meta.json` references folders by name (`"deploy"`, `"build"`, …), not by the `"...deploy"` spread + `---Deploy---` separator pattern (the old pattern produced a flat ~50-item sidebar).
51+
52+
### Translation workflow
53+
54+
When the English source changes:
55+
1. Edit the English `.mdx` / `en` object first; verify it renders.
56+
2. Update the `.cn.mdx` / `cn` object to match.
57+
3. If a `.cn.mdx` doesn't exist yet, that's fine — Fumadocs falls back to English. Create one when you're ready to translate, not as a stub.
58+
4. Keep `frontmatter` (title, description) translated too.
59+
60+
### Don't
61+
62+
- Don't reintroduce the `---Section---` + `"...folder"` flat sidebar pattern.
63+
- Don't set `alt="ObjectOS"` on the logo image when the adjacent text already says "ObjectOS" — screen readers read it twice. Use `alt=""` + `aria-hidden`.
64+
- Don't add Chinese-only strings or files. If it doesn't have an English source, it shouldn't exist yet.
65+
66+
## Commands
67+
68+
From `apps/docs/`:
69+
- `npm run dev` — dev server on http://localhost:3001
70+
- `npm run type-check``fumadocs-mdx && next typegen && tsc --noEmit`
71+
- `npm run build` — production build

README.md

Lines changed: 61 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,54 @@
11
# ObjectOS
22

3-
> **The reference runtime distribution of the [ObjectStack framework](https://github.com/objectstack-ai/framework).**
4-
5-
ObjectOS is what you ship to end customers. It is a thin, opinionated
6-
**distribution** of the ObjectStack protocol: one `objectstack.config.ts`,
7-
a `Dockerfile`, a Helm chart, and operational documentation. All
8-
protocol, kernel, drivers and official plugins come from the
9-
`@objectstack/*` packages on npm — this repository contains **no
10-
protocol implementation of its own**.
3+
> **Your data. Your network. Your rules.**
4+
>
5+
> ObjectOS is the customer-hosted runtime for [ObjectStack](https://github.com/objectstack-ai/framework)
6+
> applications — built to run inside your own infrastructure: private cloud,
7+
> customer data centers, or fully air-gapped networks.
8+
9+
ObjectOS is the **distribution** of the ObjectStack protocol. The framework
10+
develops the kernel, drivers, and `@objectstack/*` packages on npm. This
11+
repository packages a protocol version into something a customer can
12+
`docker run`, sign an SLA on, and deploy into a network with no internet
13+
egress.
1114

1215
```
1316
ObjectStack framework ≈ Linux kernel source tree
1417
ObjectOS ≈ the distribution you actually deploy
1518
```
1619

20+
## Why ObjectOS
21+
22+
For teams that cannot — or will not — hand customer data to a third party:
23+
24+
- **Self-hosted runtime.** Runs in your environment, on your servers,
25+
against your database. The control plane is optional; the runtime never
26+
depends on a public service to keep the application alive.
27+
- **Deploy anywhere.** Single-container Docker for evaluation, Kubernetes
28+
for production HA, or a long-running process on bare metal. Same
29+
artifact, same behavior in every environment.
30+
- **Air-gapped ready.** Ship a release bundle into a network with no
31+
public connectivity. ObjectOS reads its application artifact from a
32+
local file and never calls home.
33+
- **Identity you already operate.** Local accounts, OAuth, OIDC, SAML, or
34+
your corporate SSO — ObjectOS enforces the session.
35+
- **Permissions at the runtime.** Role-based access, record-level rules,
36+
and field-level redaction are enforced by the runtime itself — not by
37+
the UI.
38+
- **Audit, backup, observability on your terms.** Every state change is
39+
auditable. Backups write to your storage. Logs and metrics export to
40+
the observability stack you already use.
41+
1742
## Positioning
1843

1944
| | ObjectStack framework | **ObjectOS** | Enterprise plugins |
2045
|---|---|---|---|
2146
| Repo | `objectstack-ai/framework` | `objectstack-ai/objectos` | `objectstack-ai/objectos-enterprise` (private) |
22-
| What it ships | Protocol, Kernel, all `@objectstack/*` packages, Studio, Cloud control plane | Runtime distribution + Docker/Helm + ops docs | SSO/SAML, SCIM, audit export, HA scheduler, … |
47+
| What it ships | Protocol, kernel, `@objectstack/*` packages, Studio, control plane | Runtime distribution + Docker/Helm + ops docs | SSO/SAML, SCIM, audit export, HA scheduler, … |
2348
| Who consumes it | Framework contributors, plugin authors | **End customers** (self-host / private cloud) | Enterprise customers |
2449
| License | Apache-2.0 | **Apache-2.0** | Commercial |
2550
| Release cadence | Frequent (per `changeset`) | Distribution semver (e.g. `2026.05 LTS`) | Tracks ObjectOS |
2651

27-
The framework develops the protocol; ObjectOS packages a protocol
28-
version into something a customer can `docker run`, sign an SLA on,
29-
and deploy into an air-gapped environment.
30-
31-
## Repository layout
32-
33-
```
34-
objectos/
35-
├── apps/
36-
│ ├── objectos/ # Runtime entry — single objectstack.config.ts
37-
│ └── docs/ # Product / operations site (Fumadocs + Next.js)
38-
├── packages/ # Enterprise plugins (@objectos/plugin-*)
39-
├── content/docs/ # MDX content powering apps/docs
40-
├── docker/ # Dockerfile + docker-compose
41-
├── helm/ # Helm chart (planned)
42-
├── examples/ # Reference deployments
43-
├── e2e/ # Black-box smoke tests against the published image
44-
└── scripts/
45-
```
46-
4752
## Boot modes
4853

4954
ObjectOS boots in one of two modes, selected by environment variables:
@@ -63,15 +68,15 @@ pnpm install
6368
# Build the runtime distribution and docs
6469
pnpm build
6570

66-
# Boot the runtime against a local compiled artifact produced by apps/objectos
71+
# Boot the runtime against a local compiled artifact
6772
cd apps/objectos
6873
OS_ARTIFACT_FILE=dist/objectstack.json PORT=3200 pnpm start
6974

7075
# Or run the documentation site
7176
pnpm docs:dev
7277
```
7378

74-
Docker:
79+
### Docker
7580

7681
```bash
7782
mkdir -p docker/artifacts
@@ -82,6 +87,31 @@ docker compose -f docker/docker-compose.yml up --build
8287
Docker Compose publishes ObjectOS on `http://localhost:3000` by default.
8388
Use `OBJECTOS_PORT=3200` to change the host port.
8489

90+
## Repository layout
91+
92+
```
93+
objectos/
94+
├── apps/
95+
│ ├── objectos/ # Runtime entry — single objectstack.config.ts
96+
│ └── docs/ # Product / operations site (Fumadocs + Next.js)
97+
├── packages/ # Enterprise plugins (@objectos/plugin-*)
98+
├── content/docs/ # MDX content powering apps/docs
99+
├── docker/ # Dockerfile + docker-compose
100+
├── helm/ # Helm chart (planned)
101+
├── examples/ # Reference deployments
102+
├── e2e/ # Black-box smoke tests against the published image
103+
└── scripts/
104+
```
105+
106+
## Documentation
107+
108+
- [Quickstart](content/docs/quickstart.mdx)
109+
- [Architecture](content/docs/architecture.mdx)
110+
- [Deployment](content/docs/deploy/index.mdx) — Docker, Kubernetes, air-gapped
111+
- [Authentication](content/docs/configure/authentication.mdx)
112+
- [Permissions](content/docs/configure/permissions.mdx)
113+
- [Observability](content/docs/operate/observability.mdx)
114+
85115
## History
86116

87117
The current `main` is a deliberate restart aligned with the

0 commit comments

Comments
 (0)