Skip to content

sdp5/green-gov-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

166 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GreenGovRAG

AI-Powered Navigation for Australian Environmental & Planning Regulations

Python 3.12 FastAPI License: MIT Documentation

DocumentationQuick StartContributingSupport


Overview

GreenGovRAG helps navigate Australia's complex environmental and planning regulations using Retrieval-Augmented Generation (RAG). Ask questions in plain English and get accurate, cited answers from official government sources.

Key Features:

  • Geospatial Filtering - Query by Local Government Area (LGA)
  • Multi-Source - Federal, state, and local council regulations
  • Legal Citations - Page numbers and section references
  • Multi-LLM - OpenAI, Anthropic, AWS Bedrock, Azure support
  • Cloud Ready - Deploy to AWS, Azure, or Docker

Use Cases

  • Environmental Impact Assessments - Determine EIA requirements for projects
  • Vegetation Clearing - Understand native vegetation regulations by region
  • Planning & Zoning - Check permitted uses and development controls
  • Emissions Compliance - Navigate NGER reporting and carbon standards
  • Heritage & Conservation - Query heritage overlay requirements

Architecture

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│   React Web UI  │────▶│  FastAPI Backend │────▶│  Vector Store   │
│   (TypeScript)  │     │   (Python 3.12)  │     │ (FAISS/Qdrant)  │
└─────────────────┘     └──────────────────┘     └─────────────────┘
                               │                          │
                               ▼                          ▼
                        ┌──────────────┐         ┌───────────────┐
                        │  PostgreSQL  │         │  Embeddings   │
                        │   Database   │         │ (HuggingFace) │
                        └──────────────┘         └───────────────┘

Tech Stack:

  • Backend: FastAPI, LangChain, SQLModel, Alembic
  • RAG: FAISS/Qdrant, OpenAI/Anthropic/Bedrock LLMs
  • ETL: Airflow (local), GitHub Actions (prod)
  • Frontend: React, TypeScript, Mapbox GL
  • Cloud: AWS (ECS, S3, RDS) or Azure (Container Apps, Blob Storage)

Repository Structure

green-gov-rag/
├── backend/          # Python backend (FastAPI + RAG + ETL)
├── frontend/         # React frontend (TypeScript)
├── deploy/           # Docker Compose & cloud configs
├── docs/             # MkDocs documentation
├── data/             # Document storage & vectors
└── .github/          # CI/CD workflows

Quick Start

Prerequisites

  • Python 3.12+
  • Docker & Docker Compose (recommended)
  • OpenAI API key (or other LLM provider)

Option 1: Docker (Recommended)

# Clone repository
git clone https://github.com/sdp5/green-gov-rag
cd green-gov-rag

# Configure environment
cd deploy/docker
cp .env.example .env
# Edit .env with your API keys

# Start services
docker-compose up

Access:

Option 2: Local Development

# Backend
cd backend
pip install -e .[dev]
cp .env.example .env
# Edit .env with your configuration
alembic upgrade head
uvicorn green_gov_rag.api.main:app --reload

# Frontend
cd frontend
npm install
npm run dev

Try a Query

curl -X POST http://localhost:8000/api/query \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Do I need an EIA for a solar farm in regional NSW?",
    "lga_name": "Dubbo Regional"
  }'

Full Documentation: https://docs.greengovrag.sundeep.id.au

Contributing

We welcome contributions from the community! Whether you're fixing bugs, adding document sources, or improving documentation, your help is appreciated.

Ways to Contribute

  • Report bugs via GitHub Issues
  • Add document sources - Contribute new regulations or planning schemes
  • Code contributions - Fix bugs, add features, improve tests
  • Documentation - Improve guides, add examples, fix typos
  • Discussions - Share ideas and use cases

Getting Started

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Read the Contributor Guide
  4. Make your changes (follow our Code Style)
  5. Run tests (pytest tests/)
  6. Submit a Pull Request

See our Development Setup Guide for detailed instructions.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • All regulatory documents sourced from official Australian government websites
  • Data sovereignty: Documents processed and stored in Australian data centers
  • Built with LangChain, FastAPI, and Material for MkDocs

Support


Made with 🌿 for the Australian environmental compliance community

Star us on GitHubRead the DocsContribute

About

GreenGovRAG

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •