Standardised GitHub repository template for Retrieval-Augmented Generation (RAG) projects built on Azure. Clone this repo to bootstrap new AI projects with consistent structure, tooling, and deployment patterns.
.
├── backend/ # Python Azure Functions — RAG agent, API, ingestion
│ ├── agent/ # RAG agent core (retriever, embeddings, generator)
│ ├── blob_client/ # Azure Blob Storage wrapper + validation
│ ├── ingestion/ # Document parsing, chunking, embedding pipeline
│ ├── tests/ # Unit & integration tests
│ ├── deploy.sh # One-command Azure deployment
│ ├── run.sh # Local dev helper (tests, func start)
│ ├── function_app.py # Azure Functions entry point
│ └── .env.example # Required environment variables
├── frontend/ # Client application (Next.js recommended)
├── database/ # Database setup, migrations, deployment scripts
├── qdrant/ # Local Qdrant vector DB management
│ └── run.sh # Docker start/stop/status
├── planning/ # Project planning artifacts
│ ├── plan.md # Vision, backlog, sprint plan template
│ └── erd-template.md # Entity Relationship Diagram template
├── docs/ # Documentation
│ ├── azure-deployment-tiers.md # Dev / Staging / Prod resource specs
│ └── branching-strategy.md # Git workflow & branch protection rules
├── sample_docs/ # Test documents for ingestion development
├── .github/ # PR template, issue templates
├── AGENTS.md # AI assistant collaboration guidelines
├── Makefile # Common commands (setup, lint, format, test)
├── pyproject.toml # Python tooling config (black, isort, mypy, pytest)
├── .pre-commit-config.yaml # Pre-commit hooks
└── requirements-dev.txt # Dev tooling dependencies
# Clone the template (or use GitHub "Use this template" button)
git clone https://github.com/your-org/rag-python-sdk-template.git my-project
cd my-project
# Set up Python environment + pre-commit hooks
make setup
source .venv/bin/activatecp backend/.env.example backend/.env
# Edit backend/.env with your Azure credentials# Start Qdrant (requires Docker)
./qdrant/run.sh start
# In another terminal — start the backend
cd backend && ./run.sh startmake test-unit # Fast, no external deps
make test-integration # Requires Azure resources
make lint # Black, isort, flake8, mypy| Command | Description |
|---|---|
make setup |
Create venv, install deps, set up pre-commit hooks |
make lint |
Run all linters (black, isort, flake8, mypy) |
make format |
Auto-format code |
make test |
Run all tests |
make test-unit |
Run unit tests only |
make test-integration |
Run integration tests (requires Azure) |
make pre-commit |
Run pre-commit hooks on all files |
make clean |
Remove caches and build artifacts |
Three standard tiers are defined in docs/azure-deployment-tiers.md:
| Tier | Monthly Budget | Key Resources |
|---|---|---|
| Development | €50 – €150 | Consumption Functions, local Qdrant, Azurite |
| Staging | ≤ €150 | Consumption Functions, ACI Qdrant, App Service + PocketBase |
| Production | ≤ €250 | Consumption Functions, ACI Qdrant, PostgreSQL Flexible, Key Vault |
Deploy the backend with one command:
cd backend && ./deploy.shFull details in docs/branching-strategy.md.
feature branch ──PR──▶ dev ──PR──▶ main
- No direct pushes to
mainordev— all changes via pull requests. - Feature branches are named after the Monday ticket:
dev - Exact verbeteren. - Flow: feature branch → PR to
dev(squash-merge) → PR fromdevtomain(merge). - Commit format:
type(scope): description(Conventional Commits). - Required CI checks:
lint+test-unitmust pass before merge.
Before building, update the planning artifacts:
- Project plan —
planning/plan.md: vision, backlog, sprint plan. - Architecture & data model —
planning/erd-template.md: system architecture, data flows, API contracts, vector store schema, database ERD, and environment variables. Fill this out before coding.
See AGENTS.md for conventions when working with AI coding assistants (commit strategy, file access, development approach).
| Layer | Technology |
|---|---|
| Backend | Python 3.11, Azure Functions v4 |
| Vector DB | Qdrant |
| Embeddings | Azure OpenAI (text-embedding-ada-002 / text-embedding-3-large) |
| LLM | Azure OpenAI (gpt-4o, gpt-4o-mini) |
| Storage | Azure Blob Storage |
| Frontend | Next.js (recommended) |
| Database | PocketBase / PostgreSQL |
| CI/CD | GitHub Actions (recommended) |
| Linting | Black, isort, flake8, mypy, pre-commit |
- Click "Use this template" on GitHub (or clone manually).
- Rename resource references in
backend/deploy.sh(resource group, storage account, function app name). - Copy and fill in
backend/.env.example→backend/.env. - Customise
planning/plan.mdwith your project's vision and backlog. - Create your ERD in
planning/erd-template.mdbefore starting the build phase. - Set up branch protection rules on
mainperdocs/branching-strategy.md. - Start building!
Add your license here.