Commit Graph

14 Commits

Author SHA1 Message Date
hykocx af8c082463 docs(project): update project description from cms to multi-purpose platform
- update tagline in README.md and docs to reflect multi-purpose scope
- rephrase project description in PROJECT.md to position zen as an extensible admin platform
- remove detailed core documentation sections from PROJECT.md
- fix typo "palteforme" in directory structure comment
- replace cms references with platform wording in DEV.md
2026-04-24 17:19:33 -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 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 936d21fdec docs/feat: add storage policies to discovery and refactor utils
- Add `storagePublicPrefixes` and `storageAccessPolicies` fields to
  both internal and external module config loading in discovery.js
- Add a module-level `MIME_TYPES` constant in storage/utils.js to
  avoid recreating the object on every `getMimeType` call
- Remove unused `validateImageDimensions` export from storage/index.js
- Remove dead `isFinite` check after `Math.min/max` in `getPresignedUrl`
  (result is always finite at that point)
- Remove unused `warn` import from storage/utils.js
- Add documentation rule in DEV.md: comments must always reflect the
  actual behavior of the code they describe
2026-04-14 17:23:43 -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 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 89741d4460 docs: add project context note in DEV.md 2026-04-13 14:51:43 -04:00
hykocx 260fcfc4f8 docs: extract publication and architecture sections to dedicated files
Move the "Publier le package" section from DEV.md to a new
PUBLICATION.md file, and add references to ARCHITECTURE.md and
PUBLICATION.md in the main DEV.md index. This reduces the size of
DEV.md and improves discoverability by grouping related content
into focused documents.
2026-04-13 13:52:15 -04:00
hykocx 16db807004 docs: rewrite DEV.md with detailed dev and security guidelines
Replace the terse DEV.md with a comprehensive French-language guide
covering code standards, security rules, and the npm publish workflow.

Key changes:
- Expand code principles into readable prose (single responsibility,
  control flow, input validation, promise handling, minimal scope)
- Add concrete security sections: parameterized queries, secret
  management via env vars, dependency auditing, and opaque error
  messages
- Document the full publish procedure (version bump, build, audit,
  npm publish with provenance, git tag)
- Remove the NASA Power of Ten bullet list in favor of actionable,
  project-specific guidelines
2026-04-13 13:34:17 -04:00
hykocx c806c8d8d4 docs: replace project structure with dev philosophy section
Replace the project directory tree and PR integration/versioning
sections with a new "Philosophie de développement" section covering
the NASA Power of Ten rules and security-by-design principles.
2026-04-12 18:49:53 -04:00
hykocx 2017f9791b docs: remove zen-setup CLI and simplify installation guide
- Remove `zen-setup` binary from package.json and package-lock.json
- Replace manual setup steps with `npx @zen/start` CLI command
- Simplify INSTALL.md by reducing steps from 6 to 4
- Update DEV.md to reflect removal of zen-setup from CLI scripts
- Fix relative path to `.env.example` in documentation
2026-04-12 17:07:33 -04:00
hykocx 27a5887527 docs: add development and security links to README 2026-04-12 15:29:16 -04:00