Skip to content

Conversation

@derberg
Copy link
Member

@derberg derberg commented Oct 16, 2025

no more adopters, now we have one files with use cases and companies that do these use cases.

ui and tests aligned.

this is critical pr for @Shriya-Chauhan and new things she's doing to landing page

@Shriya-Chauhan you have 7 use cases but on landing page 6 are completely enough

old: https://www.asyncapi.com/casestudies
new: https://deploy-preview-4486--asyncapi-website.netlify.app/casestudies

Summary by CodeRabbit

  • New Features

    • Added comprehensive use case catalog showcasing AsyncAPI adoption across multiple organizations with detailed resources.
  • Refactor

    • Reorganized case studies section to reflect new use case data structure and presentation model.
    • Updated internal build process to generate data from the new configuration format.
  • Chores

    • Added JSON schema dereferencing dependency for enhanced data processing.

@netlify
Copy link

netlify bot commented Oct 16, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit dd57d43
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6900d2712871d80008d9b2b0
😎 Deploy Preview https://deploy-preview-4486--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Walkthrough

Replaces the adopters pipeline with a usecases pipeline: adds config/usecases.yaml, removes config/adopters.yml and its script, updates build scripts and tests to use buildUsecasesList, updates frontend casestudies to read usecases.json, adjusts JSON write helper to dereference refs, updates .gitignore, and adds a devDependency.

Changes

Cohort / File(s) Summary
Config — new usecases & removed adopters
config/usecases.yaml, config/adopters.yml
Adds config/usecases.yaml (catalog of AsyncAPI use cases with a ~20-item data section containing resources entries using type/url). Removes config/adopters.yml and its adopter entries.
Ignore list
.gitignore
Replaces ignored path config/adopters.json with config/usecases.json.
Build scripts
scripts/usecases/index.ts, scripts/adopters/index.ts (deleted), scripts/index.ts
Adds buildUsecasesList() converting config/usecases.yamlconfig/usecases.json; deletes scripts/adopters/index.ts; updates scripts/index.ts to call buildUsecasesList() instead of the removed adopters builder.
Helper — JSON write & dereference
scripts/helpers/readAndWriteJson.ts
Changes writeJSON signature to (readPath, writePath, dereference = false): Promise<void), adds @apidevtools/json-schema-ref-parser import, and dereferences $ref before writing output (currently performed unconditionally).
Frontend data model & page
pages/casestudies/index.tsx
Switches data source from adopters.jsonusecases.json; updates field names (companyNamename, useCasedescription, title/linktype/url), rendering, and link targets to usecases assets.
Tests
tests/index.test.ts, tests/usecases/index.test.ts
Replace adopters-related imports/expectations with usecases equivalents; update expected filenames (usecases.yaml/usecases.json), function buildUsecasesList, and adjust writeJSON call to include the dereference boolean.
Package manifest
package.json
Adds devDependency @apidevtools/json-schema-ref-parser ^14.2.1.

Sequence Diagram(s)

sequenceDiagram
  participant CI as CI / build (scripts/index.ts)
  participant Usecases as buildUsecasesList()
  participant Helper as writeJSON()
  participant RefParser as $RefParser
  participant FS as Filesystem

  CI->>Usecases: await buildUsecasesList()
  Usecases->>Helper: writeJSON(read: config/usecases.yaml, write: config/usecases.json, dereference: true)
  Helper->>RefParser: dereference(parsed JSON)
  RefParser-->>Helper: dereferenced JSON
  Helper->>FS: write config/usecases.json (dereferenced)
  FS-->>CI: file written
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to scripts/helpers/readAndWriteJson.ts for the dereference behavior (flag ignored vs intended).
  • Verify tests updated to pass the dereference flag and that generated JSON paths match .gitignore.
  • Confirm frontend field mappings (name/description, type/url) align with usecases.yaml.

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • devilkiller-ag
  • akshatnema
  • sambhavgupta0705
  • vishvamsinh28
  • Mayaleeeee
  • asyncapi-bot-eve

Poem

🐰 I hopped through YAML rows tonight,

