Skip to content

refactor: migrate docs config from JSON to TypeScript with type safety#56

Merged
naymurdev merged 8 commits intoui-layouts:mainfrom
Yeom-JinHo:refactor/ssot-ts
Sep 18, 2025
Merged

refactor: migrate docs config from JSON to TypeScript with type safety#56
naymurdev merged 8 commits intoui-layouts:mainfrom
Yeom-JinHo:refactor/ssot-ts

Conversation

@Yeom-JinHo
Copy link
Contributor

Description

This PR focuses on migrating the documentation configuration from JSON to TypeScript with full type safety and improved maintainability.

Changes

  • TypeScript Migration (major change): Converted docs.json to docsJson.ts with comprehensive TypeScript interfaces and type definitions.
  • Type Safety: Introduced DocsSection, DocsComponentItem, and DocsRoot interfaces with strict typing for all component metadata.
  • Constants Management: Created DOCS_CATEGORY constants to replace hardcoded strings, ensuring consistent category naming across the codebase.
  • Module Resolution: Fixed Next.js configuration compatibility by converting next.config.mjs to next.config.ts and resolving import path issues.
  • Import Updates: Updated all component imports to use relative paths instead of TypeScript path aliases for better build compatibility.

Motivation

  • Type Safety: Catch errors at compile time instead of runtime.
  • Developer Experience: Provide IntelliSense and IDE autocomplete for all component metadata.
  • Maintainability: Centralize constants (DOCS_CATEGORY) to remove magic strings.
  • Build Compatibility: Resolve Next.js import path issues and module resolution errors.

@Yeom-JinHo
Copy link
Contributor Author

Yeom-JinHo commented Sep 17, 2025

@naymurdev

Hello, I’ve completed the work we discussed in #54 .
Because the scope of changes is quite large, I wasn’t able to consolidate docs.ts and docs.json into a single source in this PR.
As an initial step, I’ve migrated docs.json to docsJson.ts !

@naymurdev naymurdev merged commit fe4bd55 into ui-layouts:main Sep 18, 2025
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