Skip to content

Repository files navigation

Todo Voice

A React Native voice-powered todo application built with Expo. Voice recordings are transcribed through an Appwrite Function so the OpenAI API key is never bundled into the mobile app.

Features

  • Voice-to-text task creation
  • Smart multi-task creation from one spoken phrase
  • Task completion, editing, deletion, and detail views
  • Local task persistence with AsyncStorage
  • Reminder notifications with custom alarm sound support
  • Expo Router navigation

Prerequisites

  • Node.js
  • npm
  • Android Studio / emulator or a physical Android device
  • Expo development environment
  • Appwrite project with one Node.js Function
  • OpenAI API key stored only in the Appwrite Function environment

Appwrite Setup

  1. Create an Appwrite project in the Appwrite Console.

  2. Create a Node.js Function named transcribe-audio.

  3. Use this repository folder as the function root:

    appwrite/functions/transcribe-audio
    
  4. Configure the function:

    Runtime: Node.js 20 or newer
    Entrypoint: src/main.js
    Build command: npm install
    
  5. Add function environment variables in Appwrite:

    OPENAI_API_KEY=sk-...
    OPENAI_TRANSCRIPTION_MODEL=gpt-4o-mini-transcribe
    

    OPENAI_TRANSCRIPTION_MODEL is optional.

  6. Deploy the function and copy its generated function domain, for example:

    https://your-function-id.region.appwrite.run
    
  7. Make sure the function can be executed by your app. For a public app without Appwrite login, allow public/guest execution or use the generated function domain as your public endpoint.

App Setup

  1. Install dependencies:

    npm install
  2. Create .env from the example:

    cp .env.example .env
  3. Set the Appwrite Function URL:

    EXPO_PUBLIC_TRANSCRIPTION_FUNCTION_URL=https://your-function-id.region.appwrite.run
    

    Do not put OPENAI_API_KEY in the Expo app.

  4. Start Expo:

    npx expo start
  5. Run Android:

    npx expo run:android

Project Structure

todo-voice/
  app/                                  Expo Router screens
  appwrite/functions/transcribe-audio/  Appwrite Function for transcription
  assets/                               Images and sounds
  src/components/                       Reusable UI components
  src/context/                          Task state provider
  src/hooks/                            Voice recording and task hooks
  src/screens/                          Main app screens
  src/services/speechToText.ts          Calls the Appwrite Function
  src/services/notification.ts          Local notification scheduling

Security Notes

  • Never commit .env.
  • The Expo app should only contain public config like the Appwrite Function URL.
  • Store OPENAI_API_KEY only in Appwrite Function environment variables.
  • Monitor OpenAI usage from the OpenAI dashboard because transcription calls still incur API usage.

Troubleshooting

If transcription fails:

  • Confirm EXPO_PUBLIC_TRANSCRIPTION_FUNCTION_URL points to the generated Appwrite Function domain.
  • Confirm the Appwrite Function has OPENAI_API_KEY configured.
  • Check the function execution logs in Appwrite Console.
  • Rebuild/restart Expo after changing .env.

If Android notifications keep old sound settings:

adb uninstall com.thehubx.todovoice
npx expo run:android

About

A React Native To-Do application built with Expo and Expo Router that allows users to manage tasks via both traditional input and voice commands. Features include task persistence with AsyncStorage, animated UI interactions, and speech-to-text task creation using the OpenAI API.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages