OpportunitiesEntities
Docs
    Ring Platform

    Decentralized Self-building Future

    Sign In
    Entities
    Opportunities
    Store
    Docs
    Platform Concepts
    RING EconomySonoratek LLCGlobal ImpactAI Meets Web3
    Get Started
    Quick StartCalculatorRoadmap
    Privacy|Contact
    v1.104.25|Sonoratek LLC

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Credit Rewards
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    News Kingdom architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server
    OSS vs enterprise

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Credit Rewards
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    News Kingdom architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server
    OSS vs enterprise

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Credit Rewards
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    News Kingdom architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server
    OSS vs enterprise

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)
    Ring Logo

    Loading documentation...

    Preparing Ring content

    Ring Logo

    Loading documentation...

    Preparing Ring content

    Ring Logo

    Loading documentation...

    Preparing Ring content

    News Module

    Ring news is a full publishing surface: members author articles, promote to the main page when enabled, and readers engage on /news/[slug] and /[username]/[slug]. Article bodies are Markdown (contentFormat: markdown) authored in NewsRichEditor (WikiRichEditor core + news toolbar). Shortcodes [[embed:]] / [[mood:]] / [[video:]] expand on public pages. TipTap stays only as deferred TipTapNewsAdapter for a slash / command palette — embeds, Mood, video, and generate-image already ship via the Markdown path.

    Use the Founder / Developer tabs in the docs sidebar to filter this page. audience frontmatter filters content blocks; sidebar visibility is curated in lib/docs/audience-curated-docs.ts.

    News Kingdom architecture

    Migrations, promotion workflow, scoring, and Telegram callbacks.

    Member blogs

    Per-user blog paths and public article URLs.

    Generative newsroom

    Grok drafts Markdown articles, featured images, TTS, locale fan-out.

    Admin Wiki

    Postgres Markdown + wikilinks vault — separate from the news CMS.

    What ships today

    SurfaceWhat it does
    NewsRichEditorWikiRichEditor + toolbar: Embed URL, Mood, Video, Generate image; paste lone URL → [[embed:]]; preserveNewsShortcodes
    Shortcodes[[mood:ID]] → <ring-mood-player>; [[embed:URL]] → <ring-embed> / iframe; [[video:SRC]] → <video>; gen-image → ![…](url)
    TipTapNewsAdapter (deferred)Slash / palette UX only — file retained, not mounted on ArticleEditor
    My News/my-news — dashboard, charts, create/edit, Proposed amendments
    Create / Revise/news/create; Revise → /news/[slug]/revise → pending-revision
    AmendmentsAuthor hunk preview → Accept applies body / Reject closes

    Operator journey

    Author a story

    1. Open My News (/my-news) or /news/create.
    2. Write in NewsRichEditor — headings, lists, images via the Markdown toolbar.
    3. Use Embed URL, Mood, Video, or Generate image (or paste a lone URL) to insert shortcodes / images.
    4. Preview shows the same public Markdown + widget pipeline. Publish when ready; use promotion panels if your clone enables paid/main-page promotion.

    Community revise

    1. Any member (not the author) sees Revise on a published article.
    2. They edit a copy and submit — the live page does not change yet.
    3. On My News, the author sees Proposed amendments: N.
    4. Preview: deleted lines pale red / struck; added lines pale green.
    5. Accept updates the published body; Reject closes that proposal.
    Why this matters

    Members improve accuracy without silent overwrite. Authors stay in control of the live article.

    Permissions (simplified)

    ActionWho

    News body — Markdown SSOT + NewsRichEditor

    Authoring SSOT is Markdown. ArticleEditor and revise mount NewsRichEditor, which wraps WikiRichEditor with news-only widget chrome. CV/wiki keep bare WikiRichEditor.

    PathRole
    features/news/components/news-rich-editor.tsxNews shell: toolbar, paste→embed, collab hook, preserveNewsShortcodes
    features/wiki/components/wiki-rich-editor.tsxMarkdown editor core (shared)
    features/wiki/wiki-markdown-codec.tspreserveNewsShortcodes keeps [[mood|embed|video:]] literal
    features/news/lib/news-shortcodes.tsBuild/extract/restore [[mood:]] / [[embed:]] / [[video:]]
    features/news/lib/editor-widget-detector.tsLone-URL paste → embed shortcode

    Related reading

    Related reading

    Member Blogs

    Same-workflow: member blogs share public article surfaces with news.

    News Kingdom architecture

    Deep-dive: promotion, Telegram, and News Kingdom migrations.

    Autonomous Newsroom (Grok)

    Next-step: Grok generates Markdown drafts into the same news CMS.

    Scientific Editor

    See-also: publications TipTap editor — not the news Markdown CMS.

    Production note

    News Kingdom migrations (002 / 003) and promotion remain required for paid main-page flows. NewsRichEditor Markdown + shortcodes + pending-revision ship without changing NewsStatus (draft | published | archived | deleted).

    1. Docs
    2. /Features
    3. /News Module

    Updated Aug 5, 20265 min listen

    News Module

    Ring news is a full publishing surface: members author articles, promote to the main page when enabled, and readers engage on /news/[slug] and /[username]/[slug]. Article bodies are Markdown (contentFormat: markdown) authored in NewsRichEditor (WikiRichEditor core + news toolbar). Shortcodes [[embed:]] / [[mood:]] / [[video:]] expand on public pages. TipTap stays only as deferred TipTapNewsAdapter for a slash / command palette — embeds, Mood, video, and generate-image already ship via the Markdown path.

    Use the Founder / Developer tabs in the docs sidebar to filter this page. audience frontmatter filters content blocks; sidebar visibility is curated in lib/docs/audience-curated-docs.ts.

    News Kingdom architecture

    Migrations, promotion workflow, scoring, and Telegram callbacks.

    Member blogs

    Per-user blog paths and public article URLs.

    Generative newsroom

    Grok drafts Markdown articles, featured images, TTS, locale fan-out.

    Admin Wiki

    Postgres Markdown + wikilinks vault — separate from the news CMS.

    What ships today

    SurfaceWhat it does
    NewsRichEditorWikiRichEditor + toolbar: Embed URL, Mood, Video, Generate image; paste lone URL → [[embed:]]; preserveNewsShortcodes
    Shortcodes[[mood:ID]] → <ring-mood-player>; [[embed:URL]] → <ring-embed> / iframe; [[video:SRC]] → <video>; gen-image → ![…](url)
    TipTapNewsAdapter (deferred)Slash / palette UX only — file retained, not mounted on ArticleEditor
    My News/my-news — dashboard, charts, create/edit, Proposed amendments
    Create / Revise/news/create; Revise → /news/[slug]/revise → pending-revision
    AmendmentsAuthor hunk preview → Accept applies body / Reject closes

    Operator journey

    Author a story

    1. Open My News (/my-news) or /news/create.
    2. Write in NewsRichEditor — headings, lists, images via the Markdown toolbar.
    3. Use Embed URL, Mood, Video, or Generate image (or paste a lone URL) to insert shortcodes / images.
    4. Preview shows the same public Markdown + widget pipeline. Publish when ready; use promotion panels if your clone enables paid/main-page promotion.

    Community revise

    1. Any member (not the author) sees Revise on a published article.
    2. They edit a copy and submit — the live page does not change yet.
    3. On My News, the author sees Proposed amendments: N.
    4. Preview: deleted lines pale red / struck; added lines pale green.
    5. Accept updates the published body; Reject closes that proposal.
    Why this matters

    Members improve accuracy without silent overwrite. Authors stay in control of the live article.

    Permissions (simplified)

    ActionWho

    News body — Markdown SSOT + NewsRichEditor

    Authoring SSOT is Markdown. ArticleEditor and revise mount NewsRichEditor, which wraps WikiRichEditor with news-only widget chrome. CV/wiki keep bare WikiRichEditor.

    PathRole
    features/news/components/news-rich-editor.tsxNews shell: toolbar, paste→embed, collab hook, preserveNewsShortcodes
    features/wiki/components/wiki-rich-editor.tsxMarkdown editor core (shared)
    features/wiki/wiki-markdown-codec.tspreserveNewsShortcodes keeps [[mood|embed|video:]] literal
    features/news/lib/news-shortcodes.tsBuild/extract/restore [[mood:]] / [[embed:]] / [[video:]]
    features/news/lib/editor-widget-detector.tsLone-URL paste → embed shortcode

    Related reading

    Related reading

    Member Blogs

    Same-workflow: member blogs share public article surfaces with news.

    News Kingdom architecture

    Deep-dive: promotion, Telegram, and News Kingdom migrations.

    Autonomous Newsroom (Grok)

    Next-step: Grok generates Markdown drafts into the same news CMS.

    Scientific Editor

    See-also: publications TipTap editor — not the news Markdown CMS.

    Production note

    News Kingdom migrations (002 / 003) and promotion remain required for paid main-page flows. NewsRichEditor Markdown + shortcodes + pending-revision ship without changing NewsStatus (draft | published | archived | deleted).

    1. Docs
    2. /Features
    3. /News Module

    Updated Aug 5, 20265 min listen

    News Module

    Ring news is a full publishing surface: members author articles, promote to the main page when enabled, and readers engage on /news/[slug] and /[username]/[slug]. Article bodies are Markdown (contentFormat: markdown) authored in NewsRichEditor (WikiRichEditor core + news toolbar). Shortcodes [[embed:]] / [[mood:]] / [[video:]] expand on public pages. TipTap stays only as deferred TipTapNewsAdapter for a slash / command palette — embeds, Mood, video, and generate-image already ship via the Markdown path.

    Use the Founder / Developer tabs in the docs sidebar to filter this page. audience frontmatter filters content blocks; sidebar visibility is curated in lib/docs/audience-curated-docs.ts.

    News Kingdom architecture

    Migrations, promotion workflow, scoring, and Telegram callbacks.

    Member blogs

    Per-user blog paths and public article URLs.

    Generative newsroom

    Grok drafts Markdown articles, featured images, TTS, locale fan-out.

    Admin Wiki

    Postgres Markdown + wikilinks vault — separate from the news CMS.

    What ships today

    SurfaceWhat it does
    NewsRichEditorWikiRichEditor + toolbar: Embed URL, Mood, Video, Generate image; paste lone URL → [[embed:]]; preserveNewsShortcodes
    Shortcodes[[mood:ID]] → <ring-mood-player>; [[embed:URL]] → <ring-embed> / iframe; [[video:SRC]] → <video>; gen-image → ![…](url)
    TipTapNewsAdapter (deferred)Slash / palette UX only — file retained, not mounted on ArticleEditor
    My News/my-news — dashboard, charts, create/edit, Proposed amendments
    Create / Revise/news/create; Revise → /news/[slug]/revise → pending-revision
    AmendmentsAuthor hunk preview → Accept applies body / Reject closes

    Operator journey

    Author a story

    1. Open My News (/my-news) or /news/create.
    2. Write in NewsRichEditor — headings, lists, images via the Markdown toolbar.
    3. Use Embed URL, Mood, Video, or Generate image (or paste a lone URL) to insert shortcodes / images.
    4. Preview shows the same public Markdown + widget pipeline. Publish when ready; use promotion panels if your clone enables paid/main-page promotion.

    Community revise

    1. Any member (not the author) sees Revise on a published article.
    2. They edit a copy and submit — the live page does not change yet.
    3. On My News, the author sees Proposed amendments: N.
    4. Preview: deleted lines pale red / struck; added lines pale green.
    5. Accept updates the published body; Reject closes that proposal.
    Why this matters

    Members improve accuracy without silent overwrite. Authors stay in control of the live article.

    Permissions (simplified)

    ActionWho

    News body — Markdown SSOT + NewsRichEditor

    Authoring SSOT is Markdown. ArticleEditor and revise mount NewsRichEditor, which wraps WikiRichEditor with news-only widget chrome. CV/wiki keep bare WikiRichEditor.

    PathRole
    features/news/components/news-rich-editor.tsxNews shell: toolbar, paste→embed, collab hook, preserveNewsShortcodes
    features/wiki/components/wiki-rich-editor.tsxMarkdown editor core (shared)
    features/wiki/wiki-markdown-codec.tspreserveNewsShortcodes keeps [[mood|embed|video:]] literal
    features/news/lib/news-shortcodes.tsBuild/extract/restore [[mood:]] / [[embed:]] / [[video:]]
    features/news/lib/editor-widget-detector.tsLone-URL paste → embed shortcode

    Related reading

    Related reading

    Member Blogs

    Same-workflow: member blogs share public article surfaces with news.

    News Kingdom architecture

    Deep-dive: promotion, Telegram, and News Kingdom migrations.

    Autonomous Newsroom (Grok)

    Next-step: Grok generates Markdown drafts into the same news CMS.

    Scientific Editor

    See-also: publications TipTap editor — not the news Markdown CMS.

    Production note

    News Kingdom migrations (002 / 003) and promotion remain required for paid main-page flows. NewsRichEditor Markdown + shortcodes + pending-revision ship without changing NewsStatus (draft | published | archived | deleted).

    1. Docs
    2. /Features
    3. /News Module

    Updated Aug 5, 20265 min listen

    Public render
    NewsMarkdownView — shortcodes → Markdown → sanitize → restore widgets
    Collab (gated)Y.Text newsMarkdown on collab:news:{articleId} when NEXT_PUBLIC_COLLAB_ENABLED=true
    Create / edit ownMember+ (and admins)
    Propose revision on publishedMember+ (author uses Edit)
    Accept / reject amendmentsArticle author or platform admin
    Invite co-editors by emailScaffolded APIs only (501) — not a full UI yet
    Live Markdown collabNeeds NEXT_PUBLIC_COLLAB_ENABLED=true + native WSS
    features/news/lib/render-news-markdown.ts
    Public pipeline (below)
    features/news/lib/news-markdown-view.tsxPublic article body component
    features/news/components/article-editor.tsxForm; mounts NewsRichEditor; Preview → NewsMarkdownView
    features/news/components/editor/tiptap-news-editor.tsxTipTapNewsAdapter — slash / backlog only
    features/news/components/editor/rich-text-editor.tsxRe-exports TipTapNewsAdapter (not used by CRUD)
    app/api/news/embed-preview/route.tsPOST OG metadata for embed hydration
    app/_actions/news.ts / news-service.tsPersist contentFormat: 'markdown'

    Autosave: dirty-gated debounce (~3s) PUT /api/news/[id] with { content } (Markdown). Explicit Save appends a version commit with contentFormat: 'markdown'.

    Public sanitize pipeline

    renderNewsMarkdownToHtml order (mandatory):

    1. Legacy HTML tip → escaped conversion stub (never trust raw HTML as the tip body)
    2. Extract shortcodes → placeholders
    3. simpleMarkdownToHtml
    4. sanitizeMarkdownHtml (MD-only allowlist)
    5. Restore widgets (ring-embed / ring-mood-player / <video>)
    6. sanitizeNewsHtml — final belt for iframes + custom elements

    CRDT collab (Markdown Y.Text — wired)

    NewsRichEditor calls useNewsMarkdownCollab (features/news/lib/use-news-markdown-collab.ts). Gate: isNewsCollabEnabled() → NEXT_PUBLIC_COLLAB_ENABLED=true (news-collab-gate.ts). Channel: useCollaboration('news:{articleId}') → collab:news:{articleId}; Y.Text key newsMarkdown. Not TipTap Collaboration.

    My News & create routes

    Route helper (constants/routes.ts)Path
    ROUTES.MY_NEWS/my-news
    ROUTES.NEWS_CREATE/news/create
    ROUTES.NEWS_REVISE(slug)/news/[slug]/revise
    ROUTES.MY_NEWS_AMENDMENTS(articleId)/my-news/[articleId]/amendments
    ROUTES.MY_NEWS_AMENDMENT_PREVIEW(...)/my-news/[articleId]/amendments/[revisionId]

    UI: app/[locale]/(protected)/my-news/, components/wrappers/my-news-wrapper.tsx.

    Pending revisions API

    Collection: news_revisions via DatabaseService.

    MethodRouteBehavior
    GET/api/news/[id]/revisions?status=pending-revisionList
    POST/api/news/[id]/revisions{ proposedContent } → pending-revision
    GET/api/news/revisions/[revisionId]One revision
    PATCH/api/news/revisions/[revisionId]{ action: 'accept' | 'reject' }

    Service: features/news/services/revision-service.ts · Permissions: news-collaboration-permissions.ts · Diff UI: revision-diff.ts + revision-hunk-preview.tsx.

    Pending revision accept flow

    ACL / invite scaffolding (not full product)

    PieceStatus
    lib/database/schema/news-collaboration.sqlConceptual schema notes
    GET/POST /api/news/[id]/collaborators501 stub
    GET/POST /api/news/collaboration/invite/[token]501 stub
    Roles owner|admin|editor|reviewer|viewerTypes only

    Core news service

    features/news/services/news-service.ts — CRUD, stats, page views. Promotion / Telegram: News Kingdom. AI drafts: Generative newsroom (article-generator.ts prompts Markdown).

    Real Time

    Depends-on: Tunnel / Yjs channels behind NEXT_PUBLIC_COLLAB_ENABLED.

    Admin Wiki

    See-also: Admin Wiki is Markdown + wikilinks — not news shortcodes (NewsRichEditor).

    Public render
    NewsMarkdownView — shortcodes → Markdown → sanitize → restore widgets
    Collab (gated)Y.Text newsMarkdown on collab:news:{articleId} when NEXT_PUBLIC_COLLAB_ENABLED=true
    Create / edit ownMember+ (and admins)
    Propose revision on publishedMember+ (author uses Edit)
    Accept / reject amendmentsArticle author or platform admin
    Invite co-editors by emailScaffolded APIs only (501) — not a full UI yet
    Live Markdown collabNeeds NEXT_PUBLIC_COLLAB_ENABLED=true + native WSS
    features/news/lib/render-news-markdown.ts
    Public pipeline (below)
    features/news/lib/news-markdown-view.tsxPublic article body component
    features/news/components/article-editor.tsxForm; mounts NewsRichEditor; Preview → NewsMarkdownView
    features/news/components/editor/tiptap-news-editor.tsxTipTapNewsAdapter — slash / backlog only
    features/news/components/editor/rich-text-editor.tsxRe-exports TipTapNewsAdapter (not used by CRUD)
    app/api/news/embed-preview/route.tsPOST OG metadata for embed hydration
    app/_actions/news.ts / news-service.tsPersist contentFormat: 'markdown'

    Autosave: dirty-gated debounce (~3s) PUT /api/news/[id] with { content } (Markdown). Explicit Save appends a version commit with contentFormat: 'markdown'.

    Public sanitize pipeline

    renderNewsMarkdownToHtml order (mandatory):

    1. Legacy HTML tip → escaped conversion stub (never trust raw HTML as the tip body)
    2. Extract shortcodes → placeholders
    3. simpleMarkdownToHtml
    4. sanitizeMarkdownHtml (MD-only allowlist)
    5. Restore widgets (ring-embed / ring-mood-player / <video>)
    6. sanitizeNewsHtml — final belt for iframes + custom elements

    CRDT collab (Markdown Y.Text — wired)

    NewsRichEditor calls useNewsMarkdownCollab (features/news/lib/use-news-markdown-collab.ts). Gate: isNewsCollabEnabled() → NEXT_PUBLIC_COLLAB_ENABLED=true (news-collab-gate.ts). Channel: useCollaboration('news:{articleId}') → collab:news:{articleId}; Y.Text key newsMarkdown. Not TipTap Collaboration.

    My News & create routes

    Route helper (constants/routes.ts)Path
    ROUTES.MY_NEWS/my-news
    ROUTES.NEWS_CREATE/news/create
    ROUTES.NEWS_REVISE(slug)/news/[slug]/revise
    ROUTES.MY_NEWS_AMENDMENTS(articleId)/my-news/[articleId]/amendments
    ROUTES.MY_NEWS_AMENDMENT_PREVIEW(...)/my-news/[articleId]/amendments/[revisionId]

    UI: app/[locale]/(protected)/my-news/, components/wrappers/my-news-wrapper.tsx.

    Pending revisions API

    Collection: news_revisions via DatabaseService.

    MethodRouteBehavior
    GET/api/news/[id]/revisions?status=pending-revisionList
    POST/api/news/[id]/revisions{ proposedContent } → pending-revision
    GET/api/news/revisions/[revisionId]One revision
    PATCH/api/news/revisions/[revisionId]{ action: 'accept' | 'reject' }

    Service: features/news/services/revision-service.ts · Permissions: news-collaboration-permissions.ts · Diff UI: revision-diff.ts + revision-hunk-preview.tsx.

    Pending revision accept flow

    ACL / invite scaffolding (not full product)

    PieceStatus
    lib/database/schema/news-collaboration.sqlConceptual schema notes
    GET/POST /api/news/[id]/collaborators501 stub
    GET/POST /api/news/collaboration/invite/[token]501 stub
    Roles owner|admin|editor|reviewer|viewerTypes only

    Core news service

    features/news/services/news-service.ts — CRUD, stats, page views. Promotion / Telegram: News Kingdom. AI drafts: Generative newsroom (article-generator.ts prompts Markdown).

    Real Time

    Depends-on: Tunnel / Yjs channels behind NEXT_PUBLIC_COLLAB_ENABLED.

    Admin Wiki

    See-also: Admin Wiki is Markdown + wikilinks — not news shortcodes (NewsRichEditor).

    Public render
    NewsMarkdownView — shortcodes → Markdown → sanitize → restore widgets
    Collab (gated)Y.Text newsMarkdown on collab:news:{articleId} when NEXT_PUBLIC_COLLAB_ENABLED=true
    Create / edit ownMember+ (and admins)
    Propose revision on publishedMember+ (author uses Edit)
    Accept / reject amendmentsArticle author or platform admin
    Invite co-editors by emailScaffolded APIs only (501) — not a full UI yet
    Live Markdown collabNeeds NEXT_PUBLIC_COLLAB_ENABLED=true + native WSS
    features/news/lib/render-news-markdown.ts
    Public pipeline (below)
    features/news/lib/news-markdown-view.tsxPublic article body component
    features/news/components/article-editor.tsxForm; mounts NewsRichEditor; Preview → NewsMarkdownView
    features/news/components/editor/tiptap-news-editor.tsxTipTapNewsAdapter — slash / backlog only
    features/news/components/editor/rich-text-editor.tsxRe-exports TipTapNewsAdapter (not used by CRUD)
    app/api/news/embed-preview/route.tsPOST OG metadata for embed hydration
    app/_actions/news.ts / news-service.tsPersist contentFormat: 'markdown'

    Autosave: dirty-gated debounce (~3s) PUT /api/news/[id] with { content } (Markdown). Explicit Save appends a version commit with contentFormat: 'markdown'.

    Public sanitize pipeline

    renderNewsMarkdownToHtml order (mandatory):

    1. Legacy HTML tip → escaped conversion stub (never trust raw HTML as the tip body)
    2. Extract shortcodes → placeholders
    3. simpleMarkdownToHtml
    4. sanitizeMarkdownHtml (MD-only allowlist)
    5. Restore widgets (ring-embed / ring-mood-player / <video>)
    6. sanitizeNewsHtml — final belt for iframes + custom elements

    CRDT collab (Markdown Y.Text — wired)

    NewsRichEditor calls useNewsMarkdownCollab (features/news/lib/use-news-markdown-collab.ts). Gate: isNewsCollabEnabled() → NEXT_PUBLIC_COLLAB_ENABLED=true (news-collab-gate.ts). Channel: useCollaboration('news:{articleId}') → collab:news:{articleId}; Y.Text key newsMarkdown. Not TipTap Collaboration.

    My News & create routes

    Route helper (constants/routes.ts)Path
    ROUTES.MY_NEWS/my-news
    ROUTES.NEWS_CREATE/news/create
    ROUTES.NEWS_REVISE(slug)/news/[slug]/revise
    ROUTES.MY_NEWS_AMENDMENTS(articleId)/my-news/[articleId]/amendments
    ROUTES.MY_NEWS_AMENDMENT_PREVIEW(...)/my-news/[articleId]/amendments/[revisionId]

    UI: app/[locale]/(protected)/my-news/, components/wrappers/my-news-wrapper.tsx.

    Pending revisions API

    Collection: news_revisions via DatabaseService.

    MethodRouteBehavior
    GET/api/news/[id]/revisions?status=pending-revisionList
    POST/api/news/[id]/revisions{ proposedContent } → pending-revision
    GET/api/news/revisions/[revisionId]One revision
    PATCH/api/news/revisions/[revisionId]{ action: 'accept' | 'reject' }

    Service: features/news/services/revision-service.ts · Permissions: news-collaboration-permissions.ts · Diff UI: revision-diff.ts + revision-hunk-preview.tsx.

    Pending revision accept flow

    ACL / invite scaffolding (not full product)

    PieceStatus
    lib/database/schema/news-collaboration.sqlConceptual schema notes
    GET/POST /api/news/[id]/collaborators501 stub
    GET/POST /api/news/collaboration/invite/[token]501 stub
    Roles owner|admin|editor|reviewer|viewerTypes only

    Core news service

    features/news/services/news-service.ts — CRUD, stats, page views. Promotion / Telegram: News Kingdom. AI drafts: Generative newsroom (article-generator.ts prompts Markdown).

    Real Time

    Depends-on: Tunnel / Yjs channels behind NEXT_PUBLIC_COLLAB_ENABLED.

    Admin Wiki

    See-also: Admin Wiki is Markdown + wikilinks — not news shortcodes (NewsRichEditor).