Skip to content

Conversation

amansinghoriginal
Copy link
Member

@amansinghoriginal amansinghoriginal commented Aug 16, 2025

Add tutorial for Dapr + Drasi E-Commerce Scenario

Summary

Adds a complete e-commerce sample demonstrating how Drasi enhances Dapr microservices with real-time, cross-service data change processing. Originally presented at Dapr Community Call #123. This also has devcontainer and scripts, which allows it to be run in 4 environments:

  • GitHub Codespaces
  • VSCode DevContainers
  • Local Setup on Mac/Linux
  • Local Setup on Windows

What's New

  • 4 Dapr Microservices: Products, Customers, Orders, Reviews (each with PostgreSQL state store)
  • 3 Drasi-Powered Services: Catalog (materialized view), Dashboard (real-time monitoring), Notifications (intelligent events)
  • Drasi Components: 4 sources, 5 continuous queries, 3 reactions
  • Interactive Demos: 3 shell scripts demonstrating each Drasi reaction

File Structure

tutorial/dapr/
├── README.md               # Documentation
├── Makefile                       
├── demo/                          # Interactive demonstration scripts
│   ├── demo-catalogue-service.sh
│   ├── demo-dashboard-service.sh
│   └── demo-notifications-service.sh
├── drasi/                         # Drasi configuration
│   ├── sources/                   # 4 PostgreSQL sources
│   │   ├── products.yaml
│   │   ├── customers.yaml
│   │   ├── orders.yaml
│   │   └── reviews.yaml
│   ├── queries/                   # 5 continuous queries
│   │   ├── product-catalogue.yaml
│   │   ├── delayed-gold-orders.yaml
│   │   ├── at-risk-orders.yaml
│   │   ├── low-stock-event.yaml
│   │   └── critical-stock-event.yaml
│   └── reactions/                 # 3 reaction types
│       ├── sync-dapr-statestore.yaml
│       ├── signalr-reaction.yaml
│       └── post-dapr-pubsub.yaml
└── services/                      # 7 microservices
    ├── products/                  # Core Dapr service
    ├── customers/                 # Core Dapr service
    ├── orders/                    # Core Dapr service
    ├── reviews/                   # Core Dapr service
    ├── catalogue/                 # Drasi-powered (React + Python)
    ├── dashboard/                 # Drasi-powered (React)
    └── notifications/             # Drasi-powered (Python + React UI)

@amansinghoriginal amansinghoriginal requested a review from a team as a code owner August 16, 2025 21:36
Copy link
Contributor

@ruokun-niu ruokun-niu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we planning to add a dev container option for this sample app

@danielgerlag danielgerlag requested a review from Copilot August 21, 2025 00:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive e-commerce sample application demonstrating how Drasi enhances Dapr microservices with real-time, cross-service data change processing. It includes 4 core Dapr microservices (Products, Customers, Orders, Reviews) with PostgreSQL state stores, and 3 Drasi-powered services (Catalog, Dashboard, Notifications) featuring 4 sources, 5 continuous queries, and 3 reaction types.

Key Changes

  • Complete microservice architecture: 7 services with their own APIs, database configuration, and setup scripts
  • Drasi integration: Comprehensive configuration for real-time data change detection and processing
  • Rich notification system: WebSocket-enabled dashboard with React UI and animated email notifications

Reviewed Changes

Copilot reviewed 138 out of 142 changed files in this pull request and generated 1 comment.

File Description
Reviews Service RESTful API for managing customer reviews with CRUD operations, test scripts, and PostgreSQL integration
Products Service Product catalog management with stock operations, threshold monitoring, and comprehensive API testing
Orders Service Order lifecycle management with status transitions, validation rules, and multi-item support
Notifications Service Real-time notification system with WebSocket UI, Redis pub/sub, and animated dashboard components
Comments suppressed due to low confidence (2)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@amansinghoriginal
Copy link
Member Author

Are we planning to add a dev container option for this sample app

Yes, will add that as a separate PR.

Signed-off-by: Aman Singh <[email protected]>
@amansinghoriginal amansinghoriginal changed the title Add Dapr + Drasi E-Commerce Sample Applications Add Tutorial for Dapr + Drasi E-Commerce Scenario Aug 22, 2025
@amansinghoriginal amansinghoriginal merged commit f4d56df into drasi-project:main Aug 22, 2025
1 check passed
@amansinghoriginal amansinghoriginal deleted the dapr3 branch August 22, 2025 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants