{"id":51100989,"url":"https://github.com/biomathcode/react-native-chat-ai","last_synced_at":"2026-06-24T10:32:11.733Z","repository":{"id":359785110,"uuid":"1245955059","full_name":"biomathcode/react-native-chat-ai","owner":"biomathcode","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-23T12:28:55.000Z","size":14155,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-02T15:07:20.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://react-native-chat-ai.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/biomathcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-21T18:17:37.000Z","updated_at":"2026-05-23T12:28:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/biomathcode/react-native-chat-ai","commit_stats":null,"previous_names":["biomathcode/react-native-chat-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/biomathcode/react-native-chat-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biomathcode%2Freact-native-chat-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biomathcode%2Freact-native-chat-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biomathcode%2Freact-native-chat-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biomathcode%2Freact-native-chat-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biomathcode","download_url":"https://codeload.github.com/biomathcode/react-native-chat-ai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biomathcode%2Freact-native-chat-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34726701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-24T10:32:08.883Z","updated_at":"2026-06-24T10:32:11.726Z","avatar_url":"https://github.com/biomathcode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sage\n\nVoice-first Expo and React Native companion for chat, medicine recall, and daily dose reminders.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/images/icon.png\" alt=\"Sage app icon\" width=\"104\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://expo.dev/accounts/pratiksharm/projects/Sage-ai/builds/c487bd5a-3823-4886-b2cc-67c1c69f62ec\"\u003e\n    \u003cimg alt=\"Expo development build\" src=\"https://img.shields.io/badge/Expo%20Dev%20Build-Install-000020?logo=expo\u0026logoColor=white\" /\u003e\n  \u003c/a\u003e\n  \u003cimg alt=\"Expo SDK\" src=\"https://img.shields.io/badge/Expo%20SDK-55-000020?logo=expo\u0026logoColor=white\" /\u003e\n  \u003cimg alt=\"React Native\" src=\"https://img.shields.io/badge/React%20Native-0.83.6-61DAFB?logo=react\u0026logoColor=111111\" /\u003e\n  \u003cimg alt=\"React\" src=\"https://img.shields.io/badge/React-19.2.0-61DAFB?logo=react\u0026logoColor=111111\" /\u003e\n  \u003cimg alt=\"pnpm\" src=\"https://img.shields.io/badge/pnpm-10.12.1-F69220?logo=pnpm\u0026logoColor=white\" /\u003e\n  \u003ca href=\"https://react-native-chat-ai.vercel.app\"\u003e\n    \u003cimg alt=\"API deployment\" src=\"https://img.shields.io/badge/API-Vercel-000000?logo=vercel\u0026logoColor=white\" /\u003e\n  \u003c/a\u003e\n  \u003cimg alt=\"Status\" src=\"https://img.shields.io/badge/status-active-426256\" /\u003e\n\u003c/p\u003e\n\n### Watch\n\n\u003cp align=\"center\"\u003e\n\n[![Watch the demo](./assets/showcase/WhatsApp%20Image%202026-05-23%20at%2016.12.19%20(2).jpeg)](https://youtube.com/shorts/bb16Wsc3JaM)\n \n\u003c/p\u003e\n\n\n\n### Problem Statement\nIn India as well as the world, Chronic diseases are on the rise. Medication at the right time is crucial for managing these conditions effectively. More often It a care taker responsibility to remind the patients to take their medicines on time. This can be a challenging task, especially when there are multiple medications with different schedules. Additionally, patients may have questions about their medications, such as potential side effects or interactions with other drugs. A voice assistant can provide timely reminders and answer medication-related queries, improving adherence and patient outcomes.\n\n\n## Showcase\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/showcase/WhatsApp%20Image%202026-05-23%20at%2016.12.19%20(2).jpeg\" alt=\"Sage medicine schedule screen\" width=\"260\" /\u003e\n  \u003cimg src=\"./assets/showcase/WhatsApp%20Image%202026-05-23%20at%2016.12.19%20(1).jpeg\" alt=\"Sage previous conversations screen\" width=\"260\" /\u003e\n  \u003cimg src=\"./assets/showcase/WhatsApp%20Image%202026-05-23%20at%2016.12.19.jpeg\" alt=\"Sage chat screen with medicine cards\" width=\"260\" /\u003e\n\n\u003c/p\u003e\n\n\n\n## Overview\n\nSage combines a conversational voice interface with medicine-aware responses and daily dose scheduling. The mobile app is built with Expo Router, React Native, Expo Audio, React Native Gesture Handler, Reanimated, Skia, and Sarvam AI services.\n\nThe app uses a hosted Expo Router server API for chat, speech-to-text, and text-to-speech, so the Sarvam API key stays on the server and is not shipped in the mobile client.\n\nThis project uses pnpm for dependency installation and script execution. Use `pnpm install`, not `npm install`.\n\n\n## User Interface\nMy initial thought was to make the interface voice only. As People use less cognitive effort and give out information. This make will help us Collect great about out audio data which can be much more informative in the future as well. The Text Input for the chat bot was added for accessibility and convenience of the people. I am using shader for the animated orb using react-native-skia, which does increases the size of our application but it gives us a great experience. I have also added the medicine cards which gives the user a quick glance at the medicines that they are taking.\n\n\nIn the Onboarding experience, We let the use select the voice that they like. This is very important for the whole experience. Selecting the voice give the user a sense of ownership of the assistant they are talking to.\n\nIn My research, I found that ChatGPT still can't send timely reminders to the users. So there is a space where the assistance not becomes a companion but also a tool that the user can use. The Voice Assistant can list of information about the medicine that the patient is taking, and also help to set the reminders for the medicines.\n\n\n\n### Short Coming of the Solution\n\nI have not still implemented the user notification/ reminders. I have mostly focus on the UI and the experience of the user interface. We have latency issue as well. Sarvam Agents do have great voices, transcription and response generation but the latency is bit high. I am looking forward to optimize the latency in the future using Live-kit. Even profile more tools, like medicine search api and medicine information api.\n\n\n## Deployment\n\n| Target                    | URL                                                                                                | Notes                                               |\n| ------------------------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------- |\n| Android development build | https://expo.dev/accounts/pratiksharm/projects/Sage-ai/builds/c487bd5a-3823-4886-b2cc-67c1c69f62ec | Internal Expo development client build for Android. |\n| API and web deployment    | https://react-native-chat-ai.vercel.app                                                            | Vercel deployment for Expo Router server endpoints. |\n\nThe Android development profile in `eas.json` sets:\n\n```json\n{\n  \"EXPO_PUBLIC_API_BASE_URL\": \"https://react-native-chat-ai.vercel.app\"\n}\n```\n\nNative clients use `EXPO_PUBLIC_API_BASE_URL` first, then fall back to `expo.extra.apiBaseUrl` from `app.json`.\n\n## API Routes\n\nBase URL:\n\n```txt\nhttps://react-native-chat-ai.vercel.app\n```\n\n| Route         | Method | Purpose                                                                                               |\n| ------------- | ------ | ----------------------------------------------------------------------------------------------------- |\n| `/api/health` | `GET`  | Health check. Returns `{ \"status\": \"ok\" }`.                                                           |\n| `/api/chat`   | `POST` | Generates a Sarvam-backed assistant response for a conversation, prompt, or AI SDK UI message stream. |\n| `/api/stt`    | `POST` | Transcribes an uploaded audio file using Sarvam speech-to-text.                                       |\n| `/api/tts`    | `POST` | Generates WAV speech audio from text using Sarvam Bulbul voices.                                      |\n\n### `GET /api/health`\n\n```bash\ncurl https://react-native-chat-ai.vercel.app/api/health\n```\n\nResponse:\n\n```json\n{\n  \"status\": \"ok\"\n}\n```\n\n### `POST /api/chat`\n\nJSON request options:\n\n```json\n{\n  \"conversation\": [\n    { \"role\": \"user\", \"content\": \"Can you tell me about the medicines I am taking?\" }\n  ],\n  \"voiceName\": \"Rahul\"\n}\n```\n\nAlternative supported fields are `prompt` for a simple one-shot request and `messages` for AI SDK UI message streaming.\n\nResponse:\n\n```json\n{\n  \"text\": \"Here are the medicines you are taking.\"\n}\n```\n\n### `POST /api/stt`\n\nMultipart form request:\n\n| Field          | Type   | Required | Description                                |\n| -------------- | ------ | -------- | ------------------------------------------ |\n| `audio`        | file   | Yes      | Audio file to transcribe.                  |\n| `languageCode` | string | No       | Sarvam language code. Defaults to `en-IN`. |\n\nResponse:\n\n```json\n{\n  \"text\": \"Hello, I am here.\",\n  \"language\": \"en-IN\",\n  \"requestId\": \"...\"\n}\n```\n\n### `POST /api/tts`\n\nJSON request:\n\n```json\n{\n  \"text\": \"Hello, I am here.\",\n  \"voiceId\": \"shubh\"\n}\n```\n\nResponse:\n\n```json\n{\n  \"base64\": \"...\",\n  \"contentType\": \"audio/wav\"\n}\n```\n\n## Environment Variables\n\nThe server routes require a Sarvam API key.\n\n### Local Development\n\nCreate a local `.env` file:\n\n```bash\nSARVAM_API_KEY=your_sarvam_api_key_here\n```\n\nThen restart the Expo development server.\n\n### Vercel\n\nAdd the same variable in the Vercel project settings:\n\n```txt\nSARVAM_API_KEY=your_sarvam_api_key_here\n```\n\nRecommended scopes:\n\n| Environment | Required                                       |\n| ----------- | ---------------------------------------------- |\n| Production  | Yes                                            |\n| Preview     | Yes, if preview deployments should call Sarvam |\n| Development | Yes, if using Vercel local development         |\n\nDo not add `SARVAM_API_KEY` as an `EXPO_PUBLIC_*` variable. Public Expo variables are bundled into the client.\n\n## Installation\n\nThis project uses pnpm for dependency management.\n\n```bash\npnpm install\n```\n\nSkia postinstall scripts are trusted through `package.json`:\n\n```json\n{\n  \"pnpm\": {\n    \"onlyBuiltDependencies\": [\"@shopify/react-native-skia\"]\n  }\n}\n```\n\n## Development\n\nStart the Expo development server:\n\n```bash\npnpm start\n```\n\nRun Android locally:\n\n```bash\npnpm android\n```\n\nRun iOS locally:\n\n```bash\npnpm ios\n```\n\nRun web locally:\n\n```bash\npnpm web\n```\n\nGenerate Sarvam voice preview assets:\n\n```bash\npnpm voices:generate\n```\n\n## Builds\n\nCreate an Android development build with EAS:\n\n```bash\npnpm exec eas build --platform android --profile development\n```\n\nThe current shared Android development build is available here:\n\n```txt\nhttps://expo.dev/accounts/pratiksharm/projects/Sage-ai/builds/c487bd5a-3823-4886-b2cc-67c1c69f62ec\n```\n\n## Styling\n\nSage uses a soft healthcare-inspired visual system:\n\n- Calm green primary actions and selected states.\n- Pale mint surfaces for assistant context, medicine cards, and gentle emphasis.\n- High-contrast ink text for readability.\n- Rounded controls and spacious touch targets for mobile use.\n- Voice gradients for assistant identity and listening states.\n- Platform-native typography on iOS and Android, with CSS font variables on web.\n\nCore styling tokens live in `src/constants/theme.ts`. Feature-specific styles are grouped beside their screens, including `src/features/chat/styles.ts` and `src/features/medicine-schedules/styles.ts`.\n\n## Brand Guidelines\n\n### Icon\n\n\u003cp\u003e\n  \u003cimg src=\"./assets/images/icon.png\" alt=\"Sage app icon\" width=\"120\" /\u003e\n  \u003cimg src=\"./assets/images/splash-icon.png\" alt=\"Sage splash icon\" width=\"120\" /\u003e\n\u003c/p\u003e\n\n| Asset                       | Path                                        |\n| --------------------------- | ------------------------------------------- |\n| App icon                    | `assets/images/icon.png`                    |\n| Splash icon                 | `assets/images/splash-icon.png`             |\n| Favicon                     | `assets/images/favicon.png`                 |\n| Android adaptive foreground | `assets/images/android-icon-foreground.png` |\n| Android adaptive background | `assets/images/android-icon-background.png` |\n| Android adaptive monochrome | `assets/images/android-icon-monochrome.png` |\n\n### Typography\n\n| Role           | Size | Line height | Usage                             |\n| -------------- | ---: | ----------: | --------------------------------- |\n| Caption        |   12 |          16 | Metadata and compact labels.      |\n| Body           |   14 |          20 | Default readable copy.            |\n| Body relaxed   |   15 |          22 | Longer assistant and user text.   |\n| Button         |   16 |          20 | Primary controls.                 |\n| Item title     |   17 |          23 | Medicine and conversation titles. |\n| Section title  |   20 |          26 | Screen sections.                  |\n| Calendar title |   22 |          28 | Calendar header.                  |\n| Screen title   |   28 |          34 | Main screen headings.             |\n\nFont families:\n\n| Platform | Family                                                                        |\n| -------- | ----------------------------------------------------------------------------- |\n| iOS      | System UI, rounded, serif, and monospaced system families.                    |\n| Android  | Native default sans, serif, and monospace families.                           |\n| Web      | `Spline Sans`, `Inter`, system sans, `SF Pro Rounded`, and Georgia fallbacks. |\n\n### Color Palette\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eToken\u003c/th\u003e\n    \u003cth\u003eHex\u003c/th\u003e\n    \u003cth\u003eSwatch\u003c/th\u003e\n    \u003cth\u003eUsage\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eprimary\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e#426256\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg alt=\"#426256 swatch\" src=\"https://placehold.co/72x20/426256/426256.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003ePrimary buttons, controls, and selected states.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eprimaryText\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e#2f6b55\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg alt=\"#2f6b55 swatch\" src=\"https://placehold.co/72x20/2f6b55/2f6b55.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eBrand text and strong green accents.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eprimarySoft\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e#eef6f4\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg alt=\"#eef6f4 swatch\" src=\"https://placehold.co/72x20/eef6f4/eef6f4.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eSoft cards and low-emphasis backgrounds.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eprimaryTint\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e#cfe5dc\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg alt=\"#cfe5dc swatch\" src=\"https://placehold.co/72x20/cfe5dc/cfe5dc.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eBorders, tints, and supporting accents.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eink\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e#17231f\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg alt=\"#17231f swatch\" src=\"https://placehold.co/72x20/17231f/17231f.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003ePrimary text.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003etextSubtle\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e#5f746e\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg alt=\"#5f746e swatch\" src=\"https://placehold.co/72x20/5f746e/5f746e.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eSecondary text and helper labels.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003escreen\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e#f8faf9\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg alt=\"#f8faf9 swatch\" src=\"https://placehold.co/72x20/f8faf9/f8faf9.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eApp screen background.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003esurface\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e#ffffff\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg alt=\"#ffffff swatch\" src=\"https://placehold.co/72x20/ffffff/ffffff.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eCards, panels, and neutral surfaces.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eborder\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e#e2ebe7\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg alt=\"#e2ebe7 swatch\" src=\"https://placehold.co/72x20/e2ebe7/e2ebe7.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eSubtle outlines and dividers.\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### Gradients\n\n| Token               | Colors                                     | Usage                         |\n| ------------------- | ------------------------------------------ | ----------------------------- |\n| `primaryBlue`       | `#426256`, `#5f8a78`, `#cfe5dc`            | Brand gradient accents.       |\n| `primaryBlueStrong` | `#2f6b55`, `#426256`                       | Strong primary controls.      |\n| `meshListeningBase` | `#ead1ee`, `#f8c3d8`, `#c8d8ff`, `#dacbf2` | Listening and voice ambience. |\n| `profileAvatar`     | `#f2fbf4`, `#d6f4df`, `#b8e8c8`            | Profile and avatar treatment. |\n\n## Project Structure\n\n```txt\napi/                    Vercel adapter entrypoint\nassets/                 Icons, showcase media, and voice assets\nsrc/app/                Expo Router screens and server routes\nsrc/components/         Shared UI components\nsrc/constants/          Theme and voice constants\nsrc/features/chat/      Chat, voice, medicine recall, and history\nsrc/features/medicine-schedules/\n                        Medicine schedule screens, data, and styles\nsrc/features/onboarding/\n                        Voice onboarding experience\n```\n\n## License\n\nPrivate project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiomathcode%2Freact-native-chat-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiomathcode%2Freact-native-chat-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiomathcode%2Freact-native-chat-ai/lists"}