Commit Graph

20 Commits

Author SHA1 Message Date
hykocx d64423c1ad docs(tsup): update build config comments and fix jsx import extensions 2026-04-22 14:40:09 -04:00
hykocx 0106bc4ea0 feat(core)!: introduce runtime extension registry and flat module conventions
BREAKING CHANGE: sup config now derives entries from package.json#exports and a server/client glob instead of manual lists; module structure follows flat + barrel convention with .server.js/.client.js runtime suffixes
2026-04-22 14:13:30 -04:00
hykocx 40fc8a21e4 chore(config): replace auth dashboard entry with admin dashboard widget entries in tsup config 2026-04-22 13:28:29 -04:00
hykocx f08376d979 feat(users): refactor users system 2026-04-19 16:42:33 -04:00
hykocx 41edccc1a3 refactor(admin): replace static dashboard stats with dynamic widget registry 2026-04-15 20:43:10 -04:00
hykocx 0d940e3997 refactor: extract theme logic into shared core module 2026-04-15 17:06:37 -04:00
hykocx 6cd6ce6f6f build: set esbuildOptions outbase to 'src' in tsup config
Set `options.outbase = 'src'` in the esbuildOptions callback to ensure
output files preserve the correct directory structure relative to the
`src` folder, preventing path flattening during the build process.
2026-04-14 20:15:30 -04:00
hykocx 7ef37e3ebd refactor: reorganize package exports under namespaced paths
- Prefix feature exports with `features/` (auth, admin, provider)
- Prefix shared exports with `shared/` (components, icons, lib, config, logger, rate-limit)
- Add new explicit exports for `shared/logger`, `shared/config`, and `shared/rate-limit`
- Update internal imports to use package self-referencing (`@zen/core/shared/*`) instead of relative paths
2026-04-14 19:57:48 -04:00
hykocx 6a5f43d50e fix: update database CLI entry point path
Move the database CLI entry point from `src/cli/database.js` to
`src/core/database/cli.js` to better reflect its location within
the core database module. Update both the `package.json` bin path
and `tsup.config.js` build entry accordingly.
2026-04-14 19:29:07 -04:00
hykocx 4a06cace5d refactor: remove modules system from core package
- Remove all module-related entry points from package.json exports
- Remove module source files from tsup build configuration
- Clean up external dependencies related to modules
- Update DEV.md to reflect modules removal from architecture
- Clarify package description to specify Next.js CMS
2026-04-14 17:27:04 -04:00
hykocx 6521179e10 feat(cron): refactor cron utility with validation and metadata
- Add input validation for name, schedule expression, and handler
- Store full CronEntry metadata (handler, schedule, timezone, registeredAt)
  instead of raw job instance to support introspection
- Add JSDoc typedefs for CronEntry and improve all function docs
- Use globalThis symbol store to survive Next.js hot-reload
- Remove verbose per-run info logs to reduce noise
- Replace `||` with `??` for runOnInit default to handle falsy correctly
- Fix stop/stopAll to access `entry.job` from new storage structure
2026-04-13 15:30:17 -04:00
hykocx 060eb367d8 build(tsup): add @zen/core/api to external list and document rule
- Add `@zen/core/api` to the `external` array in `tsup.config.js` to
  prevent build failures caused by unresolved `dist/` imports at build time
- Document the externals rule in `docs/DEV.md`: any `@zen/core/*` import
  used in bundled module files must be declared as external, with an
  explanation of why and a code example to follow
2026-04-13 15:16:02 -04:00
hykocx 4ddf834990 refactor(api): refactor API module with route definitions and response utilities
Restructure the core API module to improve clarity, consistency, and
maintainability:

- Introduce `defineApiRoutes()` helper for declarative route definitions
  with built-in config validation at startup
- Add `apiSuccess()` / `apiError()` response utilities; enforce their
  use across all handlers (core and modules)
- Move auth enforcement to route definitions (`auth: 'public' | 'user' |
  'admin'`), removing manual auth checks from handlers
- Extract core routes into `core-routes.js`; router now has no knowledge
  of specific features
- Rename `nx-route.js` to `route-handler.js` and update package.json
  export accordingly
- Update ARCHITECTURE.md to reflect new API conventions and point to
  `src/core/api/README.md` for details
2026-04-13 15:13:03 -04:00
hykocx 57dcd2c4d1 chore: bump version to 1.3.12 and expose logger module
- Bump package version from 1.3.11 to 1.3.12
- Add `src/shared/lib/logger.js` to tsup build entry points to expose the logger module as a public export
2026-04-12 22:00:29 -04:00
hykocx dd7c54d913 feat: add modules/storage export and bundle config files
- Add `./modules/storage` package export pointing to `modules.storage.js`
- Add `modules/*/config.js` to tsup build entries for server-only configs
- Add `@zen/core/modules/storage` to external dependencies in tsup config
- Add `src/modules/modules.storage.js` to the second tsup build target
- Update storage handler to import via `@zen/core/modules/storage` alias
- Rename unused `request` param to `_request` in `handleGetFile`
2026-04-12 20:45:55 -04:00
hykocx 8c66ca60d7 chore: bump version to 1.3.6 and remove unused dependencies
- Remove `react-email`, `react-grid-layout` from dependencies
- Remove `tailwindcss`, `@tailwindcss/cli`, `@tailwindcss/postcss`,
  `autoprefixer`, `postcss`, and `typescript` from devDependencies
- Update package-lock.json to reflect dependency removals
- Bump package version from 1.3.5 to 1.3.6
2026-04-12 18:42:10 -04:00
hykocx 81172bda94 chore: rename package from @hykocx/zen to @zen/core
Update all references across source files, documentation, and
configuration to reflect the new package scope and name. This includes
updating `.npmrc` registry config, install instructions, module
examples, and all import path comments throughout the codebase.
2026-04-12 15:09:26 -04:00
hykocx 1b53ba8d58 refactor: remove setup feature from build exports and config
Removes the `./setup` export entry from `package.json` and the
corresponding `src/features/setup/index.js` entry point from
`tsup.config.js`, eliminating the standalone setup feature module
from the public API and build output.
2026-04-12 14:40:34 -04:00
hykocx 390133808b refactor: consolidate CLI entry points into dedicated cli/ directory
Move `database` and `setup` CLI scripts from their respective feature
directories into a unified `src/cli/` directory. Update `tsup.config.js`
build entries and `package.json` bin paths to reflect the new locations.
2026-04-12 14:39:17 -04:00
hykocx 65ae3c6788 chore: import codes 2026-04-12 12:50:14 -04:00