Skip to content

feat: scaffold react-kit with core, ui, next and http modules - #1

Merged
JSisques merged 2 commits into
developfrom
claude/react-kit-library-structure-luth1k
Aug 8, 2026
Merged

feat: scaffold react-kit with core, ui, next and http modules#1
JSisques merged 2 commits into
developfrom
claude/react-kit-library-structure-luth1k

Conversation

@JSisques

@JSisques JSisques commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Scaffolds @sisques-labs/react-kit, a new publishable npm library extracting the code duplicated across gardenia-web and nextjs-template's src/shared/ trees, modeled on @sisques-labs/nestjs-kit's tooling conventions (semantic-release, GitHub Actions CI/release, subpath exports).

  • Root (core) — find-by-criteria domain interfaces/enums (Filter, Sort, ListCriteria, PaginatedResult, CreatedEntity, FilterOperator, SortDirection), useDebouncedValue, i18n helpers (t, isLocale, WidenStringLiterals), logHttpError, refreshTokenOnce
  • /ui — the full 67-component shadcn/Radix UI catalog
  • /nextproxyTo/internalUrl route-handler passthrough, plus the 5 components that render next/image (kept out of /ui so that subpath has no next peer)
  • /http — new dependency-injected createBareHttp/createAxiosClient/createApolloClient/createQueryClient factories, replacing the two apps' hand-rolled singleton clients that each read from a different app-specific auth store. Both HTTP factories share one 401-refresh mutex.

Byte-identical code was copied verbatim (import paths rewritten from @/shared/... to the new package layout); the HTTP client factories are the one deliberate redesign, documented in the README.

gardenia-web and nextjs-template are not migrated to consume this package in this PR — that's a follow-up, repo by repo.

Test plan

  • pnpm lint:check — clean
  • pnpm buildtsc + tsc-alias; all 4 entry points (dist/index.js, dist/entrypoints/{ui,next,http}.js) emit with .d.ts companions
  • pnpm test:cov — 442 tests across 83 files passing, coverage ≥80% on statements/branches/functions/lines
  • Spot-checked that 'use client' directives survive the per-file tsc build unmodified

Generated by Claude Code

Extracts the code duplicated across gardenia-web and nextjs-template's
src/shared/ trees into a publishable library, mirroring the
@sisques-labs/nestjs-kit tooling pattern (semantic-release, GitHub Actions
CI/release, subpath exports):

- core (package root): find-by-criteria domain interfaces/enums,
  useDebouncedValue, i18n helpers, logHttpError, refreshTokenOnce
- /ui: the full shadcn/Radix component catalog (67 components)
- /next: route-handler proxy passthrough plus the 5 components that
  render next/image
- /http: dependency-injected axios/Apollo/TanStack Query factories
  replacing the hand-rolled, app-specific singleton clients, sharing one
  401-refresh mutex across both HTTP transports

Build via tsc + tsc-alias (preserves 'use client' directives per file),
tested with Vitest + RTL at an 80% coverage threshold.
@github-actions github-actions Bot added documentation Docs-only changes tests Test-only changes ci CI/CD workflow changes dependencies Dependency updates config Config/tooling changes labels Aug 8, 2026
Comment thread .husky/pre-commit
Fast lint-staged on pre-commit, build + changed-tests on pre-push,
matching gardenia-web's convention instead of running the full
lint+build+test suite on every commit.
@JSisques
JSisques merged commit 056c25f into develop Aug 8, 2026
6 checks passed
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@JSisques
JSisques deleted the claude/react-kit-library-structure-luth1k branch August 8, 2026 14:29
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD workflow changes config Config/tooling changes dependencies Dependency updates documentation Docs-only changes released on @alpha released on @beta released tests Test-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants