How get-convex/turbo-expo-nextjs-clerk-convex-monorepo works
Main Components
• Frontend Web App (apps/web): Built with Next.js 14, TailwindCSS, and Clerk integration. It provides marketing pages, a dashboard, and note-taking functionality.
• Frontend Mobile App (apps/native): A React Native app using Expo that mirrors the functionality of the web app – dashboard, note-taking, and authentication.
• Backend (packages/backend/convex): Powered by Convex, this contains the database schema, queries, mutations, actions, and other server functions. It serves both the web and native clients through a consistent API.
• External Services:
• Clerk for user authentication.
• OpenAI for AI summarization (if enabled).
• Turborepo for monorepo management.
• Additional utilities (TypeScript, Prettier, Expo, etc.).
Out the Relationships and Interactions
• Both the web and native apps as separate client components that communicate with the backend (Convex).
• External integrations:
• Monorepo structure by noting that Turborepo is managing these multiple packages (apps and backend).
Architectural Patterns and Design Principles
• The separation of concerns is clear: the frontend apps are responsible solely for UI and client logic, while the backend (Convex) handles data management and server functions.
• End-to-end type safety, where data models and API definitions are shared between the backend and frontends.
• Use of real-time reactivity in Convex, which is key to data subscriptions on both clients.
• The design encourages a central backend API that serves both platforms, which simplifies maintenance and ensures consistency.
• “Web App (Next.js + TailwindCSS + Clerk)”
• “Native App (React Native + Expo)”
• “Backend (Convex: Database & Server Functions)”
• “Authentication (Clerk)”
• “AI Summarization (OpenAI API) – Optional”
• “Monorepo Tooling (Turborepo)”