Skip to content

Conversation

@bufferings
Copy link
Owner

@bufferings bufferings commented Jul 28, 2025

Comprehensive Documentation Improvements

This PR includes several focused improvements to enhance documentation quality, accuracy, and user experience.

Key Changes

🚀 Getting Started Guide Refactoring (ef8c246)

  • CLI-first approach: Changed from manual setup to npm create kori-app workflow
  • Restructured content: Organized into 7 clear sections (Setup → Basic API → Request & Response → Hooks → Plugins → Validation → OpenAPI)
  • Type-safety emphasis: Added helpful comments throughout to highlight Kori's type-safe features
  • API consistency fixes: Corrected method names (queryParams(), setHeader(), etc.) to match actual implementation
  • Unified patterns: Consistent method chaining and export statements across all examples
  • Practical examples: Added environment extensions, logging, and real-world usage patterns

📖 What is Kori Page Enhancement (4c0615f)

  • Clearer value proposition: Reordered sections to start simple, then demonstrate schema power
  • Focus refinement: Changed from "Type-Safe by Default" to "Schema-Driven Type Safety"
  • Simplified examples: Used straightforward hello world instead of complex pathParams
  • Content streamlining: Removed redundant sections for better focus on core values

🎌 Japanese Content Improvements

  • Character readability: Improved Japanese character display (05fa579)
  • Cultural context: Added Japanese meaning and Hono Router foundation explanation (23077fb)

🧹 Maintenance & Accuracy

  • Documentation rules: Simplified rules to remove redundancy (249575e)
  • Configuration guide removal: Deleted docs/en/guide/configuration.md due to implementation inconsistencies (9a911df)
  • Navigation updates: Updated sidebar links and cross-references in related documentation

Technical Accuracy Improvements

  • Fixed API method references that didn't match actual implementation
  • Removed configuration options that don't exist in createKori
  • Updated all code examples to be immediately executable
  • Ensured consistency between documentation and actual source code

Files Changed

  • docs/en/guide/getting-started.md - Major refactoring with CLI-first approach
  • docs/en/guide/what-is-kori.md - Enhanced value proposition and simplified structure
  • docs/en/guide/configuration.md - Removed (implementation inconsistencies)
  • docs/.vitepress/config.js - Updated navigation sidebar
  • docs/en/examples/rest-api.md - Fixed broken links
  • docs/en/guide/plugins.md - Updated cross-references
  • .cursor/rules/docs.mdc - Simplified documentation rules

These changes align with our documentation engineering principles: implementation accuracy, user-centered design, and maintaining Kori's distinctive features while providing a smooth learning path for new developers.

Summary by CodeRabbit

  • Documentation
    • Streamlined and clarified documentation writing rules and style guidelines for improved readability.
    • Removed the configuration guide and related links from the sidebar and example documentation.
    • Substantially revised the "Getting Started" and "What is Kori?" guides for a more concise, example-driven, and modular onboarding experience.
    • Updated plugin documentation to direct users to the new getting started guide.
    • Enhanced code examples to emphasize type safety, modularity, and plugin usage.

- Reorder sections to start simple then show schema power
- Change from "Type-Safe by Default" to "Schema-Driven Type Safety"
- Use simple hello example instead of pathParams
- Remove redundant sections (What You Get, Learn More)
- Focus on core value: schema-driven type safety
- Change from manual setup to CLI-first workflow (npm create kori-app)
- Restructure into 7 clear sections: Setup, Basic API, Request & Response,
  Hooks, Plugins, Validation, OpenAPI
- Add type-safety emphasis throughout with helpful comments
- Fix API consistency (queryParams(), setHeader(), etc.)
- Unify method chaining patterns and export statements
- Simplify OpenAPI section by removing optional pluginMetadata
- Add practical examples with environment extensions and logging
Copilot AI review requested due to automatic review settings July 28, 2025 16:23
@changeset-bot
Copy link

changeset-bot bot commented Jul 28, 2025

⚠️ No Changeset found

Latest commit: df95764

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Jul 28, 2025

Walkthrough

This update revises and streamlines Kori's documentation. It removes the configuration guide and all related sidebar and cross-reference links, restructures the "Getting Started" and "What is Kori?" guides for clarity and conciseness, and simplifies documentation writing rules. New sections for hooks and plugins are added, and code examples are modernized throughout.

Changes

