选择困难症的终结者
一个简洁优雅的跨平台应用,帮你快速决定今天吃什么。支持 iOS、Android 和 Web 三端。
首页展示抽取结果,池子管理页面管理选项
# 克隆项目
git clone https://cnb.cool/lzf.ai/what-to-eat.git
cd what-to-eat
# 安装依赖
npm install
# 或
bun install
# 启动开发服务器
npm start
# iOS 模拟器
npm run ios
# Android 模拟器
npm run android
# Web 浏览器
npm run web
| 技术 | 用途 |
|---|---|
| Expo | 跨平台框架 |
| React Native | 移动端开发 |
| Expo Router | 路由导航 |
| Zustand | 状态管理 |
| NativeWind | 样式方案 |
| Reanimated | 动画引擎 |
| AsyncStorage | 本地存储 |
what-to-eat/ ├── app/ # 页面 (Expo Router) │ ├── _layout.tsx # 根布局 │ ├── index.tsx # 首页 │ ├── pool.tsx # 池子管理 │ └── settings.tsx # 设置页面 ├── components/ # 可复用组件 │ ├── BigButton.tsx # 主按钮 │ ├── ItemCard.tsx # 选项卡片 │ └── AddItemModal.tsx # 添加弹窗 ├── store/ # 状态管理 │ └── index.ts # Zustand store ├── types/ # TypeScript 类型 │ └── index.ts ├── assets/ # 静态资源 ├── app.json # Expo 配置 ├── package.json ├── tailwind.config.js # Tailwind 配置 └── tsconfig.json
点击中央大按钮,系统会从已启用的选项中随机抽取一个。支持动画效果。
编辑 app.json:
{
"expo": {
"name": "你的应用名称"
}
}
编辑 tailwind.config.js 中的颜色配置。
# 安装 EAS CLI
npm install -g eas-cli
# 配置项目
eas build:configure
# 构建 iOS
eas build --platform ios
# 构建 Android
eas build --platform android
# 构建 Web
eas build --platform web
# iOS (需要 macOS + Xcode)
npx expo run:ios --configuration Release
# Android (需要 Android Studio)
npx expo run:android --variant release
# Web
npx expo export --platform web
# 运行 lint 检查
npm run lint
# 类型检查
npx tsc --noEmit
欢迎贡献代码、报告问题或提出建议!
git checkout -b feature/AmazingFeature)git commit -m 'feat: add some feature')git push origin feature/AmazingFeature)Made with ❤️ for people who can't decide what to eat