Monorepo Structure
Directory layout for core, client, and react packages.
#Directory layout
The repository is a pnpm workspace. Each package is independently buildable and publishable.
void-snippets/
├── packages/
│ ├── core/
│ │ └── src/
│ │ ├── types.ts — VSId, VSPagination, VSQueryParams, VSListResult
│ │ ├── adapters.ts — VSAdapters interface, createDefaultAdapters()
│ │ └── utils.ts — catchError, stringToId
│ │
│ ├── client/
│ │ └── src/
│ │ ├── configure.ts — registers the shared axios instance
│ │ ├── resource-service.ts — generic CRUD base class
│ │ └── error-handler.ts — handleApiError()
│ │
│ └── react/
│ └── src/
│ ├── hooks/
│ │ ├── create-resource-hooks.ts — the main factory
│ │ ├── use-alert-message.ts
│ │ ├── use-async-state.ts
│ │ ├── use-call-timer.ts
│ │ ├── use-modal.ts
│ │ └── use-pagination.ts
│ ├── socket/
│ │ └── create-socket-hooks.ts — Socket.IO factory
│ └── routing/
│ ├── create-route-contract.ts
│ ├── define-route.ts
│ └── use-typed-search-params.ts
│
├── pnpm-workspace.yaml
└── tsconfig.base.jsonEach package exposes a single barrel entry point (src/index.ts) that re-exports everything consumers need.