城市公交与路线规划应用是一款简洁的瑞士风格城市出行 PWA,为虚构的滨海城市地铁网络打造。它采用真正的三断点响应式设计,不使用虚假的手机边框:在 768px 以下的移动屏幕上渲染底部四标签栏(路线、线路、附近、已保存),在平板和桌面上则展开为分屏交互式地图加行程控制台。底层运行一个真实的客户端最短路径路由引擎,覆盖 18 个虚构滨海车站,由三条颜色编码的地铁线路连接——蓝湾线(#0284C7)、琥珀码头线(#D97706)和翡翠岭线(#059669)。通勤者选择任意起点和终点,按最快时间或最少换乘排序结果,并查看分步乘车指引,包含精确站数和站台换乘提示。可缩放风格化 SVG 线网图让乘客点击任意车站查看实时倒计时发车和换乘链接。附近站点显示实时跳动的到站分钟数,已保存页面提供一键通勤的“家”和“公司”卡片以及持久化在 localStorage 中的固定路线,服务状态条展示具有实时感的线路公告。在 src/content.ts 中替换公交品牌、城市名称、家/公司通勤站点和货币票价标签。
在线演示就是用这份提示词原样做出来的,没有额外补充。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。
# City Transit & Route Planner App
Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.
## Brief
A crisp Swiss-style responsive mobile-first urban metro & bus transit companion PWA ([BRAND]) for the fictional coastal city of [CITY_NAME]. Mobile (<768px) uses a bottom 4-tab bar (Route, Lines, Nearby, Saved); desktop renders a split interactive SVG metro map + itinerary console. No fake phone shell.
- Audience: Daily urban commuters, visitors navigating metro lines, and civic transit teams prototyping mobile-first wayfinding web apps.
- Goal: Help commuters plan routes across 18 stations, inspect live countdown departures, and save frequent trips in seconds.
- Tone: Swiss precision, unmistakable color-coded hierarchy, calm and reliable.
## Stack
- Framework: Vite 5 + React 18 + TypeScript
- Styling: Tailwind CSS 3.4
- Libraries: lucide-react (ISC), @fontsource/inter (OFL), @fontsource/jetbrains-mono (OFL)
- 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/inter (400, 500, 600, 700) and @fontsource/jetbrains-mono (400, 500, 600) locally in src/main.tsx.
- Model all 18 fictional coastal stations, 3 metro lines (Blue Bay, Amber Pier, Emerald Ridge), interchange hubs, and real shortest-time / fewest-transfer pathfinding in src/data/transitGraph.ts.
- Persist saved trips and quick home/work shortcuts in localStorage.
- Never draw a fake phone bezel; render full-viewport responsive layouts across mobile (<768px) and desktop (>=768px).
## Variables
- [BRAND] — Transit app name (default: "HarborLine"). Fictional transit companion PWA name
- [CITY_NAME] — Fictional coastal city (default: "Port Maris"). City displayed in header and map legend
- [HOME_STATION] — Saved Home station (default: "Seaview Terrace"). Quick commute Home preset
- [WORK_STATION] — Saved Work station (default: "Central Harbor"). Quick commute Work preset
- [SINGLE_FARE] — Standard metro fare (default: "$2.75"). Fare estimate shown on route cards
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/city-transit-route-planner-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.
## Design
### Colors
- Swiss Transit White `#F8FAFC` — Primary clean canvas
- Card Pure White `#FFFFFF` — Route itinerary and departure panels
- Transit Charcoal `#0F172A` — Primary typography, station rings, and high-contrast pills
- Metro Blue Line `#0284C7` — Blue Bay Line route stroke, primary CTAs, and active tabs
- Amber Pier Line `#D97706` — Amber Pier Line route stroke and service advisory highlight
- Emerald Ridge Line `#059669` — Emerald Ridge Line stroke and On-Time live badges
### Typography
- Swiss neo-grotesque signage and UI: Inter (OFL), weights 400/500/600/700
- Departure countdowns, platform numbers, and route durations: JetBrains Mono (OFL), weights 400/500/600
### Layout & motion
- Spacing: Mobile (<768px) stacks compact route controls above interactive map and itinerary with 80px clearance above the fixed 64px bottom tab bar. Desktop (>=1024px) displays a top Swiss nav bar + split workspace (left 420px itinerary/controls + right flexible interactive zoomable SVG metro map).
- Radius: 14px for route and station cards, 10px for inputs and zoom controls, 999px for line code badges (B1, A2, E3) and countdown pills.
- Motion: Smooth animated SVG route path highlight along the planned segments.
- Motion: Subtle pulsing emerald dot on live minute countdown badges.
- Motion: Respects prefers-reduced-motion; all content visible immediately.
- Imagery: 100% crisp code-drawn Swiss transit graphics: zoomable 18-station geometric SVG metro schematic with coastline tint, interchange double-rings, animated route highlight, and Lucide transit icons.
## Pages & Sections
### [BRAND] — [CITY_NAME] Transit & Route Planner (`index.html`)
1. **Adaptive Navigation & Service Status Strip** — Mobile (<768px): compact [BRAND] · [CITY_NAME] top bar with Service Status pill + fixed bottom 4-tab bar (Route, Lines, Nearby, Saved). Desktop (>=768px): sleek Swiss top navigation bar with live service advisory ticker ('Blue & Emerald normal · Amber Pier +3 min near Lighthouse Dock').
Layout: Full-viewport Swiss utility PWA shell; zero fake phone frame.
2. **Route Planner & Interactive Zoomable 18-Station SVG Metro Map** — Origin & Destination selectors across 18 fictional coastal stations with one-tap Swap button, 'Fastest' vs 'Fewest Transfers' toggle, and quick Home/Work shortcut chips ([HOME_STATION] <-> [WORK_STATION]). Displays computed step-by-step boarding itinerary (line badge, boarding station, stop count, transfer platform cue, estimated duration, [SINGLE_FARE] fare) + 'Save Trip' toggle. Paired directly with the zoomable (+ / - / Reset) interactive SVG Metro Map highlighting the active route; tapping any station opens its live departure countdown drawer/card.
Layout: Split panel on desktop (itinerary left, interactive map right); stacked route card + interactive map on mobile.
3. **Lines View — Network Directory & Service Alerts** — Shows all 3 color-coded metro lines (B1 Blue Bay Line, A2 Amber Pier Line, E3 Emerald Ridge Line) with live status pills, headway frequency (every 4–6 min), and clickable ordered station lists that inspect departures.
Layout: 3-column line grid on desktop; stacked expandable cards on mobile.
4. **Nearby Stops & Saved Commutes Views** — Nearby tab lists 5 closest metro & express bus stops with walking distance and animated live arrival countdown minutes (e.g., 2 min, 6 min, 11 min). Saved tab provides one-tap Home ([HOME_STATION]) and Work ([WORK_STATION]) commute launchers plus user-saved trips persisted in localStorage.
Layout: 2-column responsive card grids on desktop; single-column feed on mobile.
## Assets
- icon: Install lucide-react (ISC) for train, bus, arrow-up-down swap, zoom in/out, bookmark, and alert icons.
- font: Self-host Inter and JetBrains Mono via @fontsource packages (OFL).
- image: Interactive 18-station coastal metro schematic is rendered purely in inline SVG. Zero external photos or map tiles.
## Don'ts
- No fake phone bezel or narrow mobile container on desktop viewports.
- No real city names, real transit agencies, or external map tile APIs.
- No hardcoded calendar dates; use live relative departure countdowns (e.g., '3 min', '8 min').
- No CDN scripts, Google Fonts links, or source maps; always set base: './'.
- No horizontal overflow on 390x844 mobile or 1440x900 desktop.
- No mention of VibeFather or competitors except the optional [CREDIT] slot.
---
— Prompt by VibeFather · https://vibefather.ai/t/city-transit-route-planner-app · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
# 城市交通与路线规划应用
完全按照以下描述构建此网站。将 [VARIABLES] 替换为你自己的值;其余内容保持不变。
## 简介
一款清爽的瑞士风格响应式移动优先城市地铁与公交出行伴侣 PWA([BRAND]),面向虚构的海岸城市 [CITY_NAME]。移动端(<768px)使用底部 4 标签栏(Route、Lines、Nearby、Saved);桌面端渲染分屏交互式 SVG 地铁图 + 行程控制台。不使用虚假手机外壳。
- 受众:日常城市通勤者、导航地铁线路的游客,以及原型设计移动优先寻路 Web 应用的市政交通团队。
- 目标:帮助通勤者在 18 个站点之间规划路线,查看实时倒计时发车信息,并在几秒内保存常用行程。
- 基调:瑞士式精准、清晰无误的颜色编码层级、沉稳可靠。
## 技术栈
- 框架:Vite 5 + React 18 + TypeScript
- 样式:Tailwind CSS 3.4
- 库:lucide-react (ISC)、@fontsource/inter (OFL)、@fontsource/jetbrains-mono (OFL)
- 构建:`npm run build` → `dist/` 中的静态文件。无后端、无服务器代码、无外部 API。
- 设置:
- 在 vite.config.ts 中设置 base: './' 和 build: { sourcemap: false }。
- 在 src/main.tsx 中本地导入 @fontsource/inter(400、500、600、700)和 @fontsource/jetbrains-mono(400、500、600)。
- 在 src/data/transitGraph.ts 中建模全部 18 个虚构沿海车站、3 条地铁线路(Blue Bay、Amber Pier、Emerald Ridge)、换乘枢纽,以及真实的基于最短时间 / 最少换乘的路径查找。
- 将已保存的行程和快捷家庭/工作快捷方式持久化到 localStorage。
- 绝不绘制虚假的手机边框;在移动端(<768px)和桌面端(>=768px)渲染全视口响应式布局。
## 变量
- [BRAND] — 公交应用名称(默认:“HarborLine”)。虚构的公交伴侣 PWA 名称
- [CITY_NAME] — 虚构的沿海城市(默认:“Port Maris”)。显示在页眉和地图图例中的城市
- [HOME_STATION] — 已保存的 Home 站点(默认:“Seaview Terrace”)。快速通勤 Home 预设
- [WORK_STATION] — 已保存的 Work 站点(默认:“Central Harbor”)。快速通勤 Work 预设
- [SINGLE_FARE] — 标准地铁票价(默认:“$2.75”)。显示在路线卡片上的票价估算
- [CREDIT] — 在页脚保留一个小型“Template by VibeFather”链接,指向 https://vibefather.ai/t/city-transit-route-planner-app(默认:是;删除此行即可移除)
“页面与区块”下的文案是为默认值编写的。如果你的值不同,请为它们重写每个标题、段落、标签和图片——保持相同的长度、语气和结构。布局、颜色、字体和动效保持所述不变。
将所有文案、图片路径和链接放在一个内容文件中(例如 `src/content.ts`),按区块作为键,以便之后无需改动组件即可替换内容。
## 设计
### 颜色
- 瑞士交通白(Swiss Transit White)`#F8FAFC` — 主清爽画布
- 卡片纯白(Card Pure White)`#FFFFFF` — 路线行程与出发面板
- 交通炭黑(Transit Charcoal)`#0F172A` — 主排版、站点圆环和高对比度胶囊标签
- 地铁蓝线(Metro Blue Line)`#0284C7` — Blue Bay Line 路线描边、主 CTA 和活动标签页
- 琥珀码头线(Amber Pier Line)`#D97706` — Amber Pier Line 路线描边和服务公告高亮
- 翡翠岭线(Emerald Ridge Line)`#059669` — Emerald Ridge Line 描边和 On-Time 实时徽章
### 排版
- 瑞士新怪诞体导视与 UI:Inter(OFL),字重 400/500/600/700
- 出发倒计时、站台编号和路线时长:JetBrains Mono(OFL),字重 400/500/600
### 布局与动效
- 间距:移动端(<768px)将紧凑的路线控件堆叠在交互式地图和行程上方,并在固定的 64px 底部标签栏上方留出 80px 间隙。桌面端(>=1024px)显示顶部瑞士导航栏 + 分栏工作区(左侧 420px 行程/控件 + 右侧可弹性伸缩的交互式可缩放 SVG 地铁地图)。
- 圆角:路线和站点卡片为 14px,输入框和缩放控件为 10px,线路代码徽章(B1、A2、E3)和倒计时胶囊为 999px。
- 动效:沿规划路段平滑动画高亮 SVG 路线路径。
- 动效:实时分钟倒计时徽章上带有细微脉动的翡翠色圆点。
- 动效:遵循 prefers-reduced-motion;所有内容立即可见。
- 图像:100% 清晰的代码绘制瑞士交通图形:可缩放的 18 站几何 SVG 地铁示意图,带海岸线色调、换乘双环、动画路线高亮和 Lucide 交通图标。
## 页面与区块
### [BRAND] — [CITY_NAME] 交通与路线规划器(`index.html`)
1. **自适应导航与服务状态条** — 移动端(<768px):紧凑的 [BRAND] · [CITY_NAME] 顶栏,带服务状态胶囊标签 + 固定底部 4 标签栏(Route、Lines、Nearby、Saved)。桌面端(>=768px):简洁的瑞士风格顶部导航栏,带实时服务公告滚动条('Blue & Emerald normal · Amber Pier +3 min near Lighthouse Dock')。
布局:全视口瑞士实用型 PWA 外壳;无虚假手机边框。
2. **路线规划器与可交互缩放 18 站 SVG 地铁图** — 覆盖 18 个虚构沿海车站的起点与终点选择器,带一键 Swap 按钮、'Fastest' 与 'Fewest Transfers' 切换,以及快捷 Home/Work 快捷标签([HOME_STATION] <-> [WORK_STATION])。显示计算出的分步乘车行程(线路徽章、上车站、站数、换乘站台提示、预计时长、[SINGLE_FARE] 票价)+ 'Save Trip' 切换。与可缩放(+ / - / Reset)的交互式 SVG 地铁图直接配对,高亮当前路线;点击任意车站可打开其实时发车倒计时抽屉/卡片。
布局:桌面端分栏面板(行程在左,交互地图在右);移动端堆叠路线卡片 + 交互地图。
3. **线路视图 — 网络目录与服务提醒** — 显示全部 3 条颜色编码的地铁线路(B1 Blue Bay Line、A2 Amber Pier Line、E3 Emerald Ridge Line),带实时状态胶囊标签、发车间隔频率(每 4–6 分钟),以及可点击的有序车站列表,可查看发车信息。
布局:桌面端 3 列线路网格;移动端堆叠可展开卡片。
4. **附近站点与已保存通勤视图** — Nearby 标签列出最近的 5 个地铁与快速公交站点,带步行距离和动态实时到站倒计时分钟数(例如 2 min、6 min、11 min)。Saved 标签提供一键 Home([HOME_STATION])和 Work([WORK_STATION])通勤启动器,以及持久化在 localStorage 中的用户已保存行程。
布局:桌面端 2 列响应式卡片网格;移动端单列信息流。
## 资源
- 图标:安装 lucide-react(ISC),用于火车、公交、上下箭头切换、放大/缩小、书签和警告图标。
- 字体:通过 @fontsource 包(OFL)自托管 Inter 和 JetBrains Mono。
- 图像:交互式 18 站沿海地铁示意图完全以内联 SVG 渲染。零外部照片或地图瓦片。
## 不要做的事
- 桌面视口下不要使用假手机边框或狭窄的移动端容器。
- 不要使用真实城市名、真实交通机构或外部地图瓦片 API。
- 不要硬编码日历日期;使用实时相对发车倒计时(例如 '3 min'、'8 min')。
- 不要使用 CDN 脚本、Google Fonts 链接或 source map;始终设置 base: './'。
- 在 390x844 移动端或 1440x900 桌面端不要出现水平溢出。
- 除可选的 [CREDIT] 槽位外,不要提及 VibeFather 或竞品。
---
— Prompt by VibeFather · https://vibefather.ai/t/city-transit-route-planner-app · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
个人项目可免费使用(CC BY-NC 4.0)。 商业用途需要 Pro.
单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。
---
name: "City Transit & Route Planner App"
colors:
swiss_transit_white: "#F8FAFC"
card_pure_white: "#FFFFFF"
transit_charcoal: "#0F172A"
metro_blue_line: "#0284C7"
amber_pier_line: "#D97706"
emerald_ridge_line: "#059669"
typography:
swiss_neo_grotesque_signage_and_ui: { family: "Inter", weights: [400, 500, 600, 700] }
departure_countdowns_platform_numbers_and_route_durations: { family: "JetBrains Mono", weights: [400, 500, 600] }
spacing: "Mobile (<768px) stacks compact route controls above interactive map and itinerary with 80px clearance above the fixed 64px bottom tab bar. Desktop (>=1024px) displays a top Swiss nav bar + split workspace (left 420px itinerary/controls + right flexible interactive zoomable SVG metro map)."
radius: "14px for route and station cards, 10px for inputs and zoom controls, 999px for line code badges (B1, A2, E3) and countdown pills."
---
# City Transit & Route Planner 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
- **Swiss Transit White** `#F8FAFC` — Primary clean canvas
- **Card Pure White** `#FFFFFF` — Route itinerary and departure panels
- **Transit Charcoal** `#0F172A` — Primary typography, station rings, and high-contrast pills
- **Metro Blue Line** `#0284C7` — Blue Bay Line route stroke, primary CTAs, and active tabs
- **Amber Pier Line** `#D97706` — Amber Pier Line route stroke and service advisory highlight
- **Emerald Ridge Line** `#059669` — Emerald Ridge Line stroke and On-Time live badges
## Typography
- **Swiss neo-grotesque signage and UI** — Inter (OFL), weights 400/500/600/700. Self-host the font files.
- **Departure countdowns, platform numbers, and route durations** — JetBrains Mono (OFL), weights 400/500/600. Self-host the font files.
## Spacing & shape
- Spacing: Mobile (<768px) stacks compact route controls above interactive map and itinerary with 80px clearance above the fixed 64px bottom tab bar. Desktop (>=1024px) displays a top Swiss nav bar + split workspace (left 420px itinerary/controls + right flexible interactive zoomable SVG metro map).
- Radius: 14px for route and station cards, 10px for inputs and zoom controls, 999px for line code badges (B1, A2, E3) and countdown pills.
## Motion
- Smooth animated SVG route path highlight along the planned segments.
- Subtle pulsing emerald dot on live minute countdown badges.
- Respects prefers-reduced-motion; all content visible immediately.
## Imagery
100% crisp code-drawn Swiss transit graphics: zoomable 18-station geometric SVG metro schematic with coastline tint, interchange double-rings, animated route highlight, and Lucide transit icons.
## Tone
Swiss precision, unmistakable color-coded hierarchy, calm and reliable.
---
— Prompt by VibeFather · https://vibefather.ai/t/city-transit-route-planner-app · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
城市公交与路线规划应用在 18 个虚构滨海车站上运行真实的客户端最短路径路由引擎,这些车站由三条地铁线路连接。你选择起点和终点,选择最快时间或最少换乘,应用就会返回分步乘车指引,包含线路徽章、站数、换乘站台提示、预计时长以及基于单程票价设置的票价。不涉及服务器或外部 API。
复制本页的提示词,或者运行 npx vibefather add city-transit-route-planner-app,把 变量 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。