I swapped adopters for usecase light,
I chased the refs until they’d yield,
Wrote JSON paths across the field,
Tiny paws, a tidy merge in sight.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "chore: add content with case studies" is partially related to the changeset. The title accurately references the addition of use case content, which is a real aspect of the change—specifically, the new config/usecases.yaml file and the updated pages/casestudies/index.tsx component. However, the title does not capture the main structural point of this change: the replacement of the adopters system with a unified use cases model. While "add content with case studies" is specific enough to convey meaning and is not misleading, it is incomplete as it omits the core aspect of restructuring from adopters to use cases. The "chore" prefix is appropriate for this type of configuration and build script modification.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6287929) to head (dd57d43).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #4486   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          778       780    +2     
  Branches       144       144           
=========================================
+ Hits           778       780    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Oct 16, 2025

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 37
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-4486--asyncapi-website.netlify.app/

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9de49c1 and 492bce4.

📒 Files selected for processing (1)
  • config/usecases.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test NodeJS PR - macos-13
  • GitHub Check: Test NodeJS PR - windows-latest
  • GitHub Check: Lighthouse CI

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
config/usecases.yaml (1)

105-114: Normalize content type field values.

Adeo (line 108) and HDI Global (line 113) use the type Use Case, which differs stylistically from other entries (Video, Slides, Article, Docs, Code). For consistency and downstream parsing, consider renaming to a standard type or documenting the full list of allowed values.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 492bce4 and 34506bb.

📒 Files selected for processing (2)
  • config/adopters.yml (0 hunks)
  • config/usecases.yaml (1 hunks)
💤 Files with no reviewable changes (1)
  • config/adopters.yml
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test NodeJS PR - windows-latest
🔇 Additional comments (2)
config/usecases.yaml (2)

50-59: Verify duplicate URL for Walmart and eBay.

Walmart (line 54) and eBay (line 59) both reference the same YouTube URL: https://www.youtube.com/watch?v=SxTpGRaNIPo. Confirm whether this is intentional or a copy-paste error. If incorrect, correct the eBay entry.


1-23: Approved: Use cases section is well-structured.

The use cases are clearly defined with consistent formatting and meaningful descriptions. The governance spelling is now correct.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/helpers/readAndWriteJson.ts (1)

16-41: Fix the unconditional dereferencing logic.

The dereference parameter is accepted but never used. Line 34 unconditionally dereferences the JSON content regardless of the parameter value, which doesn't match the intended behavior.

Apply this diff to make dereferencing conditional:

-  const dereferenced = await $RefParser.dereference(jsonContent);
+  let outputContent = jsonContent;
+  
+  if (dereference) {
+    try {
+      outputContent = await $RefParser.dereference(jsonContent);
+    } catch (err) {
+      return Promise.reject(err);
+    }
+  }

   // Attempt to write the JSON content to file
   try {
-    await writeFile(writePath, JSON.stringify(dereferenced));
+    await writeFile(writePath, JSON.stringify(outputContent));
   } catch (err) {
     return Promise.reject(err);
   }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34506bb and a11ba91.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • .gitignore (1 hunks)
  • config/usecases.yaml (1 hunks)
  • package.json (1 hunks)
  • pages/casestudies/index.tsx (5 hunks)
  • scripts/adopters/index.ts (0 hunks)
  • scripts/helpers/readAndWriteJson.ts (3 hunks)
  • scripts/index.ts (2 hunks)
  • scripts/usecases/index.ts (1 hunks)
  • tests/index.test.ts (3 hunks)
  • tests/usecases/index.test.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • scripts/adopters/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/usecases.yaml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-11-01T09:55:20.531Z
Learnt from: akshatnema
PR: asyncapi/website#3101
File: tests/build-rss.test.js:25-27
Timestamp: 2024-11-01T09:55:20.531Z
Learning: In `tests/build-rss.test.js`, replacing `jest.resetModules()` with `jest.resetAllMocks()` in the `afterEach()` block causes errors. It is necessary to use `jest.resetModules()` to reset the module registry between tests in this file.

Applied to files:

  • tests/index.test.ts
🧬 Code graph analysis (4)
scripts/usecases/index.ts (1)
scripts/helpers/readAndWriteJson.ts (1)
  • writeJSON (16-44)
scripts/index.ts (1)
scripts/usecases/index.ts (1)
  • buildUsecasesList (18-20)
tests/usecases/index.test.ts (1)
scripts/usecases/index.ts (1)
  • buildUsecasesList (18-20)
tests/index.test.ts (1)
scripts/usecases/index.ts (1)
  • buildUsecasesList (18-20)
🔇 Additional comments (15)
package.json (1)

126-126: LGTM!

The addition of @apidevtools/json-schema-ref-parser as a devDependency is properly specified and aligns with its usage in the dereferencing logic introduced in scripts/helpers/readAndWriteJson.ts.

.gitignore (1)

10-10: LGTM!

The update to ignore config/usecases.json instead of config/adopters.json correctly reflects the migration from adopters to usecases.

scripts/index.ts (2)

5-5: LGTM!

The import path correctly references the new usecases module.


36-36: LGTM!

The function call correctly invokes the new buildUsecasesList() function, maintaining the build sequence.

pages/casestudies/index.tsx (7)

12-12: LGTM!

The import correctly references the new usecases.json configuration file.


15-24: LGTM!

The interface definitions correctly reflect the new data model, with Resource using type and url, and Adopter using name and description. These changes are consistently applied throughout the component.


34-34: LGTM!

The construction of AdoptersList from UsecasesList.data correctly adapts to the new data structure.


72-72: LGTM!

Using UsecasesList.description for the adopters section description is a good approach, making the content configurable rather than hardcoded.


76-76: LGTM!

The PR submission link correctly points to the new usecases.yml configuration file.


98-114: LGTM!

The desktop table view correctly uses the new field names (entry.name, entry.description, resource.type, resource.url) consistently with the updated data model.


120-148: LGTM!

The mobile card view correctly mirrors the desktop implementation, using the updated field names consistently throughout.

scripts/usecases/index.ts (1)

1-20: LGTM!

The buildUsecasesList() function is well-documented and correctly delegates to writeJSON with the appropriate parameters, including the dereference flag set to true. The path resolution using resolve and currentDirPath is correct.

tests/index.test.ts (3)

3-3: LGTM!

The import correctly references the new buildUsecasesList function from the usecases module.


13-13: LGTM!

The mock path correctly references the new usecases module.


34-34: LGTM!

