This repository contains a full-stack health application with an Expo React Native frontend (compiled for Web) and a Flask Python backend.
Make sure you have accounts and projects set up on:
- Vercel (Frontend Hosting)
- Render (Backend Web Service)
- Firebase Console (Authentication & Firestore Database)
- Google AI Studio (Gemini AI Key)
| Variable Name | Purpose | Example / How to Obtain |
|---|---|---|
FLASK_ENV |
Run mode | production |
GEMINI_API_KEY |
Empathetic health assistant key | Obtain from Google AI Studio |
FIREBASE_SERVICE_ACCOUNT_JSON |
Firebase authentication & db credentials | Minified single-line JSON of your Service Account Key |
| Variable Name | Purpose | Example / How to Obtain |
|---|---|---|
EXPO_PUBLIC_API_URL |
Endpoint of backend API | E.g. https://aarini-backend.onrender.com (no trailing slash) |
- Open the Firebase Console and create a project named Aarini (or select an existing project).
- Enable Firestore Database:
- Navigate to Firestore Database in the left menu.
- Click Create Database. Select production mode and select a region close to your user base.
- Enable Authentication:
- Navigate to Authentication in the left menu.
- Click Get Started, then select Email/Password as a provider, enable it, and save.
- Generate Service Account Private Key:
- Go to Project Settings (gear icon in the sidebar) > Service Accounts.
- Click Generate New Private Key and download the JSON file.
- Convert Key to Single-Line JSON: Open the downloaded JSON file, copy its contents, and minify it into a single line (remove line breaks). This will be used as the value for the
FIREBASE_SERVICE_ACCOUNT_JSONenvironment variable in Render.
The repository includes a render.yaml Blueprint file at the root. You can deploy the backend using either the blueprint or manual configuration.
- Go to the Render Dashboard.
- Click New + and select Blueprint.
- Connect your GitHub repository.
- Render will automatically read the
render.yamlfile. - In the settings, fill in the values for the environment variables:
GEMINI_API_KEYFIREBASE_SERVICE_ACCOUNT_JSON
- Click Apply to deploy the services.
- Go to Render Dashboard > New + > Web Service.
- Connect your repository.
- Configure the following service settings:
- Name:
aarini-backend - Environment:
Python - Root Directory:
backend - Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app
- Name:
- Expand the Advanced section and add the required environment variables:
FLASK_ENV=productionGEMINI_API_KEYFIREBASE_SERVICE_ACCOUNT_JSON
- Click Create Web Service.
- Once deployed, note down the service URL (e.g.
https://aarini-backend.onrender.com).
Vercel will build the Expo project into a static web application and serve it with client-side SPA routing.
- Go to the Vercel Dashboard and click Add New > Project.
- Import your GitHub repository.
- Configure the project settings:
- Framework Preset: Select
Other(or leave default). - Root Directory: Select
frontend. - Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install --legacy-peer-deps(Crucial for handling peer dependency trees with React 19).
- Framework Preset: Select
- Add the following Environment Variable:
- Key:
EXPO_PUBLIC_API_URL - Value: Your deployed Render backend URL (e.g.
https://aarini-backend.onrender.com)
- Key:
- Click Deploy.
- Once the build is complete, Vercel will provide your live frontend URL (e.g.
https://aarini-frontend.vercel.app).
- Health Endpoint: Visit the backend URL
https://your-backend.onrender.com/in your browser. Verify it returns{"status":"healthy", ...}andfirebase_connected: true. - Onboarding Screen: Open the Vercel frontend URL, verify the Splash screen loads, and click sign up.
- Database Connection: Register a test user (e.g.,
test@aarini.com) and verify that a user document appears under theuserscollection in the Firebase console. - AI Assistant: Navigate to the chat tab, send an inquiry about menstrual cramps, and verify it returns a response generated by Gemini AI.