Commit Graph

160 Commits

Author SHA1 Message Date
hykocx 866da94f06 feat(ui): add ColorPicker component and replace native color input in RoleEditModal 2026-04-22 16:30:41 -04:00
hykocx 71fe05bd2b feat(users): add description field to permission definitions 2026-04-22 16:20:43 -04:00
hykocx f54b2640ad refactor(admin): replace parameterized routes with modal-based editing for users and roles 2026-04-22 16:15:43 -04:00
hykocx f8ef884b63 style(ui): update color palette to use darker sh 2026-04-22 16:04:03 -04:00
hykocx 5ab789667c fix(admin): update sidebar and breadcrumb links to point to /admin/dashboard 2026-04-22 15:57:09 -04:00
hykocx 0c860d9fe5 feat(admin): replace single page name with dynamic breadcrumb navigation in AdminTop 2026-04-22 15:51:01 -04:00
hykocx 118f399208 refactor(admin): move back button and action to a flex container on the right side of AdminHeader 2026-04-22 15:38:39 -04:00
hykocx fe4ca228cc refactor(admin): simplify AdminHeader component by removing inline logic 2026-04-22 15:36:48 -04:00
hykocx 18270540cc refactor(admin): replace inline avatar logic with shared UserAvatar component 2026-04-22 15:14:07 -04:00
hykocx 1613bd5275 feat(admin): add dynamic role color support for user badges 2026-04-22 15:08:46 -04:00
hykocx 96c8352dcf refactor(ui): move system badge to dedicated column and update Badge styles 2026-04-22 15:02:10 -04:00
hykocx 7ca818da5a fix(ui): fix missing space between rounded-lg and transition-all in Button class 2026-04-22 14:55:19 -04:00
hykocx f5c8dc842d refactor(auth): make COOKIE_NAME a private module-level constant 2026-04-22 14:41:53 -04:00
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 61388f04a6 refactor: reorganize feature modules with consistent naming conventions and flattened structure 2026-04-22 14:12:15 -04:00
hykocx 12f66a2115 feat(admin): add core users widget and reorganize dashboard widget registration 2026-04-22 13:27:04 -04:00
hykocx cdcd704d84 style(admin): refine header user menu typography and layout 2026-04-22 13:03:07 -04:00
hykocx e00d6b3c42 refactor(admin): replace inline SVGs with icon components and fix icon imports 2026-04-22 12:58:28 -04:00
hykocx c08c0a622f style(admin): update dropdown menu layout and remove user info section 2026-04-22 12:50:20 -04:00
hykocx 7bd5aedb3b style(admin): update user avatar and name styling in AdminHeader 2026-04-22 12:46:29 -04:00
hykocx 83672e9325 style(admin): standardize subtitle text size and color across admin pages 2026-04-22 12:43:20 -04:00
hykocx 8752ce168e style(ui): update sidebar width to 230px and refactor StatCard layout 2026-04-22 12:38:26 -04:00
hykocx f45322736f style(admin): move font-normal from base to inactive class in AdminSidebar 2026-04-22 12:33:54 -04:00
hykocx 836134f701 refactor(admin): rename sidebar CSS class variables for clarity 2026-04-22 12:10:22 -04:00
hykocx 384eadf7b7 style(admin): update sidebar width to 240px and refine nav item styles 2026-04-22 12:05:46 -04:00
hykocx e8d87b0a8f style(admin): adjust sidebar nav item spacing and remove sub-item icons 2026-04-22 11:57:25 -04:00
hykocx 408653452c style(admin): add active parent style for expanded sidebar sections 2026-04-22 11:50:36 -04:00
hykocx 2420a2cb1d fix(admin): correct active state condition for collapsed sidebar sections 2026-04-22 11:49:24 -04:00
hykocx d6506eab5a style(admin): update layout font, max-width, and sidebar active item styles 2026-04-22 11:46:48 -04:00
hykocx 138183f3a8 refactor(style): apply new design 2026-04-22 11:30:33 -04:00
hykocx 345371d43c style(admin): reduce header height and simplify layout spacing and menu item focus styles 2026-04-22 11:09:12 -04:00
hykocx 6b71818531 feat(admin): navigate to first section item when expanding collapsed sidebar section 2026-04-19 17:15:52 -04:00
hykocx f387511c40 refactor(admin): remove group toggle feature and simplify permissions UI in RoleEditPage 2026-04-19 17:04:29 -04:00
hykocx dcd4d9b9f9 refactor(admin): replace raw form elements with shared Input, Textarea, and Switch components in RoleEditPage 2026-04-19 16:56:50 -04:00
hykocx f08376d979 feat(users): refactor users system 2026-04-19 16:42:33 -04:00
hykocx 692a014dd8 refactor(storage): replace configureStorageApi with additive registration pattern 2026-04-19 16:06:32 -04:00
hykocx 41edccc1a3 refactor(admin): replace static dashboard stats with dynamic widget registry 2026-04-15 20:43:10 -04:00
hykocx 73a8639324 fix(admin): prevent menu from closing when toggling theme in header dropdown 2026-04-15 19:57:46 -04:00
hykocx 1d64ffd6f5 refactor(admin): replace ThemeToggle component with inline theme hook in AdminHeader 2026-04-15 19:55:38 -04:00
hykocx a3cb55814f feat: extract ThemeWatcher component for system theme detection 2026-04-15 17:50:43 -04:00
hykocx 0d940e3997 refactor: extract theme logic into shared core module 2026-04-15 17:06:37 -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 cee521b0e4 refactor(auth): replace relative imports with @zen/core alias
Update BaseLayout imports in auth email templates to use the
`@zen/core/email/templates` module alias instead of relative paths,
improving maintainability and consistency across the codebase.
2026-04-14 19:35:19 -04:00
hykocx 9584b23ed7 fix: correct import paths and remove DatabaseError export
- Fix BaseLayout import paths in auth email templates from
  `../../core/...` to `../../../core/...` to match correct
  directory depth
