How mariavyso/journaling_app works
Project type and purpose
• This is a mobile journaling application (React Native with Expo) that:
– Records audio in the app (using recording_button.js & timer.js)
– Sends the audio clip to a Google Cloud Function (google_function.py)
– Uses OpenAI Whisper to transcribe the audio
– Creates or appends to a Google Doc via the Google Docs API
Out the main components
a. Mobile Client (React Native/Expo)
• App.js: root component
• recording_button.js & timer.js: audio-capture UI
• babel.config.js, app.json, package.json: build & config
b. Cloud Backend
• Google Cloud Function (python): handles HTTP POST of audio
• OpenAI Whisper API: external transcription service
• Google Docs API: external document‐creation service
c. Data stores & user environment
• Google Drive/Docs: stores the user’s journal entries
• (Implicit) Mobile device mic and local state
Interactions and data flows
1) User taps “Record” → Mobile app captures audio.
2) On “Stop,” app bundles audio blob into an HTTP request.
3) App calls the Cloud Function endpoint (HTTPS).
4) Cloud Function:
– Receives audio binary
– Calls OpenAI Whisper API → receives transcript text
– Calls Google Docs API → creates/appends to Doc in the user’s Drive
– Returns a response (e.g., success + doc URL)
5) Mobile app may display confirmation or link to the Doc.
Architectural patterns & principles
• Client‐Server separation: thin client; heavy lifting in the Cloud Function
• Serverless microservice: single-purpose function triggered via HTTP
• External service integration: best-of-breed APIs rather than own NLP or storage
Detail is key—but avoid clutter
• Logical component (UI, audio capture, HTTP endpoint, transcription, storage)
• Number or annotate the workflow steps so a reader can follow the path from “Record” to “Doc created.”