A comprehensive project reporting solution that integrates with ConnectWise Manage to generate AI-powered project completion reports.
This solution consists of three main projects:
- Bezalu.ProjectReporting.API - Azure Functions backend API that generates project completion reports
- Bezalu.ProjectReporting.Web - Blazor WebAssembly frontend for interactive report viewing and PDF export
- Bezalu.ProjectReporting.Shared - Shared DTOs for consistent contracts between API and frontend
Generate detailed project completion reports that include:
- Timeline Analysis: Compare planned vs actual project duration with variance calculations
- Budget Analysis: Track estimated vs actual hours with budget adherence metrics
- Phase Breakdown: Detailed information for each project phase including notes
- Ticket Summaries: Complete ticket information with status, hours, and notes
- AI-Powered Insights: Azure OpenAI generates comprehensive summaries analyzing:
- Ticket and phase action completion
- Time budget adherence
- Schedule adherence to planned start/end dates
- Notes quality compared to actual task completion
- Overall project performance assessment
- Recommendations and insights
- .NET 9.0 SDK
- Azure Functions Core Tools (for local development)
- ConnectWise Manage API credentials
- Azure OpenAI resource and API key
- Navigate to
Bezalu.ProjectReporting.API - Copy
local.settings.jsonand update with your credentials:- ConnectWise API credentials (company ID, public/private keys, client ID)
- Azure OpenAI endpoint and API key
See API README for detailed configuration instructions.
cd Bezalu.ProjectReporting.API
func startcurl -X POST http://localhost:7071/api/reports/project-completion \
-H "Content-Type: application/json" \
-d '{"projectId": 12345}'Generates a comprehensive project completion report for the specified project ID.
Request Body:
{
"projectId": 12345
}Response: Returns a detailed JSON report including project summary, timeline analysis, budget analysis, phase details, ticket summaries, and AI-generated insights. See the API README for complete response schema.
- Azure Functions with Isolated Worker Model
- .NET 9.0 runtime
- Service Layer Architecture:
IConnectWiseApiClient: HTTP client wrapper for ConnectWise Manage APIIAzureOpenAIService: Azure OpenAI integration for generating summariesIProjectReportingService: Orchestrates data gathering and report generation
- Dependency Injection: All services registered and configured in Program.cs
- DTOs: Clean separation between API contracts and internal models
- Blazor WebAssembly with Fluent UI components
- Interactive report visualization with tabs for phases and tickets
- AI-generated summary rendered as Markdown using Markdig
- PDF export functionality (posts existing report to API to avoid regeneration)
- Integrated with Azure Static Web Apps for deployment and authentication
CW-ProjectReporting/
├── Bezalu.ProjectReporting.API/
│ ├── DTOs/ # Data Transfer Objects
│ ├── Functions/ # Azure Function endpoints
│ ├── Models/ # ConnectWise entity models
│ ├── Services/ # Business logic and API clients
│ ├── Program.cs # Startup and DI configuration
│ ├── host.json # Azure Functions host configuration
│ ├── local.settings.json # Local development settings (not in git)
│ └── README.md # Detailed API documentation
├── Bezalu.ProjectReporting.Web/
│ ├── Pages/ # Blazor pages (Home.razor)
│ ├── Layout/ # Layout components
│ ├── wwwroot/ # Static assets and JS helpers
│ ├── staticwebapp.config.json # Azure Static Web Apps configuration
│ └── Program.cs # Blazor WebAssembly startup
└── Bezalu.ProjectReporting.Shared/
└── DTOs/ # Shared data transfer objects
- Authentication: Azure Static Web Apps with Azure AD (Entra ID) integration
- API endpoints use
AuthorizationLevel.Anonymousat the Function level - Authentication enforced by Static Web Apps configuration - requires
authenticatedrole for/api/*routes - Unauthenticated requests receive 401 and redirect to Azure AD login
- API endpoints use
- Configuration: API keys and credentials stored in Azure App Settings (use Azure Key Vault in production)
- Source Control:
local.settings.jsonexcluded from source control - Scanning: No vulnerabilities detected by CodeQL security scanning
- User accesses the Blazor WebAssembly app hosted on Azure Static Web Apps
- Static Web Apps enforces authentication via Azure AD (configured in
staticwebapp.config.json) - Unauthenticated users are automatically redirected to
/.auth/login/aad(Azure AD login) - Authenticated users receive session cookies from SWA
- API requests include SWA authentication cookies automatically
- SWA validates authentication before forwarding requests to Azure Functions
- Azure Functions trust the SWA authentication layer (no additional function-level auth required)
Important: The staticwebapp.config.json must include:
navigationFallbackwith/.auth/*exclusion to ensure authentication endpoints work correctlyresponseOverridesfor 401 status to automatically redirect unauthenticated users- Exclusions for Blazor static assets (
_framework/*,_content/*) from the SPA fallback
- All services use dependency injection for testability
- Comprehensive error handling and logging
- Async/await throughout for optimal performance
- Clean architecture with separation of concerns
- Add visual charts for timeline and budget variance trends
- Implement additional report types (financial analysis, resource utilization)
- Add caching layer for ConnectWise API responses
- Add unit and integration tests
- Implement batch report generation
- Add Excel export capability
- Implement browser-side caching (localStorage) for recent reports
- API Documentation - Detailed API documentation, configuration, and usage
- ConnectWise API Reference: https://developer.connectwise.com/
See LICENSE.txt for details.