docs: 重写 README,对齐决策引擎定位与双模式产品形态
This commit is contained in:
@@ -1,18 +1,52 @@
|
||||
# NoWhatever — 别说随便
|
||||
|
||||
像 Tinder 一样滑卡片,和朋友一起决定去哪吃!解决聚餐时"随便都行"的纠结痛点,无需下载 App,用完即走。
|
||||
> 亲密关系决策引擎。别再说"随便"了,两个模式覆盖你们所有的选择困难症。
|
||||
|
||||
## 两大模式
|
||||
|
||||
### ⚡️ 极速救场 · Panic Mode
|
||||
|
||||
10 秒内出结果,立刻闭嘴,听天由命。
|
||||
|
||||
- 基于 GPS 或手动选点,搜索附近餐厅 / 酒吧
|
||||
- Tinder 式滑卡投票 — 右滑想去、左滑跳过
|
||||
- 多人实时匹配 — 分享房间链接,所有人同时滑,自动算出最优解
|
||||
- 全员一致时触发庆祝特效,非全员一致可发起 Top N 决赛
|
||||
- 匹配结果支持一键导航、电话订位、收藏、生成分享卡片
|
||||
|
||||
### 🎁 周末契约 · Adventure Roulette
|
||||
|
||||
丢入疯狂想法,周末盲盒开奖,绝不反悔。
|
||||
|
||||
- 创建专属房间,邀请 TA 用 6 位房间号加入
|
||||
- 平日随时向盲盒池投放想法(美食 / 旅行 / 运动 / 奇葩挑战)
|
||||
- 周末一起盲抽,开奖结果不可反悔
|
||||
- 支持多个房间并行,房间成员共同管理想法池
|
||||
|
||||
## 通用能力
|
||||
|
||||
- **用户系统** — 用户名 + 密码注册,10 秒完成,头像自选
|
||||
- **分享卡片** — 匹配 / 开奖结果一键生成品牌分享图,支持保存 & Web Share API
|
||||
- **个人中心** — 决策历史回顾、餐厅收藏管理
|
||||
- **多场景** — 吃饭 / 喝酒场景切换,复用同一套滑卡机制
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- **Next.js** (App Router) + **React** + **TypeScript**
|
||||
- **Tailwind CSS** — Utility-first styling
|
||||
- **Next.js 16** (App Router) + **React 19** + **TypeScript**
|
||||
- **Prisma** + **SQLite** — 数据持久化
|
||||
- **Tailwind CSS v4** — Utility-first styling
|
||||
- **Framer Motion** — Physics-based swipe & drag animations
|
||||
- **SWR** — 实时轮询 & 数据缓存
|
||||
- **Lucide React** — Icon library
|
||||
- **canvas-confetti** — 匹配庆祝特效
|
||||
- **html-to-image** + **qrcode.react** — 分享卡片 & 邀请二维码
|
||||
|
||||
## Getting Started
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npx prisma generate
|
||||
npx prisma db push
|
||||
npm run dev
|
||||
```
|
||||
|
||||
@@ -23,16 +57,37 @@ Open [http://localhost:3000](http://localhost:3000) in your browser (best viewed
|
||||
```
|
||||
src/
|
||||
├── app/
|
||||
│ ├── globals.css # Global styles (mobile-first, no scroll)
|
||||
│ ├── layout.tsx # Root layout with viewport meta
|
||||
│ └── page.tsx # Main entry page
|
||||
├── components/
|
||||
│ ├── TopNav.tsx # Navigation bar with room info
|
||||
│ ├── RestaurantCard.tsx # Restaurant display card
|
||||
│ ├── SwipeableCard.tsx # Framer Motion drag/swipe logic
|
||||
│ ├── SwipeDeck.tsx # Card stack orchestrator
|
||||
│ ├── ActionButtons.tsx # Nope / Like action buttons
|
||||
│ └── MatchResult.tsx # Match celebration screen
|
||||
│ ├── page.tsx # 首页 — 双模式入口
|
||||
│ ├── panic/page.tsx # 极速救场 — 定位 / 选点 / 创建房间
|
||||
│ ├── room/[id]/page.tsx # 滑卡房间 — 多人实时投票
|
||||
│ ├── invite/[id]/page.tsx # 邀请页 — 扫码 / 链接加入房间
|
||||
│ ├── blindbox/page.tsx # 周末契约大厅 — 房间列表
|
||||
│ ├── blindbox/[code]/page.tsx # 盲盒房间 — 想法投放 & 开奖
|
||||
│ ├── profile/page.tsx # 个人中心 — 历史 / 收藏 / 资料
|
||||
│ └── api/ # API Routes
|
||||
│ ├── auth/ # 登录 / 注册
|
||||
│ ├── room/ # 房间 CRUD / 滑动 / 匹配
|
||||
│ ├── blindbox/ # 盲盒房间 / 想法 / 抽奖
|
||||
│ ├── user/ # 用户资料 / 历史 / 收藏
|
||||
│ └── location/ # 地理编码 / 地点建议
|
||||
├── components/ # UI 组件
|
||||
│ ├── SwipeDeck.tsx # 卡片堆栈编排器
|
||||
│ ├── SwipeableCard.tsx # 拖拽 / 滑动逻辑
|
||||
│ ├── RestaurantCard.tsx # 餐厅信息展示卡
|
||||
│ ├── MatchResult.tsx # 匹配成功庆祝页
|
||||
│ ├── ShareCardModal.tsx # 分享卡片生成弹窗
|
||||
│ ├── AuthModal.tsx # 登录 / 注册弹窗
|
||||
│ ├── TopNav.tsx # 顶部导航栏
|
||||
│ └── ... # 其他 UI 组件
|
||||
├── hooks/
|
||||
│ └── useRoomPolling.ts # 房间状态实时轮询
|
||||
├── lib/ # 工具函数 & 服务
|
||||
│ ├── prisma.ts # Prisma 客户端
|
||||
│ ├── buildRoomStatus.ts # 房间状态构建 & 匹配算法
|
||||
│ ├── sceneConfig.ts # 场景配置(吃饭 / 喝酒)
|
||||
│ ├── celebrate.ts # 庆祝特效 & 音效
|
||||
│ ├── userId.ts # 用户 ID & 注册状态管理
|
||||
│ └── ... # 其他工具
|
||||
└── types/
|
||||
└── index.ts # TypeScript type definitions
|
||||
└── index.ts # TypeScript 类型定义
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user