Skip to content

Tutorials

🎯 Goal: Build real features while learning platform concepts through hands-on practice

This section contains step-by-step tutorials that guide you through building real features with the Banyan platform. Each tutorial builds working code and explains key concepts as you progress.

Your Tutorial Journey
────────────────────────────────────────────────────────────────────────────────
🟒 BEGINNER (0-1 week experience) ⏱️ Total: 6 hours
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚
β”‚ Week 1: Core Patterns β”‚
β”‚ β”œβ”€ Todo Service (90min) β†’ Basic CRUD operations β”‚
β”‚ β”œβ”€ User Management (2hrs) β†’ Authentication patterns β”‚
β”‚ └─ Blog Platform (3hrs) β†’ Complete application β”‚
β”‚ β”‚
β”‚ βœ“ Commands, queries, and events β”‚
β”‚ βœ“ Handler auto-discovery β”‚
β”‚ βœ“ Basic testing patterns β”‚
β”‚ βœ“ API Gateway integration β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
🟑 INTERMEDIATE (1-4 weeks experience) ⏱️ Total: 9 hours
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚
β”‚ Weeks 2-4: Advanced Patterns β”‚
β”‚ β”œβ”€ Event-Sourced Orders (4hrs) β†’ Event sourcing deep dive β”‚
β”‚ β”œβ”€ Multi-Service Workflow (3hrs) β†’ Service integration β”‚
β”‚ └─ Real-Time Notifications (2hrs)β†’ WebSocket subscriptions β”‚
β”‚ β”‚
β”‚ βœ“ Event store and aggregates β”‚
β”‚ βœ“ Read model projections β”‚
β”‚ βœ“ Service-to-service communication β”‚
β”‚ βœ“ Two-layer authorization β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
πŸ”΄ ADVANCED (1+ months experience) ⏱️ Total: 14 hours
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚
β”‚ Month 2+: Enterprise Patterns β”‚
β”‚ β”œβ”€ Saga Orchestration (6hrs) β†’ Distributed transactions β”‚
β”‚ β”œβ”€ Custom Read Models (4hrs) β†’ Performance optimization β”‚
β”‚ └─ Platform Extensions (4hrs) β†’ Custom infrastructure β”‚
β”‚ β”‚
β”‚ βœ“ Saga pattern implementation β”‚
β”‚ βœ“ Custom projections and indexes β”‚
β”‚ βœ“ Performance tuning β”‚
β”‚ βœ“ Platform extension points β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Basic CRUD operations β†’ Todo Service (90 min, 🟒 Beginner)

  • Create, read, update, delete operations
  • Command and query handlers
  • Basic validation

User authentication β†’ User Management (2 hrs, 🟒 Beginner)

  • User registration and login
  • Password hashing
  • JWT token generation

Complete application β†’ Blog Platform (3 hrs, 🟒 Beginner)

  • Posts, comments, and categories
  • Multi-entity relationships
  • Full CRUD workflows

Event sourcing β†’ Event-Sourced Orders (4 hrs, 🟑 Intermediate)

  • Event store implementation
  • Aggregate root pattern
  • Event replay and projections

Service integration β†’ Multi-Service Workflow (3 hrs, 🟑 Intermediate)

  • Service-to-service calls
  • Generated service clients
  • Error handling across services

Real-time features β†’ Real-Time Notifications (2 hrs, 🟑 Intermediate)

  • WebSocket subscriptions
  • Event broadcasting
  • Real-time UI updates

Distributed transactions β†’ Saga Orchestration (6 hrs, πŸ”΄ Advanced)

  • Saga pattern implementation
  • Compensation logic
  • Long-running workflows

Performance optimization β†’ Custom Read Models (4 hrs, πŸ”΄ Advanced)

  • Custom projection strategies
  • Database indexing
  • Caching patterns

Platform customization β†’ Platform Extensions (4 hrs, πŸ”΄ Advanced)

  • Custom decorators
  • Middleware integration
  • Infrastructure extension points
TutorialTimeFocusPrerequisites
Todo Service90 minCRUD operations, basic handlersGetting Started completed
User Management2 hrsAuthentication, password handlingTodo Service
Blog Platform3 hrsMulti-entity app, relationshipsUser Management

Total beginner path: 6 hours

TutorialTimeFocusPrerequisites
Event-Sourced Orders4 hrsEvent sourcing, aggregatesAll beginner tutorials
Multi-Service Workflow3 hrsService integrationEvent-Sourced Orders
Real-Time Notifications2 hrsWebSocket, subscriptionsMulti-Service Workflow

Total intermediate path: 9 hours

TutorialTimeFocusPrerequisites
Saga Orchestration6 hrsDistributed transactionsAll intermediate tutorials
Custom Read Models4 hrsPerformance, projectionsSaga Orchestration
Platform Extensions4 hrsCustom infrastructureCustom Read Models

Total advanced path: 14 hours

Never used Banyan? β†’ Start with 🟒 Beginner tutorials

Completed Getting Started? β†’ Try Todo Service first

Understand CQRS basics? β†’ Jump to 🟑 Intermediate tutorials

Production experience? β†’ Explore πŸ”΄ Advanced tutorials

πŸ’‘ Best Practice: Type code yourself instead of copying/pasting for better retention

Recommended approach:

  1. Read the entire tutorial introduction first
  2. Follow steps in order without skipping
  3. Test after each major section
  4. Complete the checkpoint exercises
  5. Review the β€œWhat You Built” summary
  • Experiment: Try variations to see what happens
  • Break things: Understanding errors deepens learning
  • Complete exercises: Practice reinforces concepts
  • Check solutions: Compare your work with provided examples

Beginner milestones:

  • βœ… Create command handlers
  • βœ… Create query handlers
  • βœ… Handle domain events
  • βœ… Test via message bus

Intermediate milestones:

  • βœ… Implement event sourcing
  • βœ… Build read model projections
  • βœ… Integrate multiple services
  • βœ… Add authorization policies

Advanced milestones:

  • βœ… Orchestrate sagas
  • βœ… Optimize read performance
  • βœ… Extend platform capabilities
  • βœ… Handle production scenarios

Every tutorial follows the same structure for consistency:

1. Introduction
└─ What you'll build
└─ What you'll learn
└─ Time estimate
2. Prerequisites
└─ Required knowledge
└─ Required tutorials
└─ Required setup
3. Learning Objectives
└─ Skills you'll gain
└─ Concepts you'll understand
4. Step-by-Step Instructions
└─ Numbered steps
└─ Code examples
└─ Explanations
└─ Checkpoints
5. What You Built
└─ Summary of accomplishments
└─ Diagram of architecture
6. Exercises
└─ Practice challenges
└─ Extension ideas
7. Next Steps
└─ Related tutorials
└─ Recommended reading

If you get stuck during a tutorial:

Every tutorial includes verification steps to ensure you’re on track. If a checkpoint fails, review the previous section.

  • Concepts: Understand the β€œwhy” β†’ Concepts
  • Guides: Quick how-to reference β†’ Guides
  • Reference: API specifications β†’ Reference
Terminal window
# View service logs
docker compose logs -f service-name
# Check distributed traces
open http://localhost:16686
# Inspect message bus
open http://localhost:15672

Every tutorial concept has a complete working example β†’ Examples

Time: 10 hours over 2 weeks

Week 1: Foundations
β”œβ”€ Todo Service (90min)
β”œβ”€ User Management (2hrs)
└─ Blog Platform (3hrs)
Week 2: Advanced Patterns
β”œβ”€ Event-Sourced Orders (4hrs)
└─ Multi-Service Workflow (3hrs)

Time: 13 hours over 3 weeks

Week 1: Backend Basics
β”œβ”€ Todo Service (90min)
β”œβ”€ User Management (2hrs)
└─ Blog Platform (3hrs)
Week 2: Real-Time Features
β”œβ”€ Event-Sourced Orders (4hrs)
└─ Real-Time Notifications (2hrs)
Week 3: Integration
└─ Multi-Service Workflow (3hrs)

Time: 20 hours over 4 weeks

Weeks 1-2: All Beginner + Intermediate (15hrs)
Weeks 3-4: Advanced
β”œβ”€ Saga Orchestration (6hrs)
β”œβ”€ Custom Read Models (4hrs)
└─ Platform Extensions (4hrs)

βœ… Prerequisites: Completed Getting Started (35 minutes)

πŸ”§ Setup: Platform running via docker compose up

⏱️ Time: Block uninterrupted time for each tutorial

πŸ’‘ Tip: Keep the Quick Reference open while coding


Ready to build? β†’ Start with Todo Service (90 minutes, 🟒 Beginner)