[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71379":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":38,"readmeContent":39,"aiSummary":40,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":41,"discoverSource":42},71379,"create-t3-turbo","t3-oss\u002Fcreate-t3-turbo","t3-oss","Clean and simple starter repo using the T3 Stack along with Expo React Native","https:\u002F\u002Fturbo.t3.gg",null,"TypeScript",6058,563,39,35,0,2,8,23,6,39.25,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37],"better-auth","expo","nextjs","t3-stack","tailwindcss","tanstack","tanstack-form","tanstack-query","tanstack-start","trpc","vite","2026-06-12 02:02:51","# create-t3-turbo\n\n> [!NOTE]\n>\n> create-t3-turbo now includes the option to use Tanstack Start for the web app!\n\n## Installation\n\n> [!NOTE]\n>\n> Make sure to follow the system requirements specified in [`package.json#engines`](.\u002Fpackage.json#L4) before proceeding.\n\nThere are two ways of initializing an app using the `create-t3-turbo` starter. You can either use this repository as a template:\n\n![use-as-template](https:\u002F\u002Fgithub.com\u002Ft3-oss\u002Fcreate-t3-turbo\u002Fassets\u002F51714798\u002Fbb6c2e5d-d8b6-416e-aeb3-b3e50e2ca994)\n\nor use Turbo's CLI to init your project (use PNPM as package manager):\n\n```bash\nnpx create-turbo@latest -e https:\u002F\u002Fgithub.com\u002Ft3-oss\u002Fcreate-t3-turbo\n```\n\n## About\n\nEver wondered how to migrate your T3 application into a monorepo? Stop right here! This is the perfect starter repo to get you running with the perfect stack!\n\nIt uses [Turborepo](https:\u002F\u002Fturborepo.com) and contains:\n\n```text\n.github\n  └─ workflows\n        └─ CI with pnpm cache setup\n.vscode\n  └─ Recommended extensions and settings for VSCode users\napps\n  ├─ expo\n  │   ├─ Expo SDK 54\n  │   ├─ React Native 0.81 using React 19\n  │   ├─ Navigation using Expo Router\n  │   ├─ Tailwind CSS v4 using NativeWind v5\n  │   └─ Typesafe API calls using tRPC\n  ├─ nextjs\n  │   ├─ Next.js 15\n  │   ├─ React 19\n  │   ├─ Tailwind CSS v4\n  │   └─ E2E Typesafe API Server & Client\n  └─ tanstack-start\n      ├─ Tanstack Start v1 (rc)\n      ├─ React 19\n      ├─ Tailwind CSS v4\n      └─ E2E Typesafe API Server & Client\npackages\n  ├─ api\n  │   └─ tRPC v11 router definition\n  ├─ auth\n  │   └─ Authentication using better-auth.\n  ├─ db\n  │   └─ Typesafe db calls using Drizzle & Supabase\n  └─ ui\n      └─ Start of a UI package for the webapp using shadcn-ui\ntooling\n  ├─ eslint\n  │   └─ shared, fine-grained, eslint presets\n  ├─ prettier\n  │   └─ shared prettier configuration\n  ├─ tailwind\n  │   └─ shared tailwind theme and configuration\n  └─ typescript\n      └─ shared tsconfig you can extend from\n```\n\n> In this template, we use `@acme` as a placeholder for package names. As a user, you might want to replace it with your own organization or project name. You can use find-and-replace to change all the instances of `@acme` to something like `@my-company` or `@project-name`.\n\n## Quick Start\n\n> **Note**\n> The [db](.\u002Fpackages\u002Fdb) package is preconfigured to use Supabase and is **edge-bound** with the [Vercel Postgres](https:\u002F\u002Fgithub.com\u002Fvercel\u002Fstorage\u002Ftree\u002Fmain\u002Fpackages\u002Fpostgres) driver. If you're using something else, make the necessary modifications to the [schema](.\u002Fpackages\u002Fdb\u002Fsrc\u002Fschema.ts) as well as the [client](.\u002Fpackages\u002Fdb\u002Fsrc\u002Findex.ts) and the [drizzle config](.\u002Fpackages\u002Fdb\u002Fdrizzle.config.ts). If you want to switch to non-edge database driver, remove `export const runtime = \"edge\";` [from all pages and api routes](https:\u002F\u002Fgithub.com\u002Ft3-oss\u002Fcreate-t3-turbo\u002Fissues\u002F634#issuecomment-1730240214).\n\nTo get it running, follow the steps below:\n\n### 1. Setup dependencies\n\n> [!NOTE]\n>\n> While the repo does contain both a Next.js and Tanstack Start version of a web app, you can pick which one you like to use and delete the other folder before starting the setup.\n\n```bash\n# Install dependencies\npnpm i\n\n# Configure environment variables\n# There is an `.env.example` in the root directory you can use for reference\ncp .env.example .env\n\n# Push the Drizzle schema to the database\npnpm db:push\n```\n\n### 2. Generate Better Auth Schema\n\nThis project uses [Better Auth](https:\u002F\u002Fwww.better-auth.com) for authentication. The auth schema needs to be generated using the Better Auth CLI before you can use the authentication features.\n\n```bash\n# Generate the Better Auth schema\npnpm --filter @acme\u002Fauth generate\n```\n\nThis command runs the Better Auth CLI with the following configuration:\n\n- **Config file**: `packages\u002Fauth\u002Fscript\u002Fauth-cli.ts` - A CLI-only configuration file (isolated from src to prevent imports)\n- **Output**: `packages\u002Fdb\u002Fsrc\u002Fauth-schema.ts` - Generated Drizzle schema for authentication tables\n\nThe generation process:\n\n1. Reads the Better Auth configuration from `packages\u002Fauth\u002Fscript\u002Fauth-cli.ts`\n2. Generates the appropriate database schema based on your auth setup\n3. Outputs a Drizzle-compatible schema file to the `@acme\u002Fdb` package\n\n> **Note**: The `auth-cli.ts` file is placed in the `script\u002F` directory (instead of `src\u002F`) to prevent accidental imports from other parts of the codebase. This file is exclusively for CLI schema generation and should **not** be used directly in your application. For runtime authentication, use the configuration from `packages\u002Fauth\u002Fsrc\u002Findex.ts`.\n\nFor more information about the Better Auth CLI, see the [official documentation](https:\u002F\u002Fwww.better-auth.com\u002Fdocs\u002Fconcepts\u002Fcli#generate).\n\n### 3. Configure Expo `dev`-script\n\n#### Use iOS Simulator\n\n1. Make sure you have XCode and XCommand Line Tools installed [as shown on expo docs](https:\u002F\u002Fdocs.expo.dev\u002Fworkflow\u002Fios-simulator).\n\n   > **NOTE:** If you just installed XCode, or if you have updated it, you need to open the simulator manually once. Run `npx expo start` from `apps\u002Fexpo`, and then enter `I` to launch Expo Go. After the manual launch, you can run `pnpm dev` in the root directory.\n\n   ```diff\n   +  \"dev\": \"expo start --ios\",\n   ```\n\n2. Run `pnpm dev` at the project root folder.\n\n#### Use Android Emulator\n\n1. Install Android Studio tools [as shown on expo docs](https:\u002F\u002Fdocs.expo.dev\u002Fworkflow\u002Fandroid-studio-emulator).\n\n2. Change the `dev` script at `apps\u002Fexpo\u002Fpackage.json` to open the Android emulator.\n\n   ```diff\n   +  \"dev\": \"expo start --android\",\n   ```\n\n3. Run `pnpm dev` at the project root folder.\n\n### 4. Configuring Better-Auth to work with Expo\n\nIn order to get Better-Auth to work with Expo, you must either:\n\n#### Deploy the Auth Proxy (RECOMMENDED)\n\nBetter-auth comes with an [auth proxy plugin](https:\u002F\u002Fwww.better-auth.com\u002Fdocs\u002Fplugins\u002Foauth-proxy). By deploying the Next.js app, you can get OAuth working in preview deployments and development for Expo apps.\n\nBy using the proxy plugin, the Next.js apps will forward any auth requests to the proxy server, which will handle the OAuth flow and then redirect back to the Next.js app. This makes it easy to get OAuth working since you'll have a stable URL that is publicly accessible and doesn't change for every deployment and doesn't rely on what port the app is running on. So if port 3000 is taken and your Next.js app starts at port 3001 instead, your auth should still work without having to reconfigure the OAuth provider.\n\n#### Add your local IP to your OAuth provider\n\nYou can alternatively add your local IP (e.g. `192.168.x.y:$PORT`) to your OAuth provider. This may not be as reliable as your local IP may change when you change networks. Some OAuth providers may also only support a single callback URL for each app making this approach unviable for some providers (e.g. GitHub).\n\n### 5a. When it's time to add a new UI component\n\nRun the `ui-add` script to add a new UI component using the interactive `shadcn\u002Fui` CLI:\n\n```bash\npnpm ui-add\n```\n\nWhen the component(s) has been installed, you should be good to go and start using it in your app.\n\n### 5b. When it's time to add a new package\n\nTo add a new package, simply run `pnpm turbo gen init` in the monorepo root. This will prompt you for a package name as well as if you want to install any dependencies to the new package (of course you can also do this yourself later).\n\nThe generator sets up the `package.json`, `tsconfig.json` and a `index.ts`, as well as configures all the necessary configurations for tooling around your package such as formatting, linting and typechecking. When the package is created, you're ready to go build out the package.\n\n## FAQ\n\n### Does the starter include Solito?\n\nNo. Solito will not be included in this repo. It is a great tool if you want to share code between your Next.js and Expo app. However, the main purpose of this repo is not the integration between Next.js and Expo — it's the code splitting of your T3 App into a monorepo. The Expo app is just a bonus example of how you can utilize the monorepo with multiple apps but can just as well be any app such as Vite, Electron, etc.\n\nIntegrating Solito into this repo isn't hard, and there are a few [official templates](https:\u002F\u002Fgithub.com\u002Fnandorojo\u002Fsolito\u002Ftree\u002Fmaster\u002Fexample-monorepos) by the creators of Solito that you can use as a reference.\n\n### Does this pattern leak backend code to my client applications?\n\nNo, it does not. The `api` package should only be a production dependency in the Next.js application where it's served. The Expo app, and all other apps you may add in the future, should only add the `api` package as a dev dependency. This lets you have full typesafety in your client applications, while keeping your backend code safe.\n\nIf you need to share runtime code between the client and server, such as input validation schemas, you can create a separate `shared` package for this and import it on both sides.\n\n## Deployment\n\n### Next.js\n\n#### Prerequisites\n\n> **Note**\n> Please note that the Next.js application with tRPC must be deployed in order for the Expo app to communicate with the server in a production environment.\n\n#### Deploy to Vercel\n\nLet's deploy the Next.js application to [Vercel](https:\u002F\u002Fvercel.com). If you've never deployed a Turborepo app there, don't worry, the steps are quite straightforward. You can also read the [official Turborepo guide](https:\u002F\u002Fvercel.com\u002Fdocs\u002Fconcepts\u002Fmonorepos\u002Fturborepo) on deploying to Vercel.\n\n1. Create a new project on Vercel, select the `apps\u002Fnextjs` folder as the root directory. Vercel's zero-config system should handle all configurations for you.\n\n2. Add your `POSTGRES_URL` environment variable.\n\n3. Done! Your app should successfully deploy. Assign your domain and use that instead of `localhost` for the `url` in the Expo app so that your Expo app can communicate with your backend when you are not in development.\n\n### Auth Proxy\n\nThe auth proxy comes as a better-auth plugin. This is required for the Next.js app to be able to authenticate users in preview deployments. The auth proxy is not used for OAuth request in production deployments. The easiest way to get it running is to deploy the Next.js app to vercel.\n\n### Expo\n\nDeploying your Expo application works slightly differently compared to Next.js on the web. Instead of \"deploying\" your app online, you need to submit production builds of your app to app stores, like [Apple App Store](https:\u002F\u002Fwww.apple.com\u002Fapp-store) and [Google Play](https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps). You can read the full [guide to distributing your app](https:\u002F\u002Fdocs.expo.dev\u002Fdistribution\u002Fintroduction), including best practices, in the Expo docs.\n\n1. Make sure to modify the `getBaseUrl` function to point to your backend's production URL:\n\n   \u003Chttps:\u002F\u002Fgithub.com\u002Ft3-oss\u002Fcreate-t3-turbo\u002Fblob\u002F656965aff7db271e5e080242c4a3ce4dad5d25f8\u002Fapps\u002Fexpo\u002Fsrc\u002Futils\u002Fapi.tsx#L20-L37>\n\n2. Let's start by setting up [EAS Build](https:\u002F\u002Fdocs.expo.dev\u002Fbuild\u002Fintroduction), which is short for Expo Application Services. The build service helps you create builds of your app, without requiring a full native development setup. The commands below are a summary of [Creating your first build](https:\u002F\u002Fdocs.expo.dev\u002Fbuild\u002Fsetup).\n\n   ```bash\n   # Install the EAS CLI\n   pnpm add -g eas-cli\n\n   # Log in with your Expo account\n   eas login\n\n   # Configure your Expo app\n   cd apps\u002Fexpo\n   eas build:configure\n   ```\n\n3. After the initial setup, you can create your first build. You can build for Android and iOS platforms and use different [`eas.json` build profiles](https:\u002F\u002Fdocs.expo.dev\u002Fbuild-reference\u002Feas-json) to create production builds or development, or test builds. Let's make a production build for iOS.\n\n   ```bash\n   eas build --platform ios --profile production\n   ```\n\n   > If you don't specify the `--profile` flag, EAS uses the `production` profile by default.\n\n4. Now that you have your first production build, you can submit this to the stores. [EAS Submit](https:\u002F\u002Fdocs.expo.dev\u002Fsubmit\u002Fintroduction) can help you send the build to the stores.\n\n   ```bash\n   eas submit --platform ios --latest\n   ```\n\n   > You can also combine build and submit in a single command, using `eas build ... --auto-submit`.\n\n5. Before you can get your app in the hands of your users, you'll have to provide additional information to the app stores. This includes screenshots, app information, privacy policies, etc. _While still in preview_, [EAS Metadata](https:\u002F\u002Fdocs.expo.dev\u002Feas\u002Fmetadata) can help you with most of this information.\n\n6. Once everything is approved, your users can finally enjoy your app. Let's say you spotted a small typo; you'll have to create a new build, submit it to the stores, and wait for approval before you can resolve this issue. In these cases, you can use EAS Update to quickly send a small bugfix to your users without going through this long process. Let's start by setting up EAS Update.\n\n   The steps below summarize the [Getting started with EAS Update](https:\u002F\u002Fdocs.expo.dev\u002Feas-update\u002Fgetting-started\u002F#configure-your-project) guide.\n\n   ```bash\n   # Add the `expo-updates` library to your Expo app\n   cd apps\u002Fexpo\n   pnpm expo install expo-updates\n\n   # Configure EAS Update\n   eas update:configure\n   ```\n\n7. Before we can send out updates to your app, you have to create a new build and submit it to the app stores. For every change that includes native APIs, you have to rebuild the app and submit the update to the app stores. See steps 2 and 3.\n\n8. Now that everything is ready for updates, let's create a new update for `production` builds. With the `--auto` flag, EAS Update uses your current git branch name and commit message for this update. See [How EAS Update works](https:\u002F\u002Fdocs.expo.dev\u002Feas-update\u002Fhow-eas-update-works\u002F#publishing-an-update) for more information.\n\n   ```bash\n   cd apps\u002Fexpo\n   eas update --auto\n   ```\n\n   > Your OTA (Over The Air) updates must always follow the app store's rules. You can't change your app's primary functionality without getting app store approval. But this is a fast way to update your app for minor changes and bug fixes.\n\n9. Done! Now that you have created your production build, submitted it to the stores, and installed EAS Update, you are ready for anything!\n\n## References\n\nThe stack originates from [create-t3-app](https:\u002F\u002Fgithub.com\u002Ft3-oss\u002Fcreate-t3-app).\n\nA [blog post](https:\u002F\u002Fjumr.dev\u002Fblog\u002Ft3-turbo) where I wrote how to migrate a T3 app into this.\n","create-t3-turbo 是一个使用 T3 技术栈和 Expo React Native 构建的简洁启动项目模板。该项目基于 TypeScript，集成了 Turborepo 以支持单体仓库开发，并提供了多种前端框架选项（如 Next.js 和 Tanstack Start），以及后端服务（通过 tRPC 实现全栈类型安全 API）。此外，还包含了现代化的 UI 组件库、代码格式化工具配置（ESLint 和 Prettier）及 Tailwind CSS 支持，确保了良好的开发体验与高效的团队协作。此项目非常适合需要快速搭建高质量跨平台应用（包括 Web 和移动设备）的场景，特别是对于那些希望采用现代 JavaScript 生态系统最佳实践的开发者来说尤为适用。","2026-06-11 03:37:25","high_star"]