Installation
Get GreenLedger running locally in a few steps.
Prerequisites
- Python 3.10+
- Node.js 18+
- OpenAI API key or Google Gemini API key
Backend Setup
1. Clone and navigate
git clone https://github.com/greenledger/greenledger.git
cd greenledger/backend2. Create virtual environment
python -m venv venv
# Windows
.\venv\Scripts\activate
# Mac/Linux
source venv/bin/activate3. Install dependencies
pip install -r requirements.txt4. Configure environment
# Create .env file
OPENAI_API_KEY=sk-your-key-here
# or
GOOGLE_API_KEY=your-gemini-key-here5. Run the server
python run.py
# Server starts at http://localhost:8000Frontend Setup (Optional)
1. Navigate to frontend
cd frontend2. Install dependencies
npm install3. Start development server
npm run dev
# Frontend starts at http://localhost:5173Verify Installation
Test the API is running correctly:
curl http://localhost:8000/api/health
# Response: {"status": "healthy"}✓ You're ready to start using the API!