Skip to content

Latest commit

 

History

History
151 lines (108 loc) · 3.86 KB

File metadata and controls

151 lines (108 loc) · 3.86 KB

🚀 How to Run the Frontline Worker Support AI System

Step-by-Step Instructions

Step 1: Open Two Terminals

You'll need 2 terminal windows/tabs - one for the backend and one for the frontend.


Step 2: Start the Backend (Terminal 1)

# Navigate to project directory
cd /home/sameer/hackathon/inovista-hackathon

# Activate virtual environment
source venv/bin/activate

# Start the FastAPI backend
python -m uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000

You should see:

INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     Started reloader process
INFO:     Started server process
INFO:     Waiting for application startup.
INFO:     Application startup complete.

Keep this terminal running!


Step 3: Start the Frontend (Terminal 2)

Open a new terminal and run:

# Navigate to frontend directory
cd /home/sameer/hackathon/inovista-hackathon/frontend

# Install dependencies (if not done already)
npm install

# Start the Next.js frontend
npm run dev

You should see:

▲ Next.js 14.x.x
- Local:        http://localhost:3000
- Network:      http://0.0.0.0:3000

✓ Ready in 2.1s

Keep this terminal running too!


Step 4: Access the System

Once both servers are running, open your browser:

🏠 Citizen Portal: http://localhost:3000 📊 Admin Dashboard: http://localhost:3000/admin
🔧 API Documentation: http://localhost:8000/docs ❤️ Backend Health: http://localhost:8000/health


🎭 Demo the System

Try the Citizen Portal:

  1. Go to http://localhost:3000
  2. Fill out the form with a test case like:
    • Request: "I have severe chest pain and shortness of breath"
    • Type: Medical Emergency
    • Urgency: Emergency
    • Name: Your name
    • Location: Karachi (or any city)
  3. Click "Submit Request"
  4. Watch the real-time processing!

Check the Admin Dashboard:

  1. Go to http://localhost:3000/admin
  2. Click "Load Sample Data" to populate with test data
  3. View real-time analytics and charts
  4. See case statistics and hospital capacity

🔧 Troubleshooting

Backend Issues:

  • If you get import errors, make sure you activated the virtual environment
  • If port 8000 is busy: lsof -ti:8000 | xargs kill -9
  • Check logs for specific error messages

Frontend Issues:

  • If you get dependency errors: rm -rf node_modules package-lock.json && npm install
  • If port 3000 is busy: lsof -ti:3000 | xargs kill -9
  • Try npm run build then npm start for production mode

General Issues:

  • Make sure you're in the correct directories
  • Check that both terminals are running their respective servers
  • Restart both servers if something seems stuck

✅ What You Should See

Backend Running Successfully:

INFO:     Uvicorn running on http://0.0.0.0:8000
WARNING:  backend.services.database:Firestore not available - using mock implementation
INFO:     Starting Frontline Worker Support AI System...
INFO:     System startup completed successfully

Frontend Running Successfully:

▲ Next.js 14.x.x
- Local:        http://localhost:3000

✓ Ready in 2.1s
○ Compiling /page ...
✓ Compiled /page in 1.2s

🎉 System Features to Demo

  1. Real-time AI Processing - Submit a request and watch agents work
  2. Interactive Dashboard - Beautiful charts and analytics
  3. Complete Case Flow - From intake to booking to follow-up
  4. Sample Data Integration - 220 real cases + 3000 hospitals
  5. Mobile Responsive - Works on all devices
  6. API Documentation - Explore all endpoints at /docs

🚨 IMPORTANT: Keep both terminals running for the system to work!

The system uses mock implementations for Google Cloud services, so it will work without any external dependencies or API keys.