This is a React Native Threads clone using Clerk for user authentication and Convex for all backend logic.
For improved debuggability, we've added Sentry to the project.
Additional features:
- Expo Router file-based navigation
- Convex Database for data storage
- Convex File Storage for file storage
- Convex Actions for push notifications
- Sentry for error tracking
- Haptics for haptic feedback
- Reanimated for powerful animations
- Image Zoom for image zoom component
Make sure you have the Expo CLI installed.
Because we are using pre-built and a custom development client, you should download Android Studio and Xcode to your Mac. For more information on setting up your development environment, refer to the Expo documentation for Android Studio and the React Native documentation for Xcode.
To build the app, perform the following steps:
- Clone the repository
- Run
npm install
- Run
npx expo prebuild
- Run
npx expo run:ios
ornpx expo run:android
Add the access key to the Convex environment variables:
npx convex env set EXPO_ACCESS_TOKEN your-api-key
Create a Clerk account and project, then update the convex/auth.config.js
file with your domain
and applicationID
.
export default {
providers: [
{
domain: "https://your-clerk-domain.clerk.accounts.dev",
applicationID: "your-clerk-application-id",
},
],
};
You also need to connect Convex and Clerk with a JWT template. For this, cehck out the video and Convex docs.
You need to set up a webhook in Clerk to handle the user creation and update events.
- Go to Clerk and select your project
- Go to API and select Webhooks
- Add the following webhook, which should point to your Convex instance and include the
user.created
anduser.deleted
events:
- Create a Sentry account and project
- Go to Project Settings and select Client Keys
- Copy the DSN and add it to the
.env
file