-
Notifications
You must be signed in to change notification settings - Fork 70
feat: Add comprehensive Airframe walkthrough documentation #3940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: xerial <57538+xerial@users.noreply.github.com>
docs/airframe-walkthrough.md
Outdated
import wvlet.log.{LogSupport, Logger, LogLevel} | ||
|
||
object ConfigApp extends App with LogSupport { | ||
Logger.init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger.init is unnecessary across the examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed all Logger.init
calls across the examples. Fixed in commit 0eaf268.
docs/airframe-walkthrough.md
Outdated
2023-12-15 10:30:15.125-0800 info [TaskApp] Application initialized successfully - (TaskApp.scala:14) | ||
``` | ||
|
||
## Step 2: Configuration with airframe-config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer recommend using airframe-config. Write examples without using .yml files and airframe-config module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the entire airframe-config section (Step 2) and renumbered subsequent steps. Also removed airframe-config dependency from build.sbt and references from documentation. Fixed in commit 0eaf268.
docs/airframe-walkthrough.md
Outdated
created.title shouldBe "Test Task" | ||
created.description shouldBe "Test Description" | ||
created.completed shouldBe false | ||
created.id should not be empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created.id should not be empty | |
created.id shouldNotBe empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed AirSpec syntax to use created.id shouldNotBe empty
. Fixed in commit 0eaf268.
docs/airframe-walkthrough.md
Outdated
// Should have 2 tasks | ||
val list = service.listTasks() | ||
list.total shouldBe 2 | ||
list.tasks should have size 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list.tasks should have size 2 | |
list.tasks.size == 2 shouldBe true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed AirSpec syntax to use list.tasks.size shouldBe 2
. Fixed in commit 0eaf268.
docs/airframe-walkthrough.md
Outdated
|
||
// Update title | ||
val updated1 = service.updateTask(task.id, UpdateTaskRequest(title = Some("Updated"))) | ||
updated1 should be defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated1 should be defined | |
updated1 shouldBe defined |
AIrSpec has no syntax for should be
use shouldBe
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed AirSpec syntax to use updated1 shouldBe defined
and all other similar assertions to use shouldBe
instead of should be
. Fixed in commit 0eaf268.
…ntax Co-authored-by: xerial <57538+xerial@users.noreply.github.com>
docs/airframe-walkthrough.md
Outdated
3. **Singleton Scoping**: Services can be singletons to share state | ||
4. **Provider Binding**: Complex object creation through provider functions | ||
|
||
## Step 3: Building REST APIs with airframe-http |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's focus on building an RPC service example by removing REST API definitions. Fix the example accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Focused the documentation on RPC service examples by removing the entire REST API section (Step 3) and making RPC Communication the primary approach. Updated all examples to use RPC consistently, removed duplicate CLI section, and renumbered steps accordingly. Fixed in commit e5e7cb4.
Co-authored-by: xerial <57538+xerial@users.noreply.github.com>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. |
build.sbt doesn't have sbt-airframe setting for generating RPC client:
and
server and client modules will need the above sbt settings. See also https://wvlet.org/airframe/docs/airframe-rpc#sbt-airframe-plugin for the usage of RPC client generator |
Co-authored-by: xerial <57538+xerial@users.noreply.github.com>
... Added the missing sbt-airframe plugin configuration to server, client, and cli modules:
This enables the plugin to generate the |
Summary
This PR addresses the need for comprehensive walkthrough documentation that shows how Airframe modules work together to build complete applications. Previously, the documentation consisted of isolated module guides that didn't demonstrate the integrated ecosystem.
What's New
📚 New Comprehensive Walkthrough:
docs/airframe-walkthrough.md
A step-by-step tutorial that builds a complete Task Management Application demonstrating:
Key Features
Navigation Updates
Example Structure
The walkthrough progressively builds features:
Impact
This transforms the learning experience from studying isolated modules to understanding how Airframe enables rapid development of type-safe, cross-platform applications. Users can now see the "big picture" of how modules complement each other.
Fixes #2169.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.