Feature/ai phone onboarding #27
Open
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.
Flow of this feature!
What onboarding feature looks like, When users first log in, a modal asks for their phone number with country selection. After entering, they receive an AI call that greets them by name like: "Hi Ashish Jha! Thanks for joining Rize. Are you comfortable with English, or would you prefer Hindi?"
The AI asks a few casual questions about their work, projects, and goals. After the call ends, all responses are sent to OpenAI which formats the data and updates the user's profile - but ONLY empty fields, existing data stays untouched.
If users click "I'll do this later", the modal closes and won't show again until they logout and login (new session).
Just add these two keys to .env
VAPI_API_KEY (Private Key from vapi)
VAPI_PHONE_NUMBER_ID (From Vapi dashboard)
Also add Server URL to vapi so that only this domain send request.
I tested locally with ngrok - everything works. Couldn't test actual calls because Vapi free tier only supports US numbers (10 free calls), but the integration is complete.