-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Add React Native mobile app with comprehensive setup #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jeevanpillay
wants to merge
15
commits into
main
Choose a base branch
from
feat/mobile-app
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a28b634
feat: add React Native mobile app with Expo setup
jeevanpillay 7e5be6f
feat: integrate mobile app into monorepo workspace configuration
jeevanpillay 3eb9b2c
Merge branch 'main' into feat/mobile-app
jeevanpillay 62cf672
chore(repo): run Sherif on postinstall but ignore apps/mobile
jeevanpillay 97d0ea0
feat(mobile): align expo auth flow with chat design
jeevanpillay d14e740
feat(mobile): upgrade color scheme to match chat app design
jeevanpillay c4211d2
chore(mobile): clean up native folders and update gitignore
jeevanpillay 60e22e8
feat(mobile): remove header and border from all screens
jeevanpillay 4e3513e
feat(mobile): refine sign-in screen\n\n- Replace header text with lon…
jeevanpillay dcc1e89
mobile: update chats list UI and chat detail
jeevanpillay f16090e
feat(mobile): refactor chat routes and add icon dependencies
jeevanpillay e2d8171
feat(mobile): align chat ui with web prompt
jeevanpillay 47359ef
Merge latest main into feat/mobile-app
jeevanpillay 916e56e
feat(mobile): reorganize polyfills structure
jeevanpillay be552fe
feat(mobile): fix streaming and chat UI improvements
jeevanpillay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, | ||
| "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
|
|
||
| # @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb | ||
| # The following patterns were generated by expo-cli | ||
|
|
||
| expo-env.d.ts | ||
| # @end expo-cli |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| nativewind-env.d.ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import type { ConfigContext, ExpoConfig } from "expo/config"; | ||
|
|
||
| export default ({ config }: ConfigContext): ExpoConfig => ({ | ||
| ...config, | ||
| name: "Lightfast Chat", | ||
| slug: "lightfast-chat", | ||
| scheme: "lightfast-chat", | ||
| version: "0.1.0", | ||
| orientation: "portrait", | ||
| icon: "./assets/icon.png", | ||
| userInterfaceStyle: "dark", | ||
| updates: { | ||
| fallbackToCacheTimeout: 0, | ||
| }, | ||
| newArchEnabled: true, | ||
| assetBundlePatterns: ["**/*"], | ||
| ios: { | ||
| bundleIdentifier: "com.lightfast.chat", | ||
| supportsTablet: true, | ||
| icon: "./assets/icon.png", | ||
| }, | ||
| android: { | ||
| package: "com.lightfast.chat", | ||
| adaptiveIcon: { | ||
| foregroundImage: "./assets/adaptive-icon.png", | ||
| backgroundColor: "#1a1a1a", | ||
| }, | ||
| edgeToEdgeEnabled: true, | ||
| }, | ||
| // extra: { | ||
| // eas: { | ||
| // projectId: "your-eas-project-id", | ||
| // }, | ||
| // }, | ||
| experiments: { | ||
| tsconfigPaths: true, | ||
| typedRoutes: true, | ||
| }, | ||
| plugins: [ | ||
| "expo-router", | ||
| "expo-secure-store", | ||
| "expo-web-browser", | ||
| [ | ||
| "expo-splash-screen", | ||
| { | ||
| backgroundColor: "#1a1a1a", | ||
| image: "./assets/icon.png", | ||
| }, | ||
| ], | ||
| ], | ||
| }); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /** @type {import("@babel/core").ConfigFunction} */ | ||
| module.exports = (api) => { | ||
| api.cache(true); | ||
| return { | ||
| presets: [ | ||
| ["babel-preset-expo", { jsxImportSource: "nativewind" }], | ||
| "nativewind/babel", | ||
| ], | ||
| plugins: [ | ||
| [ | ||
| "module-resolver", | ||
| { | ||
| extensions: [".ts", ".tsx", ".js", ".jsx", ".json"], | ||
| root: ["./src"], | ||
| alias: { | ||
| "@": "./src", | ||
| }, | ||
| }, | ||
| ], | ||
| "react-native-reanimated/plugin", | ||
| ], | ||
| }; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "cli": { | ||
| "version": ">= 4.1.2", | ||
| "appVersionSource": "remote" | ||
| }, | ||
| "build": { | ||
| "base": { | ||
| "node": "22.12.0", | ||
| "pnpm": "9.15.4", | ||
| "ios": { | ||
| "resourceClass": "m-medium" | ||
| } | ||
| }, | ||
| "development": { | ||
| "extends": "base", | ||
| "developmentClient": true, | ||
| "distribution": "internal" | ||
| }, | ||
| "preview": { | ||
| "extends": "base", | ||
| "distribution": "internal", | ||
| "ios": { | ||
| "simulator": true | ||
| } | ||
| }, | ||
| "production": { | ||
| "extends": "base" | ||
| } | ||
| }, | ||
| "submit": { | ||
| "production": {} | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import baseConfig from "@repo/eslint-config/base"; | ||
| import reactConfig from "@repo/eslint-config/react"; | ||
|
|
||
| /** @type {import('typescript-eslint').Config} */ | ||
| export default [ | ||
| { | ||
| ignores: [".expo/**", "expo-plugins/**"], | ||
| }, | ||
| ...baseConfig, | ||
| ...reactConfig, | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| import "expo-router/entry"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // Learn more: https://docs.expo.dev/guides/monorepos/ | ||
| const { getDefaultConfig } = require("expo/metro-config"); | ||
| const { FileStore } = require("metro-cache"); | ||
| const { withNativeWind } = require("nativewind/metro"); | ||
|
|
||
| const path = require("node:path"); | ||
|
|
||
| const config = withTurborepoManagedCache( | ||
| withNativeWind(getDefaultConfig(__dirname), { | ||
| input: "./src/styles.css", | ||
| configPath: "./tailwind.config.ts", | ||
| }), | ||
| ); | ||
| module.exports = config; | ||
|
|
||
| /** | ||
| * Move the Metro cache to the `.cache/metro` folder. | ||
| * If you have any environment variables, you can configure Turborepo to invalidate it when needed. | ||
| * | ||
| * @see https://turborepo.com/docs/reference/configuration#env | ||
| * @param {import('expo/metro-config').MetroConfig} config | ||
| * @returns {import('expo/metro-config').MetroConfig} | ||
| */ | ||
| function withTurborepoManagedCache(config) { | ||
| config.cacheStores = [ | ||
| new FileStore({ root: path.join(__dirname, ".cache/metro") }), | ||
| ]; | ||
| return config; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /// <reference types="nativewind/types" /> | ||
|
|
||
| // NOTE: This file should not be edited and should be committed with your source code. It is generated by NativeWind. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| { | ||
| "name": "@lightfast/mobile", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "main": "index.ts", | ||
| "scripts": { | ||
| "clean": "git clean -xdf .cache .expo .turbo android ios node_modules", | ||
| "dev": "expo start", | ||
| "dev:android": "expo start --android", | ||
| "dev:ios": "expo start --ios", | ||
| "android": "expo run:android", | ||
| "ios": "expo run:ios", | ||
| "format": "prettier --check . --ignore-path ../../.gitignore --ignore-path .prettierignore", | ||
| "lint": "eslint", | ||
| "typecheck": "tsc --noEmit" | ||
| }, | ||
| "dependencies": { | ||
| "@ai-sdk/openai": "^0.0.70", | ||
| "@ai-sdk/react": "catalog:", | ||
| "@clerk/clerk-expo": "^2.15.0", | ||
| "@expo/metro-config": "^0.20.14", | ||
| "@legendapp/list": "^2.0.2", | ||
| "@repo/chat-ai-types": "workspace:*", | ||
| "@stardazed/streams-text-encoding": "^1.0.2", | ||
| "@tanstack/react-query": "catalog:", | ||
| "@trpc/client": "catalog:", | ||
| "@trpc/server": "catalog:", | ||
| "@trpc/tanstack-react-query": "catalog:", | ||
| "@ungap/structured-clone": "^1.3.0", | ||
| "expo": "53.0.9", | ||
| "expo-auth-session": "~6.2.1", | ||
| "expo-constants": "17.1.6", | ||
| "expo-dev-client": "5.1.8", | ||
| "expo-linking": "7.1.5", | ||
| "expo-router": "5.0.7", | ||
| "expo-secure-store": "14.2.3", | ||
| "expo-splash-screen": "0.30.8", | ||
| "expo-status-bar": "2.2.3", | ||
| "expo-system-ui": "~5.0.7", | ||
| "expo-web-browser": "14.1.6", | ||
| "lucide-react-native": "^0.544.0", | ||
| "nativewind": "~4.1.23", | ||
| "react": "catalog:react19", | ||
| "react-dom": "catalog:react19", | ||
| "react-native": "0.79.2", | ||
| "react-native-gesture-handler": "~2.25.0", | ||
| "react-native-reanimated": "~3.18.0", | ||
| "react-native-safe-area-context": "~5.4.1", | ||
| "react-native-screens": "~4.11.1", | ||
| "react-native-svg": "^15.13.0", | ||
| "superjson": "2.2.2", | ||
| "zod": "catalog:" | ||
| }, | ||
| "devDependencies": { | ||
| "@api/chat": "workspace:*", | ||
| "@babel/core": "^7.27.4", | ||
| "@babel/preset-env": "^7.27.2", | ||
| "@babel/runtime": "^7.27.4", | ||
| "@repo/eslint-config": "workspace:*", | ||
| "@repo/prettier-config": "workspace:*", | ||
| "@repo/typescript-config": "workspace:*", | ||
| "babel-plugin-module-resolver": "^5.0.0", | ||
| "@types/babel__core": "^7.20.5", | ||
| "@types/react": "catalog:react19", | ||
| "eslint": "catalog:", | ||
| "prettier": "catalog:", | ||
| "tailwindcss": "^3.4.17", | ||
| "typescript": "catalog:" | ||
| }, | ||
| "prettier": "@repo/prettier-config" | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { Redirect, Stack } from "expo-router"; | ||
| import { View } from "react-native"; | ||
|
|
||
| import { useAuth } from "@clerk/clerk-expo"; | ||
|
|
||
| export default function AuthLayout() { | ||
| const { isLoaded, isSignedIn } = useAuth(); | ||
|
|
||
| if (!isLoaded) { | ||
| return <View className="flex-1 bg-background" />; | ||
| } | ||
|
|
||
| if (isSignedIn) { | ||
| return <Redirect href="/" />; | ||
| } | ||
|
|
||
| return <Stack screenOptions={{ headerShown: false }} />; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
verifyTokenfunction is imported from@vendor/clerk/serverbut this function doesn't exist in the Clerk vendor package, which will cause a runtime import error.View Details
📝 Patch Details
Analysis
Missing verifyToken import causes runtime error in TRPC authentication
What fails: Import of
verifyTokenfrom@vendor/clerk/serverfails because the function is not available in@clerk/nextjs/server- it exists in@clerk/backendHow to reproduce:
Result:
verifyToken is undefined- the function doesn't exist in the re-exported@clerk/nextjs/serverpackageExpected: verifyToken should be available for Bearer token verification per Clerk Backend SDK documentation which shows
verifyTokenis exported from@clerk/backendFix: Added
@clerk/backenddependency to vendor/clerk package and exported it fromserver.tsto makeverifyTokenavailable alongside Next.js server functions