The goal of this assignment is to build a simple mobile application using Expo (React Native) that runs seamlessly on both Android and iOS. The app should allow a user to enter a question, send it to a streaming API, and display the AI’s response in a clear and structured way.
We will pay particular attention to how you handle real-time streaming and markdown rendering as the AI’s response arrives.
Please use the following endpoint for your app:
<https://vera-assignment-api.vercel.app/api/stream?prompt=your-question-here>
The endpoint returns Server-Sent Events (SSE) with the following characteristics:
Method: GET
Header: Content-Type: text/event-stream
Streamed Data Example:
data: {"type":"NodeChunk","content":{"nodeName":"STREAM","content":"Partial text here..."}}
Your app should connect to this endpoint, handle the stream, and render the response incrementally as chunks arrive.
The streamed text may include structured tagged sections representing different content types.
These tags can appear multiple times or one after another, for example:
<guideline>Some markdown-formatted text here...</guideline>
<drug>Drug A: 10mg daily</drug>
<guideline>Another section...</guideline>
<guideline> or <drug>) starts and ends in the streamed text.