# Trident Document Intelligence — Deployment Guide ## 1. Deploy the Backend (Render) 1. Push this code to a **GitHub repository**. 2. Go to [dashboard.render.com](https://dashboard.render.com/) → **New +** → **Web Service**. 3. Connect your GitHub repo. 4. Use these settings: * **Name:** `trident-backend` * **Runtime:** Python 3 * **Build Command:** `apt-get update && apt-get install -y poppler-utils && pip install -r requirements.txt` * **Start Command:** `uvicorn app.main:app --host 0.0.0.0 --port $PORT` 5. Scroll down to **Environment Variables** and add: * `GOOGLE_API_KEY`: *(Paste your Gemini API key)* * `PYTHON_VERSION`: `3.11.0` 6. Click **Deploy Web Service**. * *Note: It will take a few minutes. Once done, copy the URL (e.g., `https://trident-backend.onrender.com`).* --- ## 2. Deploy the Frontend (Streamlit Cloud) 1. Go to [share.streamlit.io](https://share.streamlit.io/) → **New App**. 2. Select your GitHub repo. 3. **Main file path:** `streamlit_app.py` 4. Click **Advanced Settings** → **Secrets** and add: ```toml API_URL = "https://your-render-backend-url.onrender.com/api/v1" ``` *(Replace with your actual Render URL from Step 1)* 5. Click **Deploy**. --- ## 🎉 Done! Your app will be live. - **Render** runs the FastAPI backend (and installs `poppler` for PDF processing). - **Streamlit Cloud** runs the UI (and installs `poppler` via the included `packages.txt`).