An experiment mobile application that lets users schedule AI-powered voice calls ๐๐ค - React Native + LiveKit + OpenAI Realtime API
https://github.com/gianpaj/call-me-please.git
A mobile application that allows users to schedule AI voice phone calls using React Native and Expo.
Call Me Please is a mobile application that lets users schedule AI-powered voice calls. Users can select from various AI voices, set up recurring calls, and manage their call schedules through an intuitive interface.
Once I spend $100 on OpenAI, then add Stripe integration for top-up credits.
This is a Turborepo project with the following structure:
/apps/expo - React Native mobile app/apps/nextjs - Next.js Landing Page and API server (tRPC)/apps/auth-proxy - OAuth proxy/apps/webrtc-server - Python LiveKit server/packages/api - Shared API layer/packages/auth - Authentication utilities/packages/ui - Shared UI components/packages/db - Database utilitiespnpm install
.env.example files)pnpm dev
cd apps/webrtc-server
uv .venv
uv sync
cd apps/webrtc-server
python3 main.py dev
cd apps/webrtc-server
python my_agent.py download-files
The model requires 1.5GB of RAM and runs within a shared inference server, supporting multiple concurrent sessions.
[!NOTE]
> NextAuth setup now works for Expo app!
[!NOTE]
> OAuth deployments are now working for preview deployments. Read deployment guide and check out the source to learn more!
[!NOTE]
> Make sure to follow the system requirements specified inpackage.json#enginesbefore proceeding.
There are two ways of initializing an app using the create-t3-turbo starter. You can either use this repository as a template:
or use Turbo's CLI to init your project (use PNPM as package manager):
npx create-turbo@latest -e https://github.com/t3-oss/create-t3-turbo
Ever 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!
It uses Turborepo and contains:
.github
โโ workflows
โโ CI with pnpm cache setup
.vscode
โโ Recommended extensions and settings for VSCode users
apps
โโ auth-proxy
| โโ Nitro server to proxy OAuth requests in preview deployments
| โโ Uses Auth.js Core
โโ expo
| โโ Expo SDK 51
| โโ React Native using React 18
| โโ Navigation using Expo Router
| โโ Tailwind using NativeWind
| โโ Typesafe API calls using tRPC
โโ next.js
โโ Next.js 14
โโ React 18
โโ Tailwind CSS
โโ E2E Typesafe API Server & Client
packages
โโ api
| โโ tRPC v11 router definition
โโ auth
| โโ Authentication using next-auth.
โโ db
| โโ Typesafe db calls using Drizzle & Supabase
โโ ui
โโ Start of a UI package for the webapp using shadcn-ui
tooling
โโ eslint
| โโ shared, fine-grained, eslint presets
โโ prettier
| โโ shared prettier configuration
โโ tailwind
| โโ shared tailwind configuration
โโ typescript
โโ shared tsconfig you can extend from
In this template, we use@acmeas 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@acmeto something like@my-companyor@project-name.
Note
The db package is preconfigured to use Supabase and is edge-bound with the Vercel Postgres driver. If you're using something else, make the necessary modifications to the schema as well as the client and the drizzle config. If you want to switch to non-edge database driver, removeexport const runtime = "edge";from all pages and api routes.
To get it running, follow the steps below:
# Install dependencies
pnpm i
# Configure environment variables
# There is an `.env.example` in the root directory you can use for reference
cp .env.example .env
# Push the Drizzle schema to the database
pnpm db:push
dev-scriptnpx expo start from apps/expo, and then enter I to launch Expo Go. After the manual launch, you can run pnpm dev in the root directory.
+ "dev": "expo start --ios",
pnpm dev at the project root folder.dev script at apps/expo/package.json to open the Android emulator.+ "dev": "expo start --android",
pnpm dev at the project root folder.In order to get Next-Auth to work with Expo, you must either:
In apps/auth-proxy you can find a Nitro server that proxies OAuth requests. By deploying this and setting the AUTH_REDIRECT_PROXY_URL environment variable to the URL of this proxy, you can get OAuth working in preview deployments and development for Expo apps. See more deployment instructions in the auth proxy README.
By using the proxy server, 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 publically 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.
You 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).
Run the ui-add script to add a new UI component using the interactive shadcn/ui CLI:
pnpm ui-add
When the component(s) has been installed, you should be good to go and start using it in your app.
To 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).
The 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.
No. 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.
Integrating Solito into this repo isn't hard, and there are a few official templates by the creators of Solito that you can use as a reference.
No, 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.
If 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.
Note
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.
Let's deploy the Next.js application to Vercel. 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 on deploying to Vercel.
apps/nextjs folder as the root directory. Vercel's zero-config system should handle all configurations for you.DATABASE_URL environment variable.localhost for the url in the Expo app so that your Expo app can communicate with your backend when you are not in development.The auth proxy is a Nitro server that proxies OAuth requests in preview deployments. 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 requests in production deployments. To get it running, it's easiest to use Vercel Edge functions. See the Nitro docs for how to deploy Nitro to Vercel.
Then, there are some environment variables you need to set in order to get OAuth working:
AUTH_REDIRECT_PROXY_URL to the URL of the auth proxy.AUTH_REDIRECT_PROXY_URL to the same as above, as well as AUTH_DISCORD_ID, AUTH_DISCORD_SECRET (or the equivalent for your OAuth provider(s)). Lastly, set AUTH_SECRET to the same value as in the Next.js app for preview environments.Deploying 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 and Google Play. You can read the full guide to distributing your app, including best practices, in the Expo docs.
getBaseUrl function to point to your backend's production URL:# Install the EAS CLI
pnpm add -g eas-cli
# Log in with your Expo account
eas login
# Configure your Expo app
cd apps/expo
eas build:configure
eas.json build profiles to create production builds or development, or test builds. Let's make a production build for iOS.eas build --platform ios --profile production
> If you don't specify the --profile flag, EAS uses the production profile by default.
eas submit --platform ios --latest
> You can also combine build and submit in a single command, using eas build ... --auto-submit.
# Add the `expo-updates` library to your Expo app
cd apps/expo
pnpm expo install expo-updates
# Configure EAS Update
eas update:configure
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 for more information.cd apps/expo
eas update --auto
> 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.
The stack originates from create-t3-app.
A blog post where I wrote how to migrate a T3 app into this.