Microsoft Azure architecture
Designed around Microsoft Azure AI — with an honest implementation status.
AGROTRACE's core value — forecasting supply, grading produce from photos and answering procurement questions from an organisation's own records — depends on cloud AI services. This page shows how they fit together and exactly which are running today.
01Data flow
From the field to a procurement decision.
Data stays within the customer organisation at every step. AI services are called only from the server, with organisation-scoped inputs.
Farmers · Suppliers · Procurement teams
Field officers, farm managers, inspectors, suppliers and buyers record and use supply information.
AGROTRACE web application
Corporate website, enterprise workspace and supplier portal (Next.js).
Target hosting: Azure Container Apps
Backend API and authentication
Server routes for AI, analysis, forecasting and jobs; sessions, invitations and role checks.
Azure Functions for scheduled jobs
Database and secure file storage
PostgreSQL with row-level security per organisation; private photo and document storage.
Azure Blob Storage · Key Vault for secrets
Azure AI and machine learning services
Language, vision, forecasting and mapping services called only from the server.
Azure OpenAI · AI Vision · Machine Learning · Maps
Forecasting, inspection, risk analysis and procurement intelligence
Harvest forecasts, visible-defect analysis, supply-risk detection and an evidence-grounded assistant.
Dashboards, reports and notifications
Live dashboards, CSV and printable reports, real-time and scheduled notifications.
Azure Monitor & Application Insights
02Service by service
Implementation status.
Statuses reflect the actual codebase and deployment. A service is marked live only after it has been tested successfully in production.
| Service | Role in AGROTRACE | Status | Details |
|---|---|---|---|
| Azure OpenAI Service | AI Procurement Assistant — answers grounded in organisation-scoped data | Implemented in development | Server-side adapter, grounding, evidence verification, rate limits and logging are implemented. Awaiting an Azure OpenAI deployment; a labelled rule-based assistant runs meanwhile. |
| Azure AI Vision | Quality Inspection — visible-defect analysis of produce photographs | Implemented in development | Image Analysis 4.0 adapter implemented with human review. Awaiting credentials. Production grading will need a custom-trained model on labelled AGROTRACE photos. |
| Azure Machine Learning | Harvest Intelligence — yield and supply-availability forecasting | Implemented in development | Integration layer and endpoint contract implemented. No model has been trained or deployed yet; a labelled statistical baseline is used and its error is measured from recorded harvests. |
| Azure Maps | Farm, supplier and supply-distribution maps | Implemented in development | Server-side tile proxy implemented so the key never reaches the browser. Awaiting a subscription key; OpenStreetMap is used meanwhile. |
| Azure Functions | Scheduled risk detection and procurement reminders | Implemented in development | Timer-triggered function written (azure-functions/). Not yet deployed; the same job can run from Vercel Cron. |
| Azure Monitor & Application Insights | Error, integration-failure and background-job monitoring | Implemented in development | Telemetry client implemented with secret and personal-data scrubbing. Activates when a connection string is configured. |
| Azure Blob Storage | Inspection photos, documents and generated reports at scale | Planned | Files are currently stored in access-controlled Supabase Storage buckets. |
| Azure Key Vault | Central management of API keys and secrets | Planned | Secrets are currently held as server-side environment variables on the hosting platform. |
| Azure Container Apps | Hosting for the web application and custom model services | Planned | The application is currently hosted on Vercel and is container-ready. |
| Azure Data Lake Storage | Historical yield, satellite and weather data for model training | Planned | Needed once enough recorded harvest history exists to train a forecasting model. |
| Azure AI Foundry | Evaluation of prompts and models before deployment | Planned | To evaluate groundedness and refusal behaviour of the assistant before production use. |
Current non-Azure components: application hosting on Vercel; database, authentication, file storage and realtime on Supabase (PostgreSQL).
03Why Azure
What Azure makes possible.
- Grounded language AI. Azure OpenAI lets the assistant answer procurement questions from each organisation's private records, with enterprise data handling.
- Produce grading from photos. Azure AI Vision — and later a custom model trained on labelled AGROTRACE inspections — moves grading to the farm gate.
- Forecasting at scale. Azure Machine Learning will train and serve yield models once real harvest records accumulate, with Data Lake storage for weather and satellite inputs.
- Operations. Functions for scheduled risk scans, Monitor for reliability and Key Vault for secrets.
- What Azure credits fund. Model evaluation and fine-tuning, the first trained yield model, a custom vision model, and production hosting during pilots.