Cohort / File(s) Change Summary
Documentation Writing Rules
.cursor/rules/docs.mdc
Simplified and condensed documentation writing rules, narrowed applicable file globs, restructured principles and style guidance, and removed detailed enumerations in favor of concise, principle-based rules.
Sidebar and Navigation
docs/.vitepress/config.js
Removed the "Configuration" entry from the sidebar navigation in both English and Japanese locales.
Configuration Guide Removal
docs/en/guide/configuration.md
Deleted the comprehensive configuration guide, which covered setup, environment variables, plugins, best practices, and runtime-specific configuration.
Getting Started Guide
docs/en/guide/getting-started.md
Extensively revised and restructured the onboarding guide: removed server start commands, modernized examples, added sections for hooks and plugins, updated validation and OpenAPI usage, and improved code clarity.
What is Kori? Guide
docs/en/guide/what-is-kori.md
Rewrote introduction to focus on narrative and example-driven explanation, removed marketing bullet points, and simplified code samples and conceptual flow.
Plugins Guide Next Steps Update
docs/en/guide/plugins.md
Updated "Next Steps" section: replaced the configuration guide link with a link to the "Getting Started" guide.
REST API Example Update
docs/en/examples/rest-api.md
Removed the reference to the deleted configuration guide from the "Next Steps" section.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Docs Sidebar
    participant Guides
    participant Examples

    User->>Docs Sidebar: Browse navigation
    Docs Sidebar-->>User: No "Configuration" link

    User->>Guides: Read "Getting Started", "What is Kori?", "Plugins"
    Guides-->>User: Streamlined, modernized content (no configuration guide)

    User->>Examples: View REST API example
    Examples-->>User: No reference to configuration guide
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇
In the docs I hop and prune,
Old guides gone, new guides bloom.
Sidebars slim, examples neat,
Hooks and plugins now complete.
With every hop, the docs grow bright—
Type-safe trails in morning light!
—Your friendly documentation rabbit

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9a911df and df95764.

📒 Files selected for processing (1)
  • docs/en/guide/what-is-kori.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/en/guide/what-is-kori.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch work

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Remove the outdated configuration guide documentation that contained inaccurate information about createKori options and update references throughout the documentation to maintain consistency.

  • Delete the entire configuration.md file containing inaccurate createKori API information
  • Update navigation links to remove configuration references
  • Revise getting-started.md with simplified, accurate examples
  • Refresh what-is-kori.md with cleaner messaging and correct code patterns

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/en/guide/configuration.md Complete removal of outdated configuration documentation
docs/.vitepress/config.js Remove configuration navigation links from both English and Japanese sections
docs/en/guide/getting-started.md Major rewrite with simplified examples and accurate API usage
docs/en/guide/what-is-kori.md Streamlined content with cleaner messaging and correct code examples
docs/en/guide/plugins.md Update "Next Steps" link to point to getting-started instead of configuration
docs/en/examples/rest-api.md Remove reference to database configuration guide
.cursor/rules/docs.mdc Simplified documentation writing guidelines
Comments suppressed due to low confidence (2)

docs/en/guide/getting-started.md:123

  • The import 'zod/v4' appears to reference a non-existent version. Zod uses semantic versioning and v4 is not a valid import path. This should likely be 'zod' without the version specifier.
import { createKoriZodRequestValidator } from '@korix/zod-validator';

docs/en/guide/getting-started.md:167

  • The import 'zod/v4' appears to reference a non-existent version. Zod uses semantic versioning and v4 is not a valid import path. This should likely be 'zod' without the version specifier.
import { z } from 'zod';


