Developer Setup
This guide provides a step-by-step path to setting up the full Intelligence for Good (i4g) stack: Backend (Core), Frontend (UI), and Infrastructure.
Python 3.11+ (Conda recommended)
Docker (Optional, for containerized runs)
Google Cloud SDK (Optional, for infra deployment)
1. Repository Setup
The project is organized as a multi-root workspace. We recommend cloning all repositories into a single parent directory (e.g., ~/work/i4g/).
mkdir i4g && cd i4g
git clone https://github.com/intelligenceforgood/core.git
git clone https://github.com/intelligenceforgood/ui.git
git clone https://github.com/intelligenceforgood/infra.git
git clone https://github.com/intelligenceforgood/docs.git
git clone https://github.com/intelligenceforgood/planning.git
2. Backend Setup (Core)
The core repository contains the Core API backend and worker jobs.
Navigate to Core: cd core
Run the API:
API will be available at http://127.0.0.1:8000.
Docs at http://127.0.0.1:8000/docs.
See core/README.md for detailed instructions.
3. Frontend Setup (UI)
The ui repository contains the Next.js analyst console.
Run Development Server:
UI will be available at http://localhost:3000.
See ui/README.md for detailed instructions.
4. Infrastructure (Optional)
If you need to deploy to Google Cloud or manage cloud resources:
Navigate to Infra: cd ../infra
See infra/README.md for detailed instructions.
Troubleshooting
CORS Errors: Ensure API_URL in ui/apps/web/.env.local matches the running Core API URL.
Missing Data: Rerun the i4g bootstrap local reset command in core.