- Remove unused `DatabaseError` from db.js exports
2026-04-14 19:31:00 -04:00
hykocx 3131df2b71 refactor: remove module system integration from admin and CLI
Removes all module-related logic from the admin dashboard, CLI database
initialization, and AdminPages component:

- Drop `initModules` call from `db init` CLI command and simplify the
  completion message to only reflect core feature tables
- Remove `getModuleDashboardStats` and module page routing from admin
  stats actions and update usage documentation accordingly
- Simplify `AdminPagesClient` to remove module page loading, lazy
  components, and module-specific props (`moduleStats`, `modulePageInfo`,
  `routeInfo`, `enabledModules`)
2026-04-14 19:26:48 -04:00
hykocx 242ea69664 feat(storage): refactor storage config and remove module registry
Introduce a dedicated `storage-config.js` for registering public
prefixes and access policies via `configureStorageApi()`, replacing the
previous `getAllStoragePublicPrefixes` / `getAllStorageAccessPolicies`
imports from the module registry.

Remove `getAllApiRoutes()` from the router so module-level routes are no
longer auto-collected; feature routes must now be registered explicitly
via `registerFeatureRoutes()` during `initializeZen()`.

Update `.env.example` to document separate `ZEN_STORAGE_PROVIDER`,
`ZEN_STORAGE_B2_*` variables for Backblaze B2 alongside the existing
Cloudflare R2 variables, making provider selection explicit.

Clean up admin navigation and page components to drop module-injected
nav entries, keeping only core and system sections.
2026-04-14 17:43:06 -04:00
hykocx 2e348a1608 feat(storage): add configurable storage access policies
Replace hardcoded `users/` path-based access control with a
declarative `storageAccessPolicies` system defined per module via
`defineModule()`.

- Add `storageAccessPolicies` field to `defineModule()` defaults with
  support for `owner` and `admin` policy types
- Expose `getAllStorageAccessPolicies()` from the modules/storage layer
- Refactor `handleGetFile` in `storage/api.js` to resolve access
  control dynamically from registered policies instead of hardcoded
  path checks
- Add `ZEN_STORAGE_ENDPOINT` env var and update `.env.example` to
  support S3-compatible backends (Cloudflare R2, Backblaze B2)
- Document the env/doc sync convention in `DEV.md`
2026-04-14 17:09:27 -04:00
hykocx 87a04db04b feat(email): refactor email module and improve config handling
- Simplify `sendEmail` by extracting `resolveFrom` and `buildPayload` helpers
- Remove `sendAuthEmail` and `sendAppEmail` exports, keeping only `sendEmail` and `sendBatchEmails`
- Replace hardcoded fallback sender with env-based validation (throws if missing)
- Update `BaseLayout` to resolve `supportEmail` from `ZEN_SUPPORT_EMAIL` env var instead of hardcoded default
- Conditionally render support section only when a support email is available
- Remove verbose JSDoc comments and reduce overall code verbosity
2026-04-13 18:37:06 -04:00
hykocx 59fce3cd91 refactor(api): update README and refactor api route registration
Restructure the core API to separate infrastructure routes from feature
routes. Key changes:

- Add `runtime.js` for global state: session resolver and feature route
  registry
- Add `file-response.js` for streaming file responses (storage endpoint)
- Remove feature routes (auth/users) from `core-routes.js`, keeping only
  true infrastructure routes (health, storage)
- Introduce `registerFeatureRoutes()` so features self-register during
  `initializeZen()` instead of being hardcoded in `core-routes.js`
- Add `UserFacingError` class to safely surface client-facing errors
  without leaking internal details
- Fix import path for `rateLimit.js` to use shared lib location
- Update README to reflect new two-step registration flow and clarify
  the role of `core-routes.js`
2026-04-13 17:20:14 -04:00