• .NET
  • The practical implementation of Aspire using Microservices, AI-Agents

    BookWorm

    BookWorm

    BookWorm CI (.NET) BookWorm CI (Keycloakify) Coverage Duplicated Lines (%)

    Open in GitHub Codespaces

    Introduction

    ⭐ BookWorm showcases Aspire in a cloud-native application with AI integration. Built with DDD and VSA, it features multi-agent orchestration and standardized AI tooling through MCP with A2A & AG-UI Protocol support.

    Warning

    Disclaimer: This example is for demo use only. It’s not production-ready and may omit important features.

    Project Goals

    •  Developed a cloud-native application using Aspire
    •  Implemented Vertical Slice Architecture with Domain-Driven Design & CQRS
    •  Enabled service-to-service communication with gRPC
    •  Incorporated various microservices patterns
      •  Utilized outbox and inbox patterns to manage commands and events
      •  Implemented saga patterns for orchestration and choreography
      •  Integrated event sourcing for storing domain events
      •  Implemented a microservices chassis for cross-cutting concerns and service infrastructure
    •  Implemented API versioning and feature flags for flexible application management
    •  Set up AuthN/AuthZ with Keycloak
      •  Used Authorization Code Flow with PKCE for user authentication
      •  Enabled Token Exchange for service-to-service authentication
    •  Implemented caching with HybridCache
    •  Incorporated AI components:
      •  Text embedding with text-embedding-3-large
      •  Integrated chatbot functionality using gpt-4o-mini
      •  Orchestrated multi-agent workflows using Agent Framework
      •  Standardized AI tooling with Model Context Protocol (MCP)
      •  Enabled agent-to-agent communication via A2A Protocol
      •  Supported Agent interactions via AG-UI Protocol
    •  Configured CI/CD with GitHub Actions
    •  Created comprehensive documentation:
      •  Used OpenAPI for REST API & AsyncAPI for event-driven endpoints
      •  Utilized EventCatalog for centralized architecture documentation
    •  Established a testing strategy:
      •  Conducted service unit tests
      •  Implemented snapshot tests
      •  Established architecture testing strategy
      •  Performed load testing with k6
      •  Planned integration tests

    Project Architecture

    Project Architecture

    Getting Started

    Prerequisites

    Note

    • 🤖 Ensure you have an OpenAI API key to use the AI features
    • 📧 Email services use SendGrid in production and Mailpit locally
    • 🐳 Docker Desktop must be running before starting the application

    Run the Application

    Follow these steps to get BookWorm running locally:

    # 1. Clone the repository
    git clone [email protected]:foxminchan/BookWorm.git
    
    # 2. Navigate to the project directory
    cd BookWorm
    
    # 3. Run the application (starts all services)
    just run

    Deploy the Application

    To deploy BookWorm to Azure Container Apps, follow these steps:

    1. Authenticate with Azure:
    az login
    1. Deploy the application:
    aspire deploy
    1. Verify the deployment:

    After deployment completes, get the application URL:

    az containerapp show --name <app-name> --resource-group <resource-group> --query properties.configuration.ingress.fqdn --output tsv

    Replace <app-name> and <resource-group> with the values you specified during deployment.

    1. Clean up resources:

    To remove all deployed resources and avoid charges:

    az group delete --name <resource-group> --yes --no-wait

    Documentation

    For comprehensive project documentation, visit our GitHub Wiki.

    Contribution

    Thanks to all contributors, your help is greatly appreciated!

    Contributions are welcome! Please read the contribution guidelines and code of conduct to learn how to participate.

    Support

    • If you like this project, please give it a ⭐ star.
    • If you have any issues or feature requests, please create an issue.

    License

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

    Github: https://github.com/foxminchan/BookWorm

    Description: https://foxminchan.github.io/BookWorm/

    Để lại một bình luận

    Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

    3 mins