Files
hub/docs/architecture/storage/projects.md
glm-5.1 2b63cda1c7 Setup repo: migrate architecture specs, code stubs, and tasks from alkhub_ts
Copy architecture docs, ADRs, storage domain specs, research, reviews,
and 56 storage architecture tasks from the alkhub_ts monorepo. Adapt for
standalone @alkdev/hub repo structure (src/ not packages/hub/).

Sanitize all sensitive information:
- Replace private IPs (10.0.0.1) with localhost defaults
- Remove internal server hostnames (dev1, ns528096)
- Replace /workspace/ private paths with npm package references
- Remove hardcoded credentials from examples
- Rewrite infrastructure.md without private network details

Add Deno project scaffolding: deno.json (pinned deps), .gitignore,
AGENTS.md, entry point. Migrate existing code stubs (crypto, config
types, logger) with updated import paths.
2026-05-25 10:56:32 +00:00

1.8 KiB

status, last_updated
status last_updated
draft 2026-04-19

Table Schemas: Projects & Workspaces

Project and workspace tables. For cross-cutting reference (cascade behavior, index reference, status enums, relations), see table-reference.md. For design decisions, see ../../../decisions/.

projects

Git repositories / work contexts. A project may have multiple workspaces (branches). Projects belong to organizations.

Column Type Notes
commonCols id, metadata, createdAt, updatedAt
orgId text FK → organizations.id (nullable — personal projects have no org)
name text NOT NULL Project name
directory text Local filesystem path (primary workspace)
repoUrl text Git remote URL
vcs text Version control system (default: git)
iconUrl text Project icon URL
iconColor text Project icon color (opencode compat)

Indexes: idx_projects_org_id on (orgId) — find projects for an org.

workspaces

Project workspaces — branches, directories, and execution contexts. A project can have multiple workspaces (e.g., main branch workspace, feature branch workspace). This maps to opencode's workspace concept and our coordination mappings.

Column Type Notes
commonCols id, metadata, createdAt, updatedAt
projectId text NOT NULL FK → projects.id (cascade)
type text NOT NULL Workspace type: local, remote, container
branch text Git branch name
name text Human-readable workspace name
directory text Local filesystem path
extra jsonb Workspace-specific configuration

Indexes: idx_workspaces_project_id on (projectId) — find workspaces for a project.