Skip to content

Next Steps

TL;DR: You’ve completed the getting started guides! Here’s your roadmap to becoming a Banyan Platform expert.

You’ve successfully:

  • ✅ Set up your development environment
  • ✅ Created your first microservice
  • ✅ Called APIs using REST, GraphQL, and WebSocket
  • ✅ Understood how the platform auto-generates APIs

What’s next? This guide provides a learning path tailored to your goals.

BEGINNER INTERMEDIATE ADVANCED
───────────────────────────────────────────────────────
Getting Started → Tutorials → Advanced Guides
(You are here!) Build real apps Deep platform features
↓ ↓ ↓
Concepts Patterns Architecture
Understand how Best practices Design decisions
it works & conventions & optimization

Recommended Path:

  1. Tutorial: Building a User Service (30 min)

    • Add query handlers
    • Implement event sourcing
    • Add read models
    • Test your service
  2. Tutorial: Event-Driven Communication (45 min)

    • Subscribe to events from other services
    • Publish domain events
    • Build event handlers
    • Handle event failures
  3. Guide: Testing Handlers (30 min)

    • Write unit tests
    • Test with message bus
    • Mock dependencies
    • Achieve 90%+ coverage

Learning Outcomes:

  • Build production-ready services
  • Understand event-driven architecture
  • Write comprehensive tests
  • Follow platform best practices

Recommended Path:

  1. Concept: Service Architecture (15 min)

    • How services are structured
    • Handler discovery mechanism
    • Message bus communication
    • Service lifecycle
  2. Concept: Contract System (20 min)

    • Type-safe service contracts
    • Validation and permissions
    • API generation
    • Contract versioning
  3. Concept: Event Sourcing (25 min)

    • Event store fundamentals
    • Aggregates and domain events
    • Projections and read models
    • Event replay

Learning Outcomes:

  • Understand architectural decisions
  • Know when to use each pattern
  • Make informed design choices
  • Debug issues effectively

Recommended Path:

  1. Guide: Event Sourcing with Aggregates (45 min)

    • Create aggregates
    • Handle commands
    • Emit domain events
    • Maintain consistency
  2. Guide: Cross-Service Communication (30 min)

    • Create service clients
    • Call other services
    • Handle failures
    • Circuit breakers
  3. Guide: Authorization Policies (35 min)

    • Two-layer authorization
    • Permission-based rules
    • Policy-based logic
    • Custom policies

Learning Outcomes:

  • Implement complex business logic
  • Build distributed systems
  • Add security controls
  • Handle failures gracefully

Recommended Path:

  1. Guide: Production Configuration (25 min)

    • Environment variables
    • Secrets management
    • Health checks
    • Graceful shutdown
  2. Guide: Monitoring and Observability (40 min)

    • Distributed tracing
    • Metrics collection
    • Log aggregation
    • Alerting
  3. Guide: Deployment Strategies (50 min)

    • Docker containers
    • Kubernetes deployment
    • Service discovery
    • Rolling updates

Learning Outcomes:

  • Configure services for production
  • Monitor system health
  • Deploy reliably
  • Troubleshoot in production

Here are the most common things developers do after the getting started guides:

Create a handler to read data:

service/src/queries/GetUserHandler.ts
import { QueryHandler, QueryHandlerDecorator } from '@banyanai/platform-base-service';
import { GetUserQuery, type UserResult } from '@myorg/my-service-contracts';
@QueryHandlerDecorator(GetUserQuery)
export class GetUserHandler extends QueryHandler<GetUserQuery, UserResult> {
constructor() {
super();
}
async handle(query: GetUserQuery): Promise<UserResult> {
// Read from database or read model
return {
userId: query.userId,
email: 'user@example.com',
firstName: 'John',
lastName: 'Doe',
};
}
}

Learn more: Handler Patterns Guide


Store events instead of current state:

service/src/domain/UserAggregate.ts
import { Aggregate, ApplyEvent } from '@banyanai/platform-event-sourcing';
import { UserCreatedEvent, UserUpdatedEvent } from '@myorg/my-service-contracts';
export class UserAggregate extends Aggregate {
private email: string = '';
private firstName: string = '';
private lastName: string = '';
createUser(email: string, firstName: string, lastName: string): void {
this.applyEvent(new UserCreatedEvent({
userId: this.id,
email,
firstName,
lastName,
createdAt: new Date(),
}));
}
@ApplyEvent(UserCreatedEvent)
onUserCreated(event: UserCreatedEvent): void {
this.email = event.email;
this.firstName = event.firstName;
this.lastName = event.lastName;
}
}

Learn more: Event Sourcing Guide


React to events from other services:

service/src/subscriptions/UserCreatedHandler.ts
import { EventSubscriptionHandler, EventSubscriptionHandlerDecorator } from '@banyanai/platform-base-service';
import { UserCreatedEvent } from '@other-service/contracts';
import { Logger } from '@banyanai/platform-telemetry';
@EventSubscriptionHandlerDecorator(UserCreatedEvent)
export class UserCreatedHandler extends EventSubscriptionHandler<UserCreatedEvent> {
constructor() {
super();
}
async handle(event: UserCreatedEvent): Promise<void> {
Logger.info('User created in other service', { userId: event.userId });
// React to event - send welcome email, create profile, etc.
}
}

Learn more: Event-Driven Communication Tutorial


Use service clients for cross-service communication:

service/src/clients/NotificationServiceClient.ts
import { ServiceClient } from '@banyanai/platform-client-system';
import { SendEmailCommand } from '@notification-service/contracts';
export class NotificationServiceClient extends ServiceClient {
async sendWelcomeEmail(userId: string, email: string): Promise<void> {
await this.sendCommand(SendEmailCommand, {
to: email,
subject: 'Welcome!',
body: `Welcome user ${userId}!`,
});
}
}
// Use in handler
@CommandHandlerDecorator(CreateUserCommand)
export class CreateUserHandler extends CommandHandler<CreateUserCommand, CreateUserResult> {
constructor(
private readonly notifications: NotificationServiceClient
) {
super();
}
async handle(command: CreateUserCommand): Promise<CreateUserResult> {
const userId = `user-${Date.now()}`;
// Call notification service
await this.notifications.sendWelcomeEmail(userId, command.email);
return { userId, email: command.email, createdAt: new Date().toISOString() };
}
}

Learn more: Service Clients Guide


You’re ready for intermediate topics when you can:

  • Create services with commands and queries
  • Call APIs using REST/GraphQL/WebSocket
  • Write basic tests for handlers
  • Understand service contracts

Focus on:

  • Event sourcing patterns
  • Cross-service communication
  • Read models and projections
  • Testing strategies

Recommended: Complete all tutorials in Tutorials section


You’re ready for advanced topics when you can:

  • Build event-sourced aggregates
  • Implement cross-service workflows
  • Write comprehensive tests
  • Deploy services to Docker

Focus on:

  • Saga patterns for distributed transactions
  • Advanced authorization policies
  • Performance optimization
  • Production monitoring

Recommended: Deep dive into Advanced Guides


Here’s how the documentation is organized:

Quick guides to get you productive fast

  • Installation
  • Your First Service
  • Calling APIs
  • Next Steps

Step-by-step guides to build real features

  • Building a User Service
  • Event-Driven Communication
  • Adding Authentication
  • Implementing Sagas

Understanding how the platform works

  • Service Architecture
  • Contract System
  • Event Sourcing
  • Message Bus
  • Authorization

How to accomplish specific tasks

  • Handler Patterns
  • Testing Handlers
  • Service Clients
  • Event Sourcing with Aggregates
  • Production Configuration

Complete API documentation

  • REST Endpoints
  • GraphQL Schema
  • WebSocket Protocol
  • Platform Packages

Common issues and solutions

  • Common Errors
  • Debugging Guide
  • Performance Issues

  1. ✅ Getting Started (completed!)
  2. Concept: Service Architecture
  3. Tutorial: Building a User Service
  4. Guide: Testing Handlers

Goal: Build and test a complete CRUD service


  1. Concept: Event Sourcing
  2. Tutorial: Event-Driven Communication
  3. Guide: Event Sourcing with Aggregates
  4. Guide: Read Models

Goal: Build event-sourced services that communicate


  1. Concept: Message Bus
  2. Guide: Service Clients
  3. Tutorial: Implementing Sagas
  4. Guide: Error Handling

Goal: Build distributed workflows across services


  1. Concept: Authorization
  2. Guide: Production Configuration
  3. Guide: Monitoring and Observability
  4. Guide: Deployment Strategies

Goal: Deploy services to production


Bookmark these for frequent reference:

Terminal window
# Start development environment
docker compose up -d
pnpm run dev
# Run tests
pnpm run test
# Type checking
pnpm run type-check
# Quality checks before commit
./platform/scripts/quality-check-all.sh
// Base service
import { BaseService } from '@banyanai/platform-base-service';
import { CommandHandler, QueryHandler, EventSubscriptionHandler } from '@banyanai/platform-base-service';
import { CommandHandlerDecorator, QueryHandlerDecorator, EventSubscriptionHandlerDecorator } from '@banyanai/platform-base-service';
// Contracts
import { Command, Query, Event } from '@banyanai/platform-contract-system';
// Event sourcing
import { Aggregate, ApplyEvent } from '@banyanai/platform-event-sourcing';
// Logging
import { Logger } from '@banyanai/platform-telemetry';
// Types
import type { AuthenticatedUser } from '@banyanai/platform-core';

Command Handler:

@CommandHandlerDecorator(MyCommand)
export class MyCommandHandler extends CommandHandler<MyCommand, MyResult> {
async handle(command: MyCommand, user: AuthenticatedUser | null): Promise<MyResult> {
// Business logic
}
}

Query Handler:

@QueryHandlerDecorator(MyQuery)
export class MyQueryHandler extends QueryHandler<MyQuery, MyResult> {
async handle(query: MyQuery): Promise<MyResult> {
// Read data
}
}

Event Handler:

@EventSubscriptionHandlerDecorator(MyEvent)
export class MyEventHandler extends EventSubscriptionHandler<MyEvent> {
async handle(event: MyEvent): Promise<void> {
// React to event
}
}

  • GitHub Issues - Bug reports and feature requests
  • GitHub Discussions - Questions and community help
  • Stack Overflow - Tag questions with banyan-platform

Focus on these habits:

  • Run tests frequently (pnpm run test)
  • Use hot-reload during development (pnpm run dev)
  • Check types before committing (pnpm run type-check)
  • Read error messages carefully (they’re helpful!)
  • Use GraphiQL to explore APIs (http://localhost:3003/graphql)
  • View traces in Jaeger (http://localhost:16686)
  • Write infrastructure code (platform handles it)
  • Use HTTP/REST inside services (use message bus)
  • Skip tests (90% coverage required)
  • Commit without running quality checks
  • Use any types (use strict TypeScript)
  • Ignore TypeScript errors (fix them!)

This is a living platform - your feedback shapes it!

Found an issue in the docs?

  • Submit a pull request
  • Open an issue on GitHub
  • Suggest improvements

Want a feature?

  • Check if it’s already planned
  • Describe your use case
  • Contribute if you can!

Built something cool?

  • Share in GitHub Discussions
  • Write a blog post
  • Contribute examples

You now have:

  • ✅ A working development environment
  • ✅ Your first microservice running
  • ✅ Knowledge of how to call APIs
  • ✅ A learning path to follow
  • ✅ Resources to reference

Pick your next step from above and start building!

The platform handles all the infrastructure complexity - you focus on solving business problems.


Happy building! 🚀