Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save object1985/03478537974b687233a5e1caeb8b7d89 to your computer and use it in GitHub Desktop.
Save object1985/03478537974b687233a5e1caeb8b7d89 to your computer and use it in GitHub Desktop.
mermaidシーケンス図サンプル
sequenceDiagram
    title ログインサンプル
    participant User
    participant ログイン処理

    User->>ログイン処理: ログインフォームを表示
    ログイン処理-->>User: ログインフォームを返す

    User->>ログイン処理: ユーザー名とパスワードを送信
    ログイン処理->>+Authentication Server: 認証情報を検証
    Authentication Server-->>-ログイン処理: 認証情報の検証結果を返す

    alt 認証成功
        ログイン処理-->>User: ログイン成功メッセージを返す
        User->>ログイン処理: ログイン後のページにリダイレクト
    else 認証失敗
        ログイン処理-->>User: 認証失敗メッセージを返す
    end
sequenceDiagram
	title 商品一覧検索
	participant User
	participant WebBrowser
	participant WebServer
	participant ApplicationServer
	participant Database

	User->>WebBrowser: 商品一覧画面のURLをリクエストする
	WebBrowser->>WebServer: 商品一覧画面のHTMLを取得する
	WebServer->>ApplicationServer: 商品一覧画面のデータを要求する
	ApplicationServer->>Database: 商品データを検索する
	Database-->>ApplicationServer: 商品データを返す
	ApplicationServer->>WebServer: 商品一覧画面のHTMLを生成する
	WebServer->>WebBrowser: 商品一覧画面のHTMLを返す
	User->>WebBrowser: 商品を検索する
	WebBrowser->>WebServer: 商品検索のリクエストを送信する
	WebServer->>ApplicationServer: 商品検索のリクエストを転送する
	ApplicationServer->>Database: 商品検索のクエリを実行する
	Database-->>ApplicationServer: 商品検索結果を返す
	ApplicationServer->>WebServer: 商品検索結果を処理する
	WebServer->>WebBrowser: 商品検索結果を表示する
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment