From da07b714e3fa7a108fe056b52268ad813027f109 Mon Sep 17 00:00:00 2001 From: Val Alexander Date: Sun, 5 Apr 2026 06:06:50 -0500 Subject: [PATCH] Add community templates planning docs - Add a plan for templates sharing, discovery, preview, and customization - Register the new templates community system doc in the plans index --- .plans/README.md | 1 + .plans/templates-community-system.md | 527 +++++++++++++++++++++++++++ 2 files changed, 528 insertions(+) create mode 100644 .plans/templates-community-system.md diff --git a/.plans/README.md b/.plans/README.md index eb3851a4f..9283e9634 100644 --- a/.plans/README.md +++ b/.plans/README.md @@ -30,6 +30,7 @@ - `spec-1-1-cutover-plan.md` - SPEC.md 1:1 cutover - `spec-contract-matrix.md` - SPEC requirements contract matrix *(in progress)* - `web-i18n-rollout.md` - Multilingual i18n rollout *(in progress)* +- `templates-community-system.md` - Community templates sharing, discovery, and customization - `workspace-file-tree.md` - Workspace file tree sidebar ## Archived (completed or superseded) diff --git a/.plans/templates-community-system.md b/.plans/templates-community-system.md new file mode 100644 index 000000000..09018a91c --- /dev/null +++ b/.plans/templates-community-system.md @@ -0,0 +1,527 @@ +# Plan: Templates — Community Project Sharing, Discovery, and Customization + +## Problem + +OK Code has no mechanism for community members to share, discover, or remix web projects. Users who build interesting projects (landing pages, dashboards, tools, animations) have no way to publish them within the platform, and new users have no starting point beyond blank files. + +This plan covers a full templates pipeline: submission → storage → discovery → preview → customization, with a split-pane code+preview UI for browsing community-contributed projects. + +--- + +## Current state + +- **Skills system** exists for sharing markdown-based automation definitions, but not full project source code. +- **No community content layer** — all persistence is local-first with no shared content. +- **CodeMirrorViewer** exists as a read-only code viewer with line numbers and language detection. +- **PreviewPanel** exists but is tightly coupled to Electron's BrowserView bridge — not suitable for sandboxed template previews. + +--- + +## Design goals + +1. **Community-driven**: Users can submit their projects as templates for others to discover and remix. +2. **Split-pane experience**: Template detail view shows source code alongside a live preview, matching the reference UI (code on left, iframe preview on right). +3. **Social features**: Likes, author attribution, and discovery through categories/search/sorting. +4. **One-click customization**: "Customize" button forks a template into the user's local project directory. +5. **Local-first storage**: Templates stored in local SQLite, with bundled seed templates. Community sync/remote registry is a future phase. +6. **Cross-platform preview**: Use sandboxed `