This is a comprehensive application for analyzing pharmaceutical safety data using AI and government databases.
View your app in AI Studio: https://ai.studio/apps/drive/1SSQiu9OYhf7Cg7yFDIe7QWL16N0tKFvR
This app now uses Google Cloud Secrets Manager for secure API credential management. API keys are no longer stored in the frontend or committed to version control.
See MIGRATION.md for details on the architecture change and SECRETS_SETUP.md for setup instructions.
- Node.js 18+
- Python 3.11+
- Google Cloud project (for production)
-
Install dependencies:
npm install
-
Start the backend:
cd backend export GEMINI_API_KEY="your_key_here" export FDA_API_KEY="your_key_here" python main.py
-
In another terminal, start the frontend:
npm run dev
The app will be available at http://localhost:5173
export GEMINI_API_KEY="your_key_here"
export FDA_API_KEY="your_key_here"
docker-compose up-
Set up Google Cloud Secrets:
./setup-gcp-secrets.sh
-
Configure Cloud Build trigger with substitution variables:
_GEMINI_API_KEY: Your API key_FDA_API_KEY: Your API key
-
Push to deploy:
git push origin main
See SECRETS_SETUP.md for detailed production setup.
.
├── components/ # React components
│ ├── AnalysisProgress.tsx
│ ├── DrugInputForm.tsx
│ ├── ReportDisplay.tsx
│ └── icons/ # Icon components
├── pages/ # Page components
│ ├── DashboardPage.tsx
│ └── LandingPage.tsx
├── services/ # Business logic
│ ├── geminiService.ts # AI analysis
│ └── secretManager.ts # Secret retrieval
├── backend/ # Flask backend
│ ├── main.py # Secret Manager integration
│ └── requirements.txt
├── Dockerfile # Production Docker image
├── docker-compose.yml # Local development
└── vite.config.ts # Vite configuration
- 🤖 AI-Powered Analysis - Uses Google Gemini API for pharmaceutical safety analysis
- 💊 Multi-Source Data - Aggregates data from:
- FDA drug labels and adverse events
- RxNorm drug identifier
- Clinical Trials.gov
- Europe PMC research articles
- 📊 Visual Reports - Generates comprehensive safety reports with charts
- 🔐 Secure Credentials - Secrets managed via Google Cloud Secret Manager
- ☁️ Cloud Native - Runs on Google Cloud Run
- Google Gemini API - For AI analysis
- openFDA API - For FDA drug data
- RxNorm API - For drug identification
- ClinicalTrials.gov API - For clinical trial data
- Europe PMC API - For research articles
See .env.local.example for available environment variables.
For production, use Google Cloud Secret Manager (see SECRETS_SETUP.md).
npm run buildnpm run previewcd backend
pip install -r requirements.txt
export GCP_PROJECT_ID="your-project"
python main.pyThis app is configured for deployment to Google Cloud Run with automatic builds via Cloud Build.
See SECRETS_SETUP.md for complete deployment instructions.
[Add your license here]
For issues or questions, please open an issue on GitHub.
