πΌ Sample ApplicationsΒΆ
Comprehensive sample applications that demonstrate real-world implementation of the Neuroglia framework. Each sample showcases different architectural patterns, integration scenarios, and business domains to provide practical guidance for building production-ready systems.
οΏ½ Featured SamplesΒΆ
οΏ½π¦ OpenBank - Event Sourcing Banking SystemΒΆ
A complete banking system demonstrating Event Sourcing, CQRS, and Domain-Driven Design patterns for financial applications.
What You'll Learn:
- Complete event sourcing with KurrentDB (EventStoreDB)
- CQRS with separate write and read models
- Domain-driven design with rich aggregates
- Read model reconciliation and eventual consistency
- Snapshot strategy for aggregate performance
- Complex financial domain modeling
Best For:
- π¦ Financial systems requiring complete audit trails
- π Applications needing time-travel debugging
- π Audit-critical systems (compliance, regulations)
- πΌ Complex business rules with event replay
- π Systems with eventual consistency requirements
Technology Stack:
- KurrentDB (EventStoreDB) for event persistence
- MongoDB for read models
- FastAPI for REST APIs
- CloudEvents for integration
- Comprehensive domain events
Complexity Level: π΄ Advanced - Requires understanding of event sourcing and CQRS patterns
β Explore OpenBank Documentation
π¨ Simple UI - SubApp Pattern with JWT AuthenticationΒΆ
A modern single-page application demonstrating SubApp architecture, stateless JWT authentication, and role-based access control.
What You'll Learn:
- FastAPI SubApp mounting for UI/API separation
- Stateless JWT authentication architecture
- Role-based access control (RBAC) at application layer
- Bootstrap 5 frontend integration
- Parcel bundler for modern JavaScript
- Clean separation between UI and API concerns
Best For:
- π₯οΈ Internal dashboards and admin tools
- π Task management applications
- π¨ Content management systems
- π₯ Applications requiring role-based permissions
- π Systems needing stateless authentication
Technology Stack:
- FastAPI SubApp pattern
- JWT for stateless authentication
- Bootstrap 5 for responsive UI
- Parcel for asset bundling
- localStorage for client-side token storage
Complexity Level: π‘ Intermediate - Good introduction to authentication and RBAC
β Explore Simple UI Documentation
π Production-Ready ExamplesΒΆ
οΏ½ Mario's Pizzeria - Order Management SystemΒΆ
Tutorial Sample - A friendly introduction to Neuroglia framework through a pizza restaurant order management system. Perfect for learning CQRS, mediator pattern, and basic microservice architecture.
π― Use Cases: Learning the framework, order management, small business systems
π Key Patterns: CQRS commands/queries, mediator, background services
οΏ½ Complexity: Beginner-Friendly
π API Gateway - Microservice OrchestrationΒΆ
Demonstrates microservice coordination, request routing, and cross-cutting concerns like authentication, rate limiting, and monitoring.
Domain Focus:
- Service discovery and routing
- Authentication and authorization
- Request/response transformation
- Circuit breaker patterns
Key Patterns:
- Gateway aggregation pattern
- Service mesh integration
- Distributed tracing
- Health check orchestration
Technology Stack:
- FastAPI for gateway implementation
- Redis for caching and rate limiting
- Prometheus for metrics
- Distributed logging
π₯οΈ Desktop Controller - Background ServicesΒΆ
Shows how to build background services that interact with system resources, handle long-running operations, and manage desktop environments.
Domain Focus:
- System resource management
- Process orchestration
- File system operations
- Desktop environment control
Key Patterns:
- Background service patterns
- Resource locking mechanisms
- Process lifecycle management
- System integration patterns
Technology Stack:
- Background service hosting
- File system watchers
- System API integration
- Inter-process communication
οΏ½ Learning PathsΒΆ
π Quick Start (1-2 Hours)ΒΆ
Perfect for understanding core Neuroglia concepts quickly:
- π Mario's Pizzeria Tutorial - Start here to learn CQRS and mediator patterns
- Try creating orders via REST API and observe command/query separation
- Explore background service implementation for order processing
ποΈ Intermediate (Half Day)ΒΆ
Build on basics with authentication and UI integration:
- Complete Quick Start path
- π¨ Simple UI Sample - Understand SubApp pattern and JWT authentication
- RBAC & Authorization Guide - Implement role-based access control
- Build a custom authenticated endpoint with permission checking
π Advanced (1-2 Days)ΒΆ
Master event sourcing and distributed patterns:
- Complete Intermediate path
- π¦ OpenBank Sample - Deep dive into event sourcing with KurrentDB
- Study read model reconciliation and snapshot strategies
- Experiment with time-travel debugging using event replay
- Explore API Gateway and Desktop Controller patterns
- Build a custom event-sourced aggregate with projections
π Getting Started with SamplesΒΆ
Quick Start GuideΒΆ
- Choose Your Domain: Select the sample that matches your use case
- Review Architecture: Understand the patterns and structure
- Run Locally: Follow setup instructions for local development
- Explore Code: Study the implementation details
- Adapt and Extend: Customize for your specific needs
π§ͺ Development and TestingΒΆ
Local Development SetupΒΆ
Each sample includes:
- Docker Compose: Complete local environment
- Development Scripts: Build, test, and run commands
- Database Migrations: Schema and data setup
- Mock Services: External dependency simulation
Testing StrategiesΒΆ
graph LR
A[Unit Tests<br/>π§ͺ Components] --> B[Integration Tests<br/>π Services]
B --> C[End-to-End Tests<br/>π― Workflows]
C --> D[Performance Tests<br/>β‘ Load Testing]
style A fill:#e8f5e8
style B fill:#e3f2fd
style C fill:#fff3e0
style D fill:#f3e5f5
Deployment OptionsΒΆ
- Local Development: Docker Compose environments
- Cloud Deployment: Kubernetes manifests and Helm charts
- CI/CD Pipelines: GitHub Actions and Jenkins examples
- Monitoring Setup: Observability and logging configuration
π Sample Comparison MatrixΒΆ
| Feature | Mario's Pizzeria |
Simple UI | OpenBank | API Gateway | Desktop Controller |
|---|---|---|---|---|---|
| Complexity | οΏ½ Beginner | π‘ Intermediate | οΏ½π΄ Advanced | π‘ Intermediate | οΏ½ Intermediate |
| Domain | Food Service | UI + Auth | Financial | Integration | System Resources |
| Architecture | CQRS + Mediator | SubApp + JWT | Event Sourcing | Gateway Pattern | Background Services |
| Storage | In-Memory | JWT + localStorage | EventStore + Mongo | Redis + SQL | File System |
| Best For | Learning Framework | Auth & RBAC | Audit Trails | Microservices | IoT & Devices |
| Learning Time | 1-2 hours | Half day | 1-2 days | Half day | Half day |
π Learning OutcomesΒΆ
What You'll LearnΒΆ
- Real-world Implementation: See patterns in action
- Best Practices: Production-ready code examples
- Testing Strategies: Comprehensive test coverage
- Deployment Patterns: Multiple deployment scenarios
- Performance Optimization: Scalability considerations
Skills DevelopedΒΆ
- Architecture Design: Pattern selection and implementation
- Domain Modeling: Business logic representation
- Integration Patterns: External system coordination
- Testing Mastery: Test strategy development
- Operations Knowledge: Deployment and monitoring
π Related DocumentationΒΆ
- π― Architecture Patterns - Foundational design patterns
- π Framework Features - Detailed feature documentation
- π RBAC & Authorization Guide - Comprehensive authorization patterns
- π Getting Started - Framework introduction with sample exploration
Each sample application is production-ready and includes comprehensive documentation, tests, and deployment guides. They serve as both learning resources and starting templates for your own applications.