Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRASP

Grid Risk Analytics for Stress & Prevention by Grid Pilots


Prerequisites

  • Python 3.10+
  • Node.js 18+
  • Azure CosmosDB credentials (not included in the repo — see Setup below)

Setup & Installation

1. Clone the repository

git clone https://github.com/YoovanP/GRASP/
cd GRASP

2. Configure environment variables

The CosmosDB API key is not included in the repo. You need to create two .env files manually before starting either server.

backend/.env

API_KEY=your_generated_api_key
COSMOS_ENDPOINT=https://your-account.documents.azure.com:443/
COSMOS_KEY=your_cosmos_primary_key

frontend/.env.local

BACKEND_URL=http://localhost:8000
API_KEY=same_value_as_backend_env

Your CosmosDB credentials are in the Azure Portal → your CosmosDB account → Keys tab.


3. Install frontend dependencies

cd frontend
npm install

4. Install backend dependencies

cd ../backend
pip install -r requirements.txt

macOS only: LightGBM requires OpenMP. If you see OSError: libomp.dylib not loaded, run:

brew install libomp

Running the App

Both servers need to be running at the same time. Open two terminal windows.

Terminal 1 — Frontend

cd GRASP/frontend
npm run dev

Frontend available at http://localhost:3000

Terminal 2 — Backend

Run from root (GRASP/), not from backend/

cd GRASP
uvicorn backend.api:app --reload --port 8000 --host 0.0.0.0

Backend available at http://localhost:8000/health


Verify It's Working

Open http://localhost:8000/health in your browser. You should see:

{ "status": "ok" }

Then open http://localhost:3000 to access the dashboard.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages