Agranelos BFF Documentation
This documentation covers the Backend For Frontend (BFF) service for the Agranelos inventory management system.
API Documentation
- Endpoints Mapping - Complete mapping of Azure Functions to BFF endpoints
- Warehouse Management - Enhanced warehouse deletion with product handling
- Examples and Usage - Practical examples and usage patterns
Development
- Setup and Configuration - Local development setup and configuration
- Docker Deployment - Container-based deployment guide
- Implementation Details - Technical implementation details
Testing
- Postman Environments - Multi-environment testing configuration
- GraphQL Testing Guide - Complete GraphQL testing documentation
- Container Testing Results - Podman/Docker testing validation
- Testing Workflows - Complete testing workflows and examples
Architecture
graph TB
Client[Client Applications] --> BFF[Agranelos BFF :8080]
BFF --> Functions[Azure Functions<br/>Serverless Backend]
Functions --> DB[(PostgreSQL<br/>Database)]
subgraph "BFF Layer"
BFF --> ProductController[Product Controller]
BFF --> WarehouseController[Warehouse Controller]
BFF --> GraphQLController[GraphQL Controller]
end
subgraph "Azure Functions"
Functions --> ProductCRUD[Product CRUD]
Functions --> WarehouseCRUD[Warehouse CRUD]
Functions --> GraphQLEndpoint[GraphQL Endpoint]
end
Key Features
- Dual API Support: Both REST and GraphQL endpoints
- Enhanced Warehouse Management: Intelligent product handling during warehouse deletion
- Comprehensive Validation: Automatic validation with detailed error responses
- Docker Ready: Complete containerization support
- Extensive Testing: Full Postman collection with workflow examples
Quick Start
- Prerequisites: Java 17+, Maven 3.6+, Docker/Podman
- Configuration: Set
AZURE_FUNCTIONS_BASE_URL
environment variable - Run:
mvn spring-boot:run
or use Docker compose - Test: Import Postman collection and execute test workflows
For detailed setup instructions, see the Setup Guide.