Monorepo Tamagui

Mindrally/skills/monorepo-tamagui

作者 Mindrally7682ca77710e0971eab4e0ae5dddfa281aea0ba5无许可证269 个星标收录于 2026年10月8日更新于 2026年10月9日仓库5周前更新

Monorepo development guidelines using Tamagui, Turbo, Next.js, Expo, Supabase, and cross-platform best practices.

AI 生成的概览

使用 Tamagui、Turbo、Next.js、Expo 和 Supabase 构建跨平台 monorepo 应用的开发指南。

功能
该技能为在 monorepo 中构建跨平台应用提供专家级开发指南。内容涵盖代码风格、TypeScript 与 Zod 校验、Tamagui 界面与样式、Zustand 与 TanStack React Query 状态管理、i18next 国际化、错误处理、性能优化、Turbo monorepo 结构、Solito 跨平台导航以及 Stripe 支付集成。它产出的是书面约定与建议,而非代码或文件。
适用场景
当你在结合 Next.js、Expo 和 Tamagui 的 TypeScript monorepo 中工作并希望保持一致的约定时使用。也适用于为此类项目添加跨平台导航、共享状态、国际化或 Stripe 订阅功能。
运行要求
除智能体外不需要任何脚本或工具,它是一份纯说明文档。所述技术栈涉及 TypeScript、React、Next.js、Expo、Tamagui、Supabase、Zod、Turbo、i18next、Zustand、TanStack React Query、Solito 和 Stripe,但阅读这些指导无需安装任何内容。

Monorepo using Tamagui

Expert developer guidelines for building cross-platform applications with TypeScript, React, Next.js, Expo, Tamagui, Supabase, Zod, Turbo, i18next, Zustand, TanStack React Query, Solito, and Stripe.

Code Style and Structure

  • Write concise TypeScript using functional patterns
  • Use descriptive variable names with auxiliary verbs like isLoading
  • Structure files with exported components, helpers, and types using named exports

TypeScript and Validation

  • Prefer interfaces over types
  • Leverage Zod for schema validation
  • Use literal types instead of enums
  • Build functional components with TypeScript interfaces for props

UI and Styling

  • Apply Tamagui for cross-platform components
  • Implement mobile-first responsive design
  • Maintain styling consistency across web and native
  • Utilize Tamagui theming capabilities

State Management

  • Use Zustand for state management
  • Employ TanStack React Query for data fetching and caching
  • Minimize useEffect usage

Internationalization

  • Use i18next and react-i18next for web
  • Apply expo-localization for React Native
  • Internationalize all user-facing text

Error Handling

  • Prioritize edge cases
  • Handle errors early with guard clauses
  • Implement custom error types for consistency

Performance Optimization

  • Optimize both web and native platforms
  • Use dynamic imports in Next.js
  • Implement lazy loading
  • Optimize images with proper formats

Monorepo Structure

  • Follow Turbo best practices
  • Isolate packages with correct dependency management
  • Use shared configurations
  • Structure workspace per package.json

Cross-Platform Development

  • Use Solito for navigation
  • Create .native.tsx files for platform-specific code
  • Use SolitoImage for cross-platform image compatibility

Stripe Integration

  • Implement payment processing and subscriptions
  • Use Stripe Customer Portal
  • Handle webhooks for subscription events
  • Sync subscription status with Supabase

来源与署名

来源:Mindrally/skills位于monorepo-tamagui提交7682ca7

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架