```bash
npm install @korix/kori @korix/nodejs-adapter
npm create kori-app my-api # 🚧 Coming Soon!
Copy link

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

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

[nitpick] The comment '🚧 Coming Soon!' indicates this command doesn't work yet, but the section is titled 'Quick Setup (Coming Soon!)' which already conveys this. Consider removing the inline comment to avoid redundancy.

Suggested change
npm create kori-app my-api # 🚧 Coming Soon!
npm create kori-app my-api

Copilot uses AI. Check for mistakes.
@bufferings bufferings changed the title Remove outdated configuration guide Comprehensive documentation improvements Jul 28, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bugbot free trial expires on July 29, 2025
Learn more in the Cursor dashboard.

Copy link

@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 (2)
docs/en/guide/what-is-kori.md (1)

22-34: Minor nit: missing import comment for z

For completeness, consider adding a comment or line showing import { z } from 'zod'; before using z.object(...) so newcomers don’t wonder where z came from.

docs/en/guide/getting-started.md (1)

204-204: Nit: single exclamation point is enough

Three exclamation marks trigger style-check warnings. One is plenty: “documentation!”

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f25c190 and 9a911df.

📒 Files selected for processing (7)
  • .cursor/rules/docs.mdc (1 hunks)
  • docs/.vitepress/config.js (0 hunks)
  • docs/en/examples/rest-api.md (0 hunks)
  • docs/en/guide/configuration.md (0 hunks)
  • docs/en/guide/getting-started.md (2 hunks)
  • docs/en/guide/plugins.md (1 hunks)
  • docs/en/guide/what-is-kori.md (1 hunks)
💤 Files with no reviewable changes (3)
  • docs/en/examples/rest-api.md
  • docs/.vitepress/config.js
  • docs/en/guide/configuration.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{md,mdc,MD,MDX,README,README.md,README.mdc}

📄 CodeRabbit Inference Engine (.cursor/rules/coding.mdc)

Documentation files (.md, .mdc, README) may use non-ASCII characters freely

Files:

  • docs/en/guide/plugins.md
  • docs/en/guide/what-is-kori.md
  • docs/en/guide/getting-started.md
🪛 LanguageTool
docs/en/guide/getting-started.md

[style] ~204-~204: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 721 characters long)
Context: ...3000/docs` for interactive documentation!

(EN_EXCESSIVE_EXCLAMATION)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (6)
.cursor/rules/docs.mdc (2)

3-3: .mdc files are now outside the rule’s scope – intentional?

By dropping the **/*.mdc pattern from globs, these writing rules will no longer apply to Markdown-Component (.mdc) files—even to this very file. If the intent was only to exclude generated docs, consider keeping **/*.mdc or adding a more specific exclusion pattern to avoid silently bypassing style enforcement for legitimate .mdc docs.


9-31: LGTM – clearer, less dogmatic wording

The softened language and condensed bullet lists improve readability while preserving the “source-code-first” principle.

docs/en/guide/plugins.md (1)

575-577: Link update looks correct

The “Next Steps” bullet now targets /en/guide/getting-started, which exists in this PR and eliminates the dead link to the removed configuration guide.

docs/en/guide/what-is-kori.md (1)

3-6: Nice, engaging introduction

The narrative opener and succinct value proposition read well and fit the new style guide.

docs/en/guide/getting-started.md (2)

121-135: Package names may be placeholders—double-check before publishing

@korix/zod-schema and @korix/zod-validator are referenced for the first time. Verify these packages (and their exact names) exist on npm, or readers will hit install errors.


175-182: Chained .applyPlugin() reads well – consider line wrap

Very readable; no issues.

Comment on lines +64 to +71
import { createKori } from '@korix/kori';

const app = createKori()
.onInit(async (ctx) => {
// Runs once when application starts
app.log().info('Application starting...');
return ctx.withEnv({ applicationStartTime: new Date() });
})
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

onInit callback argument likely mislabeled

onInit previously receives the environment object, not a request/response context. Returning ctx.withEnv() therefore looks unsupported. Either:

  1. Rename the parameter to env and return an extended env object, or
  2. Confirm the API now exposes withEnv on the init argument and update other docs for consistency.
-  .onInit(async (ctx) => {
+  .onInit(async (env) => {
     app.log().info('Application starting...');
-    return ctx.withEnv({ applicationStartTime: new Date() });
+    return { ...env, applicationStartTime: new Date() };
   })
📝 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
import { createKori } from '@korix/kori';
const app = createKori()
.onInit(async (ctx) => {
// Runs once when application starts
app.log().info('Application starting...');
return ctx.withEnv({ applicationStartTime: new Date() });
})
import { createKori } from '@korix/kori';
const app = createKori()
.onInit(async (env) => {
// Runs once when application starts
app.log().info('Application starting...');
return { ...env, applicationStartTime: new Date() };
})
🤖 Prompt for AI Agents
In docs/en/guide/getting-started.md around lines 64 to 71, the onInit callback
argument is incorrectly named ctx and used as if it supports withEnv, but it
actually receives the environment object. Rename the parameter from ctx to env
and return an extended environment object by returning env.withEnv(...) if
supported, or adjust the code to correctly extend the environment according to
the current API. Also, ensure the naming and usage align with the official API
and update related documentation for consistency.

@bufferings bufferings merged commit ef9446e into main Jul 28, 2025
2 checks passed
@bufferings bufferings deleted the work branch July 28, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants