Skip to content

MyTeamForDev/CloudZen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

203 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CloudZen

A modern Blazor WebAssembly portfolio and consulting showcase built with .NET 8, demonstrating expertise in building scalable, secure cloud applications with Azure integration.

πŸš€ Features

Portfolio & Presentation

  • Dynamic Project Showcase - Interactive case studies with filtering by technology, status, and project type
  • Professional Portfolio Page - Comprehensive "Who I Am" section with profile header, approach, and highlighted achievements
  • Animated UI Components - Counter circles with gradient fills and smooth animations for metrics display
  • Responsive Design - Mobile-first approach with Tailwind CSS, optimized for all screen sizes
  • Interactive SDLC Process - Visual representation of Planning, Automation, and Deployment phases

Business Features

  • Contact Form - Validated contact form with email integration via Brevo/SendGrid/SMTP providers
  • AI Chatbot - Embedded conversational assistant powered by Anthropic Claude, with knowledge base, lead conversion, and abuse protection (see AI_CHATBOT_DOCUMENTATION.md)
  • Resume Download - Secure resume delivery from Azure Blob Storage with SAS token authentication
  • Service Offerings Display - Dynamic service cards showcasing consulting capabilities
  • Testimonials Section - Client feedback display (currently disabled, ready for activation)
  • Call-to-Action Components - Strategic CTAs throughout the site for lead generation

Technical Features

  • Progressive Web App (PWA) - Service worker enabled for offline capability and fast loading
  • Component-Based Architecture - Reusable Blazor components with clear separation of concerns
  • Secure API Backend - Email and AI chatbot operations routed through Azure Functions API with rate limiting, input validation, and token controls
  • Centralized Data Management - Service layer pattern with ProjectService and PersonalService
  • Type-Safe Event Handling - EventCallback pattern for parent-child component communication
  • Google Calendar Integration - URL service for scheduling consultation bookings
  • Ticket Management System - Dashboard for tracking support incidents (demo implementation)

Cloud & DevOps

  • Azure Static Web Apps - Automated deployment with GitHub Actions workflow
  • Azure Blob Storage - Cloud file storage with CORS configuration for cross-origin access
  • Azure Key Vault Integration - Secrets management via Azure Functions backend with DefaultAzureCredential
  • CI/CD Pipeline - Automated build, test, and deployment on push to master (Static Web Apps + Azure Functions)
  • Service Worker - Automatic caching and offline support for enhanced performance

πŸ› οΈ Tech Stack

Frontend Technologies

  • Blazor WebAssembly (.NET 8) - Modern SPA framework with C# instead of JavaScript
  • C# 12 - Latest language features with nullable reference types enabled
  • Tailwind CSS - Utility-first CSS framework for rapid UI development
  • Bootstrap Icons - Comprehensive icon library for UI elements
  • HTML5 & CSS3 - Semantic markup and modern styling capabilities

Cloud Infrastructure (Azure)

  • Azure Static Web Apps - Serverless hosting with global CDN distribution
  • Azure Blob Storage - Scalable object storage for resumes and file assets
  • Azure Key Vault - Centralized secrets management accessed via Functions with DefaultAzureCredential
  • Azure Functions (Isolated Worker, .NET 8) - Serverless backend for secure email API and AI chatbot proxy
  • Azure Table Storage - NoSQL storage for ticket/incident data
  • Azure Application Insights - Real-time monitoring and telemetry with adaptive sampling

External APIs

  • Anthropic Claude API (claude-sonnet-4-20250514) - AI chatbot backend with server-side knowledge base and system prompt

Backend Services & APIs

  • Brevo SMTP Relay - Transactional email delivery via MailKit/MimeKit through Azure Functions API
  • MailKit / MimeKit (v4.15.0) - Cross-platform .NET SMTP client for secure email delivery
  • Polly (v8.6.5) - Resilience and transient fault handling (rate limiting, circuit breaker)
  • Azure Storage SDK - Client libraries for Blob, Queue, File Share, and Table operations
    • Azure.Storage.Blobs (v12.24.0)
    • Azure.Storage.Queues (v12.22.0)
    • Azure.Storage.Files.Shares (v12.22.0)
    • Azure.Data.Tables (v12.10.0)

Authentication & Security

  • Azure Identity - Managed Identity and credential management (v1.13.2 client, v1.18.0 API)
  • Azure Key Vault Configuration - Secure runtime configuration loading via AddAzureKeyVault() in Functions API
  • SAS Tokens - Secure, time-limited access to blob storage resources
  • CORS Configuration - Cross-origin resource sharing with configurable allowed origins in Azure Functions
  • Content Security Policy - HTTP headers for XSS protection configured in staticwebapp.config.json
  • Input Validation & Sanitization - InputValidator with XSS pattern detection in Azure Functions API
  • Rate Limiting - Per-client fixed window rate limiting with Polly in Azure Functions API

Development & Build Tools

  • .NET 8 SDK - Latest LTS version with performance improvements
  • Microsoft.Extensions.Azure (v1.11.0) - Azure SDK client factory extensions
  • User Secrets - Local development secrets management (not deployed)
  • Service Worker - PWA capabilities with offline caching

Tailwind CSS Setup & Architecture

How Tailwind is Set Up

This project uses Tailwind CSS via CDN (zero-configuration approach) loaded in wwwroot/index.html:

<script src="https://cdn.tailwindcss.com"></script>

What this means:

  • βœ… Zero build complexity - No npm, webpack, PostCSS, or Node.js dependencies required
  • βœ… Instant availability - All Tailwind utility classes work out of the box
  • βœ… Blazor-native - Integrates seamlessly with Blazor WebAssembly static file serving
  • βœ… Fast prototyping - Full Tailwind feature set available immediately
  • ⚠️ Larger bundle - ~3.5MB uncompressed CSS (not optimized via PurgeCSS)
  • ⚠️ No theme extension - Cannot customize default Tailwind theme without inline config

Usage Pattern: Hybrid Approach

The application combines Tailwind utility classes (primary styling) with custom CSS (wwwroot/css/app.css) for:

  • Blazor-specific styles (#blazor-error-ui, .loading-progress)
  • Custom animations (.hamburger-active, .scroll-to-top)
  • Brand-specific classes (.cloudzen-hover, .progress-bar-fill)
  • Bootstrap compatibility (legacy .btn-primary, form controls)

Tailwind Coverage: 100% of Razor components use Tailwind utilities extensively.

Architecture Decision: Why CDN Instead of npm/Config?

Advantages of CDN approach:

  • Simplicity - Pure .NET 8 project with no JavaScript toolchain
  • Developer experience - No build step delays during development
  • Deployment - Single dotnet publish command with no additional bundling
  • Maintenance - No package.json, node_modules, or npm version conflicts

Trade-offs:

  • Performance - Unoptimized CSS bundle (~3.5MB minified to ~300KB in production)
  • Customization - Limited theme extensions without inline configuration
  • Production optimization - No automatic unused class removal

Recommendations

Option 1: Keep CDN (Current Approach) βœ…
Best for: Small-to-medium projects, rapid development, zero build complexity

To optimize current setup:

  1. Add custom theme colors via inline Tailwind config in index.html:
<script>
  tailwind.config = {
    theme: {
      extend: {
        colors: {
          'cloudzen-teal': '#61C2C8',
          'cloudzen-teal-hover': '#74b7bb',
        }
      }
    }
  }
</script>
  1. Use CSS custom properties for brand consistency (already implemented):
/* app.css */
:root {
  --cloudzen-primary: #61C2C8;
}

Option 2: Migrate to npm + tailwind.config.js
Best for: Production apps, performance optimization, advanced customization

Benefits:

  • πŸ“¦ 90% smaller CSS - PurgeCSS removes unused classes (reduces to ~10-30KB)
  • 🎨 Full theme control - Custom colors, fonts, spacing, breakpoints
  • ⚑ JIT mode - Only generate classes you actually use
  • πŸ”§ Plugins - Access official Tailwind plugins (forms, typography, aspect-ratio)

Migration steps (future enhancement):

# Install Tailwind
npm install -D tailwindcss postcss autoprefixer

# Create config
npx tailwindcss init

# Update tailwind.config.js
module.exports = {
  content: ["./**/*.razor", "./**/*.html"],
  theme: {
    extend: {
      colors: {
        'cloudzen-teal': '#61C2C8',
      }
    }
  }
}

# Build CSS
npx tailwindcss -i ./wwwroot/css/app.css -o ./wwwroot/css/output.css --minify

Current recommendation: Keep CDN approach for now. The application's current bundle size is acceptable for a portfolio site, and the development simplicity outweighs the performance gains from npm-based setup. Consider migrating when adding significant new features or optimizing for production performance.

Design Patterns & Principles Implemented

SOLID Principles

  • Single Responsibility Principle (SRP)
    • Each service has one reason to change (ProjectService, ResumeService, EmailServiceFactory)
    • Components have single, well-defined purposes (ProfileHeader, ProjectCard)
    • Models represent single entities (ProjectInfo, ServiceInfo, TicketDto)
  • Open/Closed Principle (OCP)
    • IEmailService interface allows alternative email implementations without modifying existing code
    • Azure Functions API extensible via configuration for different SMTP providers
    • Component system supports adding features through composition, not modification
  • Liskov Substitution Principle (LSP)
    • IEmailService implementations are interchangeable (e.g., ApiEmailService could be swapped for a direct provider)
    • ITicketService implementations are interchangeable
  • Interface Segregation Principle (ISP)
    • Focused interfaces (IEmailService, ITicketService, IRateLimiterService) with only necessary methods
    • No client forced to depend on methods it doesn't use
  • Dependency Inversion Principle (DIP)
    • High-level components depend on abstractions (IEmailService, ITicketService, IRateLimiterService), not concrete implementations
    • DI container manages all dependencies via Program.cs registration in both client and API projects
    • Services injected into components via @inject directive

Design Patterns

  • API Gateway Pattern - Blazor WASM delegates sensitive operations to Azure Functions API (ApiEmailService β†’ SendEmailFunction)
  • Options Pattern - Strongly-typed configuration with IOptions<T> (EmailServiceOptions, BlobStorageOptions, EmailSettings, RateLimitOptions)
  • Service Layer Pattern - Business logic separation (ProjectService, PersonalService, ResumeService, TicketService, ApiEmailService)
  • Repository Pattern - Data access abstraction for projects and services with centralized data management
  • Event Callback Pattern - Type-safe parent-child component communication in Blazor
  • Singleton Pattern - Long-lived services (GoogleCalendarUrlService, TicketService, PollyRateLimiterService) registered as singletons
  • Record Pattern - Immutable data transfer objects (ServiceInfo record type)
  • Resilience Pattern - Polly-based rate limiting and circuit breaker in Azure Functions API

Advanced Techniques

  • Async/Await Pattern - Non-blocking operations throughout (SendEmailAsync, DownloadResumeAsync)
  • Managed Identity Authentication - Azure Identity with DefaultAzureCredential for passwordless Azure service access
  • Configuration Abstraction - IConfiguration and IOptions<T> for environment-specific settings across both projects
  • Logging Integration - ILogger<T> for structured logging in services and Azure Functions
  • Error Handling - InvalidOperationException for missing configuration validation
  • Null Safety - Nullable reference types enabled project-wide (string?, IEnumerable?)
  • LINQ Query Composition - Efficient data filtering and sorting in ProjectService
  • JavaScript Interop - Blazor-JS communication for file downloads and animations
  • Input Sanitization - InputValidator with regex-based XSS pattern detection and HTML encoding
  • Correlation ID Tracking - Request tracing across Azure Functions for debugging and monitoring

DevOps & CI/CD

  • GitHub Actions - Automated CI/CD workflows (Static Web Apps + Azure Functions deployment)
  • Azure Static Web Apps CLI - Local development and testing
  • Docker - Container support for reproducible builds (optional)
  • Git - Version control with branch-based deployment strategies

Monitoring & Analytics

  • Application Insights - Performance monitoring with adaptive sampling and QuickPulse metrics in Azure Functions API
  • Azure Monitor - Infrastructure and application health monitoring
  • Logging Framework - ILogger<T> integration throughout services with structured logging
  • Custom telemetry - Track user interactions, feature usage, and performance bottlenecks

Resilience & Error Handling

  • Retry Logic - Implemented in distributed systems projects (RabbitMQ, Azure Functions)
  • Connection Resiliency - Auto-reconnect for messaging systems and database connections
  • Circuit Breaker - Polly-based circuit breaker in Azure Functions API rate limiter service
  • Health Checks - Continuous monitoring of dependent services (databases, message queues, APIs)
  • Graceful Degradation - Application continues functioning when non-critical services fail
  • Exception Handling - Structured error handling with specific exception types
  • Configuration Validation - Throws InvalidOperationException for missing critical settings
  • Timeout Management - Configurable timeouts for HTTP clients (30s default) in Azure Functions API
  • Idempotency - Ensures operations can be safely retried without side effects
  • Polly Integration - Rate limiting (FixedWindowRateLimiter) and circuit breaker via Polly resilience pipelines in API
  • Async-safe Patterns - All async operations properly handle cancellation and exceptions

πŸ“š Documentation

This project includes comprehensive documentation to help you understand the architecture, deploy to Azure, and maintain security:

⚑ Quick Start

# Clone the repository
git clone https://github.com/dariemcarlosdev/CloudZen.git

# Navigate to project
cd CloudZen

# Restore dependencies
dotnet restore

# Run Blazor WASM client
dotnet run --project CloudZen.csproj

# Run Azure Functions API (separate terminal, requires Azure Functions Core Tools)
cd Api
func start

πŸ” Security First

Important: Blazor WebAssembly runs entirely in the browser. Never store secrets in appsettings.json. Use Azure Functions backend with Key Vault for secure operations. See SECURITY_ALERT.md for details.

πŸ—οΈ Architecture

Blazor WASM (Client)  ──→  Azure Functions API (Backend)  ──→  Brevo SMTP Relay
   (CloudZen)                 (CloudZen.Api)                     (Email Delivery)
        β”‚                          β”‚
        β”‚                          β”œβ”€β”€β†’ Azure Key Vault (Secrets)
        β”‚                          β”œβ”€β”€β†’ Application Insights (Telemetry)
        β”‚                          └──→ Anthropic Claude API (AI Chatbot)
        β”‚
        └──→  Azure Blob Storage (Resume/Files)

See COMPONENT_ARCHITECTURE.md for detailed component breakdown and data flow.

πŸ“¦ Project Structure

CloudZen/
β”œβ”€β”€ Api/                             # Azure Functions API backend (CloudZen.Api)
β”‚   β”œβ”€β”€ Functions/                  # Azure Function endpoints
β”‚   β”‚   β”œβ”€β”€ SendEmailFunction.cs    # Email proxy to Brevo SMTP
β”‚   β”‚   └── ChatFunction.cs         # AI chatbot proxy to Anthropic Claude
β”‚   β”œβ”€β”€ Models/                     # API models (EmailRequest, ChatRequest, ChatResponse, RateLimitOptions)
β”‚   β”œβ”€β”€ Security/                   # Input validation and sanitization (InputValidator)
β”‚   β”œβ”€β”€ Services/                   # API services (PollyRateLimiterService)
β”‚   └── Program.cs                  # Functions host entry point
β”œβ”€β”€ Layout/                          # Layout components (MainLayout, Header, Footer)
β”œβ”€β”€ Models/                          # Data models (ProjectInfo, ServiceInfo, EmailApiRequest)
β”‚   └── Options/                    # IOptions configuration classes
β”œβ”€β”€ Pages/                           # Routable pages (Index)
β”œβ”€β”€ Services/                        # Business logic (ProjectService, ApiEmailService, ResumeService)
β”‚   └── Abstractions/               # Service interfaces (IEmailService, ITicketService)
β”œβ”€β”€ Shared/                          # Reusable Blazor components
β”‚   β”œβ”€β”€ Chatbot/                    # AI chatbot widget (CloudZenChatbot)
β”‚   β”œβ”€β”€ Common/                     # Shared UI (AnimatedCounterCircle, ScrollToTopButton, Tickets)
β”‚   β”œβ”€β”€ Landing/                    # Landing page sections (Hero, Services, CaseStudies, ContactForm, CTA)
β”‚   β”œβ”€β”€ Profile/                    # Profile components (ProfileHeader, ProfileApproach, SDLCProcess, WhoIAm)
β”‚   └── Projects/                   # Project display (ProjectCard, ProjectFilter)
β”œβ”€β”€ wwwroot/                         # Static assets, configuration, and index.html
β”œβ”€β”€ .github/workflows/               # CI/CD (azure-functions.yml)
└── Program.cs                       # Blazor WASM entry point

πŸš€ Deployment

Ready to deploy? Follow these steps:

  1. Read SECURITY_ALERT.md - Critical security information
  2. Follow DEPLOYMENT_GUIDE.md - Complete setup instructions
  3. Follow AZURE_FUNCTION_DEPLOYMENT.md - Deploy the API backend
  4. Use DEPLOYMENT_CHECKLIST.md - Track your progress

GitHub Actions workflows automatically deploy:

  • Blazor WASM β†’ Azure Static Web Apps (on push to master)
  • Azure Functions API β†’ Azure Function App (on push to master when Api/ changes)

πŸ“Š Project Highlights

Architecture & Design Excellence

  • 90% code reduction in WhoIAm page through strategic component decomposition
  • 20+ reusable Blazor components with single responsibility principle
    • Profile components: ProfileHeader, ProfileApproach, ProfileHighlights, SDLCProcess, WhoIAm
    • Project components: ProjectCard, ProjectFilter
    • Landing components: Hero, Services, CaseStudies, ContactForm, CTA, Mission, Testimonials, ValueProposition
    • Layout components: MainLayout, Header, Footer
    • Common components: AnimatedCounterCircle, ScrollToTopButton, Tickets
  • Component-based architecture enabling 85% code reusability across pages
  • Centralized business logic with dedicated service layer
    • ProjectService - Portfolio project management and filtering
    • PersonalService - Service offerings and company information
    • ResumeService - Azure Blob integration for document delivery
    • ApiEmailService - Secure email via Azure Functions API backend
    • TicketService - Support incident tracking
    • GoogleCalendarUrlService - Booking integration

Cloud-Native Implementation

  • Serverless architecture with Azure Static Web Apps + Azure Functions (Isolated Worker)
  • Automated deployments via GitHub Actions CI/CD (separate workflows for WASM and Functions)
  • Global CDN distribution for sub-100ms page loads worldwide
  • Auto-scaling infrastructure handling traffic spikes without manual intervention
  • Secure secrets management with Azure Key Vault integration in Azure Functions API
  • CORS-enabled Azure Functions API with configurable allowed origins
  • PWA capabilities with service worker for offline functionality

User Experience & Performance

  • Type-safe filtering with EventCallback pattern for real-time project filtering
  • Animated UI elements including gradient counters and smooth transitions
  • Mobile-first responsive design - Optimized for 320px to 4K displays
  • Accessibility compliance with semantic HTML and ARIA labels
  • Fast page loads - Service worker caching reduces repeat visit load time by 70%
  • Interactive process visualization - SDLC workflow with state management

Security & Best Practices

  • API-first security - Sensitive operations (email, secrets) handled by Azure Functions backend, never in client
  • SOLID principles applied across all services and components for maintainability
  • Dependency injection throughout the application for testability and loose coupling
  • Interface-driven design (IEmailService, ITicketService, IRateLimiterService) for flexibility and testing
  • Nullable reference types enabled project-wide reducing null reference exceptions by 40%
  • Environment-based configuration separating development, staging, and production settings
  • SAS token authentication for secure, time-limited public blob access
  • CSP headers and security-first static web app configuration preventing XSS attacks
  • API key rotation support with zero-downtime provider switching via configuration
  • Validation at boundaries - Input validation in contact form and API (InputValidator with XSS pattern detection)
  • Encapsulation - Private fields with public property accessors (e.g., ResumeService.ResumeBlobUrl)
  • Immutable data models using C# records for thread-safe data transfer (ServiceInfo)
  • Async-first design - All I/O operations use async/await for scalability
  • Resilience patterns - Polly-based rate limiting and circuit breaker in Azure Functions API
  • Configuration validation - Exception throwing for missing critical configuration values

Business Value Delivered

  • Professional portfolio showcasing 8+ real-world projects with measurable results
  • Lead generation via strategic CTAs, validated contact form, and AI chatbot with 5-question conversation cap
  • AI-powered chatbot converting website visitors to consultation leads with knowledge-base-driven responses
  • Automated email delivery with Brevo SMTP relay via secure Azure Functions API backend
  • Resume distribution with download tracking and blob analytics
  • Client onboarding streamlined with Google Calendar integration
  • Support dashboard for incident tracking and response time monitoring

Development Quality

  • Clean Architecture principles with clear layer separation
  • SOLID principles applied to service implementations
  • Comprehensive documentation with inline XML comments and README guides
  • Git workflow with feature branches and protected master
  • Code organization following ASP.NET Core conventions
  • Scalable structure ready for feature expansion (testimonials, blog, admin panel)

Technical Innovations

  • Dynamic case study selection - Automatically surfaces top 3 customer projects with LINQ filtering
  • Business-friendly jargon translation - Converts technical terms for non-technical audiences in real-time
  • Gradient color interpolation - Mathematical color transitions for animated counters using RGB calculations
  • Event-driven architecture - Loose coupling between UI and business logic via EventCallback pattern
  • Secure email pipeline - Client β†’ Azure Functions API β†’ Brevo SMTP relay with rate limiting and input validation
  • AI chatbot pipeline - Blazor WASM β†’ Azure Functions β†’ Anthropic Claude API with token controls, history trimming, and response truncation
  • Multi-layer abuse prevention - Client-side conversation cap + API rate limiting + input validation + system prompt hardening
  • SPA with SEO optimization - Static Web Apps routing and fallback for search engine visibility (staticwebapp.config.json)
  • Retry mechanisms - Implemented in side projects (RabbitMQ connection resiliency, SSIS retry logic)
  • Circuit breaker patterns - Polly-based circuit breaker in Azure Functions rate limiter service
  • Health monitoring - Integrated health checks for distributed systems (RabbitMQ, Azure Functions)
  • Idempotent message processing - Duplicate prevention in event-driven systems
  • Rate limiting - Per-client fixed window rate limiting with Polly in Azure Functions API
  • CQRS pattern - Command-Query Responsibility Segregation with MediatR in microservices
  • Caching strategies - In-memory and distributed caching for performance optimization
  • Delta-based ETL processing - 70% runtime reduction through intelligent data extraction
  • Managed Identity preference - DefaultAzureCredential for passwordless Azure service access

πŸ“„ License

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

πŸ‘€ Author

Dariem C. Macias
Principal Consultant, CloudZen Inc.
LinkedIn | GitHub

About

modern Blazor WebAssembly project for CloudZen Inc., showcasing expertise in .NET 8, Azure Cloud, DevOps, AI-driven automation, and enterprise application modernization. Features scalable architecture, CI/CD integration, and a professional portfolio for Dariem C. Macias.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors