This repository contains step-by-step tutorial samples for building applications with the MBC CQRS Serverless framework.
The samples are organized as progressive steps, each building on the previous one:
| Step | Description | Key Concepts |
|---|---|---|
| step-01-setup | Environment Setup | CLI, Docker, Local Development |
| step-02-create | Create Operation | CommandService.publish(), PK/SK Design |
| step-03-rds-sync | RDS Data Synchronization | IDataSyncHandler, Prisma, DynamoDB Streams |
| step-04-read | Read Operation | DataService.getItem() |
| step-05-search | Search/List Operations | CQRS Query Separation, RDS Search |
| step-06-update-delete | Update & Delete | publishPartialUpdate(), Optimistic Locking |
| step-07-sequence | Sequence Numbers | SequencesService, Auto-incrementing IDs |
| Sample | Description |
|---|---|
| complete/basic | Full Todo application with all features |
| complete/with-task | Todo app + Async Task Processing |
Each step can be run independently:
# Navigate to a step directory
cd step-02-create
# Install dependencies
npm install
# Terminal 1: Start Docker services (DynamoDB, MySQL, etc.)
npm run offline:docker
# Terminal 2: Run database migrations
npm run migrate
# Terminal 3: Start the serverless offline server
npm run offline:sls- Node.js 18+
- Docker and Docker Compose
- AWS CLI (for local development)
- JQ CLI (optional, for debugging)
- Full Documentation: https://mbc-cqrs-serverless.mbc-net.com/
- Tutorial Guide: https://mbc-cqrs-serverless.mbc-net.com/docs/build-todo-app
- API Reference: https://mbc-cqrs-serverless.mbc-net.com/docs/api-reference
These samples use the following MBC CQRS Serverless packages (v1.0.17):
@mbc-cqrs-serverless/core- Core CQRS functionality@mbc-cqrs-serverless/sequence- Sequence number generation@mbc-cqrs-serverless/task- Async task processing@mbc-cqrs-serverless/cli- CLI tools for project scaffolding
A detailed Japanese tutorial series is available:
- Part 1: 環境構築
- Part 2: 書き込み処理追加
- Part 3: RDSデータを反映
- Part 4: 特定のデータの読込
- Part 5: データの検索
- Part 6: データの更新・削除
- Part 7: シーケンス(採番)の実装
Copyright © 2024-2025, Murakami Business Consulting, Inc. https://www.mbc-net.com/
This project and sub projects are under the MIT License.
