git clone https://github.com/tokenomists/Gradia.git
cd GradiaNavigate to the frontend directory and install the required dependencies:
cd frontend
npm installNavigate to the backend directory and install the required dependencies:
cd ../backend
npm installNavigate to the grading-system directory:
cd ../grading-systemCreate a virtual environment:
python -m venv .venvActivate the virtual environment:
- For Windows:
.\.venv\Scripts\activate
- For Linux:
source .venv/bin/activate
Install the required Python dependencies:
pip install -r requirements.txtBefore setting the environment variables, create a Google Cloud project and set up the following services:
- Cloud Storage
- Google Cloud Vision OCR
- Gemini API
- Google OAuth
- Other necessary APIs
Then, create a service account with the required permissions in IAM and download the service account credentials as a JSON file. Store the full path of this credentials file in the GOOGLE_APPLICATION_CREDENTIALS variable in the grading-system .env file as mentioned below.
-
In the
frontenddirectory, create a.envfile with the following:NEXT_PUBLIC_API_BASE_URL="YOUR_API_BASE_URL" -
In the
backenddirectory, create a.envfile with the following:PORT=YOUR_BACKEND_PORT MONGO_URI="YOUR_MONGODB_URI" JWT_SECRET="YOUR_JWT_SECRET" FRONTEND_URL="YOUR_FRONTEND_URL" BACKEND_URL="YOUR_BACKEND_URL" GOOGLE_CLIENT_ID="YOUR_GOOGLE_CLIENT_ID" GOOGLE_CLIENT_SECRET="YOUR_GOOGLE_CLIENT_SECRET" GOOGLE_APPLICATION_CREDENTIALS="PATH_TO_YOUR_GOOGLE_APPLICATION_CREDENTIALS" GEMINI_API_KEY="YOUR_GEMINI_API_KEY" GRADIA_API_KEY="YOUR_GRADIA_API_KEY" GRADIA_PYTHON_BACKEND_URL="YOUR_GRADIA_PYTHON_BACKEND_URL" -
In the
grading-systemdirectory, create a.envfile with the following:PORT=YOUR_PYTHON_BACKEND_PORT GEMINI_API_KEY="YOUR_GEMINI_API_KEY" GOOGLE_APPLICATION_CREDENTIALS="PATH_TO_YOUR_GOOGLE_APPLICATION_CREDENTIALS" GOOGLE_CLOUD_PROJECT="YOUR_GCP_PROJECT_ID" GRADIA_API_KEY="YOUR_GRADIA_API_KEY" JUDGE0_API_KEY="YOUR_JUDGE0_API_KEY"
Go to the frontend directory and run:
npm run devGo to the backend directory and run:
npm run devGo to the grading-system directory, after activating the virtual environment, run:
- For Windows:
python run.py
- For Linux or Docker (Recommended: use Gunicorn for production):
gunicorn -b 0.0.0.0:YOUR_PYTHON_BACKEND_PORT run:app
⚠️ Note: Gunicorn is not supported on Windows unless you use something like WSL.
This will start all components of the platform on their respective servers.