@beignet/core 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/skills/app-architecture/SKILL.md +12 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: app-architecture
|
|
3
|
-
description: "Build Beignet app feature slices with @beignet/core primitives: schemas, contracts, use cases, app errors, ports, policies, context, providers, domain events, listeners, jobs, schedules, tasks, notifications, outbox, mail, uploads, seeds, tests, and explicit core subpath imports. Use when adding or fixing Beignet application behavior, dependency boundaries, app-facing ports, authorization, workflow primitives, or app-bound lib builders."
|
|
3
|
+
description: "Build Beignet app feature slices with @beignet/core primitives: schemas, contracts, use cases, app errors, ports, policies, context, providers, domain events, listeners, jobs, schedules, tasks, notifications, outbox, mail, uploads, seeds, tests, auth helpers, audit, idempotency, storage, cache, rate limits, flags, entitlements, payments, search, webhooks, and explicit core subpath imports. Use when adding or fixing Beignet application behavior, dependency boundaries, app-facing ports, authorization, workflow primitives, or app-bound lib builders."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Beignet App Architecture
|
|
@@ -56,6 +56,9 @@ generator or deliberate feature change introduces that concern.
|
|
|
56
56
|
clients.
|
|
57
57
|
- UI and feature client modules call server behavior through contracts and a
|
|
58
58
|
typed client, not by importing use cases.
|
|
59
|
+
- Server, provider, and infra code may import `@beignet/core/server-only`;
|
|
60
|
+
browser-reachable client helpers may import `@beignet/core/client-only` as
|
|
61
|
+
lint markers when the app uses them.
|
|
59
62
|
|
|
60
63
|
## Contracts And Schemas
|
|
61
64
|
|
|
@@ -129,7 +132,8 @@ or outbox records must commit together.
|
|
|
129
132
|
- `bound` ports are app-owned at boot, such as gates, config, clocks, IDs, or
|
|
130
133
|
no-op reporters.
|
|
131
134
|
- `deferred` ports are supplied by providers at startup, such as auth,
|
|
132
|
-
database, mail, logger, jobs, repositories, idempotency,
|
|
135
|
+
database, mail, logger, jobs, repositories, idempotency, rate limits,
|
|
136
|
+
storage, search, payments, flags, locks, and error reporting.
|
|
133
137
|
|
|
134
138
|
Do not import provider packages from contracts, use cases, routes, UI, or
|
|
135
139
|
feature client modules.
|
|
@@ -167,6 +171,12 @@ Register workflow artifacts explicitly:
|
|
|
167
171
|
- outbox events and jobs in `server/outbox.ts`
|
|
168
172
|
- seeds through the app's seed entrypoint, usually `infra/db/seed.ts`
|
|
169
173
|
|
|
174
|
+
Uploads are feature-owned definitions under `features/<feature>/uploads/`,
|
|
175
|
+
then exposed through an app route with `createUploadRouter(...)` and the
|
|
176
|
+
platform adapter. Webhooks and payment webhooks are inbound transport concerns:
|
|
177
|
+
define reusable verification or fulfillment in feature/application modules and
|
|
178
|
+
keep provider-specific route glue in focused route files.
|
|
179
|
+
|
|
170
180
|
Providers should not start unbounded background loops on server boot. Expose
|
|
171
181
|
cron routes, worker entrypoints, task runners, schedule runners, or outbox
|
|
172
182
|
drains instead.
|