The test expectation correctly verifies that buildUsecasesList is called during the start sequence.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a11ba91 and 4716bc0.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • config/usecases.yaml (1 hunks)
  • pages/casestudies/index.tsx (5 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
pages/casestudies/index.tsx (1)
components/typography/Paragraph.tsx (1)
  • Paragraph (28-56)
🔇 Additional comments (4)
pages/casestudies/index.tsx (4)

15-24: LGTM! Interface definitions align with new data model.

The updated Resource and Adopter interfaces correctly reflect the structure defined in config/usecases.yaml. The transition from {title, link} to {type, url} and from {companyName, useCase} to {name, description} is consistent throughout the file.


34-34: LGTM! Data extraction correctly maps UsecasesList to AdoptersList.

The use of Object.values(UsecasesList.data) correctly extracts all company/organization entries from the dereferenced usecases JSON for rendering in the adopters table.


98-116: LGTM! Desktop table rendering correctly uses new field names.

The table rows correctly map entry.name, entry.description, resource.type, and resource.url for all adopter entries. The rendering logic is consistent with the updated interface definitions.


120-148: LGTM! Mobile card view correctly uses new field names.

The mobile card layout consistently renders entry.name, entry.description, resource.type, and resource.url. The responsive design maintains parity with the desktop table view.

derberg and others added 3 commits October 23, 2025 17:58
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Member

@anshgoyalevil anshgoyalevil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks clean. Thanks @derberg

@anshgoyalevil
Copy link
Member

/rtm

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
pages/casestudies/index.tsx (2)

98-116: Consider adding an empty state message.

The table correctly renders the adopters list with the updated property names. However, when AdoptersList is empty, the table displays only headers with no rows, which might confuse users.

Consider adding an empty state:

{AdoptersList.length === 0 ? (
  <tr>
    <td colSpan={3} className='border-2 p-4 text-center text-gray-500'>
      No adopters available at this time.
    </td>
  </tr>
) : (
  AdoptersList.map((entry: Adopter, index: number) => (
    // ... existing row rendering
  ))
)}

120-148: Mobile card rendering looks good; consider empty state.

The mobile view correctly uses the new property names and properly structures the card layout.

Similar to the desktop table, you could add an empty state for better UX:

{AdoptersList.length === 0 ? (
  <div className='text-center p-8 text-gray-500'>
    No adopters available at this time.
  </div>
) : (
  AdoptersList.map((entry: Adopter, index: number) => (
    // ... existing card rendering
  ))
)}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db97d91 and dd57d43.

📒 Files selected for processing (2)
  • pages/casestudies/index.tsx (5 hunks)
  • tests/usecases/index.test.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/usecases/index.test.ts
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: automerge-for-humans
  • GitHub Check: Test NodeJS PR - windows-latest
🔇 Additional comments (1)
pages/casestudies/index.tsx (1)

15-24: LGTM!

The interface definitions are clear and properly reflect the new data structure from the usecases configuration.

const image: string = '/img/social/case-studies.webp';
const title: string = 'Case Studies';

const AdoptersList = Object.values(UsecasesList.data) as Adopter[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add defensive checks for data access.

The code accesses UsecasesList.data without verifying it exists, and uses a type assertion that bypasses compile-time validation. If the JSON structure is missing or malformed, this will cause runtime errors.

Apply this diff to add defensive checks:

-  const AdoptersList = Object.values(UsecasesList.data) as Adopter[];
+  const AdoptersList = (UsecasesList?.data ? Object.values(UsecasesList.data) : []) as Adopter[];

Or, for more explicit handling:

-  const AdoptersList = Object.values(UsecasesList.data) as Adopter[];
+  const AdoptersList: Adopter[] = [];
+  if (UsecasesList?.data && typeof UsecasesList.data === 'object') {
+    AdoptersList.push(...(Object.values(UsecasesList.data) as Adopter[]));
+  }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const AdoptersList = Object.values(UsecasesList.data) as Adopter[];
const AdoptersList = (UsecasesList?.data ? Object.values(UsecasesList.data) : []) as Adopter[];
Suggested change
const AdoptersList = Object.values(UsecasesList.data) as Adopter[];
const AdoptersList: Adopter[] = [];
if (UsecasesList?.data && typeof UsecasesList.data === 'object') {
AdoptersList.push(...(Object.values(UsecasesList.data) as Adopter[]));
}
🤖 Prompt for AI Agents
In pages/casestudies/index.tsx around line 34, the line "const AdoptersList =
Object.values(UsecasesList.data) as Adopter[]" assumes UsecasesList and
UsecasesList.data always exist and uses a forced type assertion; change this to
defensively check UsecasesList and UsecasesList.data (e.g., guard with
null/undefined checks and Array.isArray/Object.keys as appropriate), fallback to
an empty array when data is missing, and remove the unchecked "as Adopter[]"
assertion by applying a small runtime type guard or mapping/validation of each
item to the Adopter shape so the resulting AdoptersList is a properly validated
array.

Comment on lines +80 to +82
<Paragraph typeStyle={ParagraphTypeStyle.md} className='my-4 max-w-4xl'>
{UsecasesList.description}
</Paragraph>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add null check for description property.

The code renders UsecasesList.description without checking if it exists. If the description field is missing from the JSON, this could display "undefined" or cause rendering issues.

Apply this diff to add a conditional check:

-              <Paragraph typeStyle={ParagraphTypeStyle.md} className='my-4 max-w-4xl'>
-                {UsecasesList.description}
-              </Paragraph>
+              {UsecasesList?.description && (
+                <Paragraph typeStyle={ParagraphTypeStyle.md} className='my-4 max-w-4xl'>
+                  {UsecasesList.description}
+                </Paragraph>
+              )}
🤖 Prompt for AI Agents
In pages/casestudies/index.tsx around lines 80 to 82, the component directly
renders UsecasesList.description which can be undefined; update the render to
guard against null/undefined by checking the property before rendering (e.g.,
render UsecasesList.description only if it exists, or use a safe fallback like
an empty string or a default message). Ensure the Paragraph receives a string
(use optional chaining or a nullish coalescing fallback) so nothing like
"undefined" is displayed.

@anshgoyalevil
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit 04921b1 into asyncapi:master Oct 28, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants