跳到正文
VibeFather
免费注册

用这个模板做的 2 个案例

同一份提示词,不同的 [VARIABLES] 变量。点一个在上方预览。

关于这个模板

代码托管平台应用是一个自包含的开发者工作区,围绕日常仓库工作流建模:浏览源码树、切换分支、查看分栏或统一格式的拉取请求差异、分类处理 Issue、跟踪版本发布,以及查看代码活动图表。它面向开发者工具团队、内部平台演示、文档沙盒和工程展示场景,以纯静态单页应用形式交付,零后端依赖。所有交互内容都通过专用存储适配器在浏览器本地持久化,包括标星、关注、复刻、新建 Issue、Issue 回复、表情回应计数和内联拉取请求审查评论。视觉系统以 Midnight Ink(#0D1321)为基调,搭配语义色 Mint(#3DDC97)表示新增和开放状态、Coral(#FF6B6B)表示删除和已关闭条目、Amber(#FFB547)表示高亮,并配有高对比度浅色模式切换。Space Grotesk 和 Inter 负责导航与正文,JetBrains Mono 驱动带语法高亮的代码查看器、可点击行号和提交哈希。按下 '/' 或 Cmd+K 可唤起全局命令面板,实时搜索仓库、文件和 Issue。在移动端屏幕上,仓库文件树会整齐收进按需展开的抽屉,拉取请求差异会自动切换为统一视图。替换平台名称、组织标识、主仓库和维护者资料变量,即可将该工作区适配到任何工程团队或开源项目。

模板提示词

在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。

# Code Hosting Platform App

Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.

## Brief
Build an original, full-featured developer code-hosting web application for [BRAND], anchored on the [ORG_HANDLE]/[PRIMARY_REPO] open-source project maintained by [MAINTAINER_NAME] (@[MAINTAINER_HANDLE]). The app uses hash routing across Repository Code, Issues, Pull Requests, Commits, Releases, Insights, and User Profile views, with a global '/' and Cmd+K search palette, light/dark theme switching, and localStorage persistence isolated inside a single storage adapter module.

- Audience: Software engineers, open-source maintainers, developer-tools teams, and technical founders evaluating or demonstrating a self-contained repository collaboration workspace.
- Goal: Deliver an immediately inhabited, genuinely usable code-hosting interface on the very first screen—landing on the primary repository with an interactive file tree, branch switcher, syntax-highlighted code viewer, Markdown README, live diffs, and persistent local collaboration state.
- Tone: Crisp, technical, uncluttered, and authentic to real systems engineering teams—concrete commit messages, realistic multi-language source files, and zero marketing fluff.

## Stack
- Framework: Vite 6 + React 18 + TypeScript
- Styling: Tailwind CSS 4
- Libraries: lucide-react (ISC), @fontsource/space-grotesk (OFL-1.1), @fontsource/inter (OFL-1.1), @fontsource/jetbrains-mono (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - Set base: './' and build: { sourcemap: false } in vite.config.ts.
  - Import @fontsource/space-grotesk (600, 700), @fontsource/inter (400, 500, 600), and @fontsource/jetbrains-mono (400, 500, 600) in src/main.tsx.
  - Store all seeded repositories, source files, issues, pull requests, diffs, commits, releases, and profile metrics in src/data/seedData.ts, keyed dynamically from [BRAND], [ORG_HANDLE], [PRIMARY_REPO], [MAINTAINER_NAME], and [MAINTAINER_HANDLE].
  - Keep all browser persistence (stars, watches, forks, created issues, comments, inline PR reviews, reactions, and theme choice) inside src/data/storageAdapter.ts so swapping to a real API only edits one file.
  - Implement a lightweight, zero-dependency syntax tokenizer in src/utils/syntaxHighlight.ts supporting Rust, TypeScript, Go, Python, SQL, and Markdown without CDN scripts.

## Variables
- [BRAND] — Platform Name (default: "KestrelForge"). Fictional code-hosting platform name
- [ORG_HANDLE] — Organization Handle (default: "linden-sys"). Lowercase slug for the seeded organization
- [PRIMARY_REPO] — Primary Repository (default: "quiver-kv"). Default open repository shown on first load
- [MAINTAINER_NAME] — Maintainer Full Name (default: "Nadia Okafor"). Invented lead maintainer displayed on profile and commits
- [MAINTAINER_HANDLE] — Maintainer Handle (default: "nokafor"). Lowercase username for the maintainer profile
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/code-hosting-platform-app in the footer (default: yes; delete this line to remove it)

The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described.
Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.

Pro 模板

解锁完整提示词和源码

  • 完整提示词:设计、版块、动效、素材
  • 每个在线演示的源码
  • 商用授权

在线演示和 DESIGN.md 仍然免费。

$9/月起 · 年付和终身正在上线特惠

DESIGN.md

单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。

---
name: "Code Hosting Platform App"
colors:
  midnight_ink: "#0D1321"
  deep_slate: "#141C2F"
  border_slate: "#25324D"
  crisp_mist: "#E6EDF7"
  muted_steel: "#8FA2C2"
  mint_signal: "#3DDC97"
  coral_alert: "#FF6B6B"
  amber_highlight: "#FFB547"
  light_canvas: "#F4F7FB"
typography:
  display_headings: { family: "Space Grotesk", weights: [600, 700] }
  body_ui_controls: { family: "Inter", weights: [400, 500, 600] }
  code_diffs_hashes: { family: "JetBrains Mono", weights: [400, 500, 600] }
spacing: "Compact developer-tool density: 56px sticky top bar, 1280px max-width workspace container, 16px–20px panel gutters, 8px–12px control rhythm, generous 20px code reading padding."
radius: "6px for buttons, inputs, badges, and file rows; 10px for panels, code frames, and modal sheets; 999px for status pills and avatar rings."
---

# Code Hosting Platform App — Design System

Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.

## Colors
- **Midnight Ink** `#0D1321` — Primary dark-mode page canvas
- **Deep Slate** `#141C2F` — Cards, panels, top navigation bar, and code frame background
- **Border Slate** `#25324D` — 1px crisp structural hairlines and diff table dividers
- **Crisp Mist** `#E6EDF7` — Primary dark-mode foreground text
- **Muted Steel** `#8FA2C2` — Secondary labels, commit hashes, line numbers, and metadata
- **Mint Signal** `#3DDC97` — Diff additions, open issue/PR states, active indicators, and heatmap highs (darkened to #0E8A58 in light mode for AA contrast)
- **Coral Alert** `#FF6B6B` — Diff deletions, closed/rejected badges, and destructive actions (darkened to #D63B3B in light mode)
- **Amber Highlight** `#FFB547` — Starred state, pinned badges, review warnings, and release tags (darkened to #B8730B in light mode)
- **Light Canvas** `#F4F7FB` — Light-mode page background with #FFFFFF elevated surfaces and #0D1321 foreground text

## Typography
- **Display & Headings** — Space Grotesk (OFL), weights 600/700. Self-host the font files.
- **Body & UI Controls** — Inter (OFL), weights 400/500/600. Self-host the font files.
- **Code, Diffs & Hashes** — JetBrains Mono (OFL), weights 400/500/600. Self-host the font files.

## Spacing & shape
- Spacing: Compact developer-tool density: 56px sticky top bar, 1280px max-width workspace container, 16px–20px panel gutters, 8px–12px control rhythm, generous 20px code reading padding.
- Radius: 6px for buttons, inputs, badges, and file rows; 10px for panels, code frames, and modal sheets; 999px for status pills and avatar rings.

## Motion
- Subtle 140ms hover transitions on file rows, tabs, and reaction chips.
- Smooth 180ms slide-in drawer for the mobile file tree and command palette overlay with backdrop fade.
- Respect prefers-reduced-motion by disabling drawer/modal slide transitions and chart bar entrance transitions.

## Imagery
Pure code-drawn technical visuals: bespoke geometric SVG platform mark for [BRAND], geometric SVG avatar emblems for fictional contributors, crisp Lucide icons, custom SVG 52-week contribution heatmap, SVG commit branch-rail graph, and SVG code-frequency area/bar charts. No external photos or emoji icons.

## Tone
Crisp, technical, uncluttered, and authentic to real systems engineering teams—concrete commit messages, realistic multi-language source files, and zero marketing fluff.

---
— Prompt by VibeFather · https://vibefather.ai/t/code-hosting-platform-app · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

改成你自己的

  • 开源维护者:将 BRAND 设为你的项目,ORG_HANDLE 和 PRIMARY_REPO 设为你的仓库,并预置真实的 Issue 和版本发布,让访客看到实时活动。
  • 内部平台团队:保留深色 Midnight Ink 主题,用你的服务填充仓库树,并使用洞察分析图表展示跨团队的代码活动。
  • 开发者工具初创公司:将 MAINTAINER_NAME 和 MAINTAINER_HANDLE 指向你的首席工程师,并把资料页用作公开的工程展示。
  • 编程训练营:将预置源文件替换为 Rust、Go 和 Python 的课程仓库,并把 Issue 用作学生可以回复的练习讨论串。

代码托管平台应用:常见问题

如何把代码托管平台应用适配到我自己的工程团队或开源项目?

代码托管平台应用提供五个变量:BRAND 表示平台名称,ORG_HANDLE 表示组织标识,PRIMARY_REPO 表示首次加载时展示的仓库,MAINTAINER_NAME 和 MAINTAINER_HANDLE 表示首席维护者。修改这些值后,再重写预置的仓库、源文件、Issue、拉取请求、提交和版本发布,让它们描述你的项目。提示词要求你把所有文案放在一个内容文件中,这样无需改动组件即可替换。

在没有后端的情况下,代码托管平台应用把标星、新建 Issue 和审查评论存在哪里?

代码托管平台应用将所有浏览器持久化集中在一个存储适配器中,由它写入 localStorage。标星、关注、复刻、新建 Issue、Issue 回复、表情回应计数、内联拉取请求审查评论以及主题选择在页面刷新后都会保留。由于所有写入都经过这一个适配器,之后将应用指向真实 API 时只需改一个文件,而不用翻遍组件。

怎么用 AI 做一个代码托管平台应用?

复制本页的完整提示词(Pro),或者运行 npx vibefather add code-hosting-platform-app,把 [BRAND]、[ORG_HANDLE]、[PRIMARY_REPO]、[MAINTAINER_NAME] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。