Skip to content

Repository files navigation

@myalterlego/triarch-shared

Shared Drizzle schema + helpers consumed by triarch-dev (admin) and triarch-portal (customer) Next.js apps.

Published from packages/triarch-shared/ inside the triarch-dev repo on git tag shared/v*.

Subpath exports

  • @myalterlego/triarch-shared/schema — Drizzle table definitions + relations
  • @myalterlego/triarch-shared/authgetCurrentUserContext() membership lookup
  • @myalterlego/triarch-shared/sanitize-commitsanitizeForSlack / sanitizeForRender
  • @myalterlego/triarch-shared/slackfetchProjectStatus / buildStatusBlocks / humanizeDate / listProjectKeys
  • @myalterlego/triarch-shared/dbdb (drizzle pg.Pool wrapper, reads DATABASE_URL)

Migration authority

Admin (triarch-dev) is the sole writer of schema migrations. Portal consumes read-only and runs no db:push. See .planning/research/ARCHITECTURE.md § "Anti-Pattern 3".

Versioning

Bump version field in packages/triarch-shared/package.json BEFORE pushing schema changes. CI rejects PRs that touch src/schema.ts without a version bump (see .github/workflows/check-shared-version.yml).

About

Shared TypeScript utilities for triarch projects

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages