Commit Graph

111 Commits

Author SHA1 Message Date
95e80ef62c feat(auth): add IUsersRepository + IAuthenticationService interfaces 2026-05-05 00:39:01 +02:00
ceffd05063 feat(auth): add User, Cookie, Session entities + errors + config 2026-05-05 00:38:49 +02:00
54dc9d33d5 feat(auth): scaffold empty package with feature tag + path aliases 2026-05-05 00:37:13 +02:00
42ef78bcfd docs(plan): add Plan 3 (Auth + Media + restore blog relations)
17 tasks: full auth feature canonical migration (entities, services,
use-cases, DI with constructor-injected service, controllers, users
collection, tRPC router); skeleton media feature (collection only);
restore blog's author→users relation and featuredImage→media upload.
Bakes in all Plan-2 lessons (vitest alias, no rootDir, relative imports
in src, no @repo/core-cms in feature deps).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:35:51 +02:00
e217652a87 fix(blog): remove rootDir constraint to allow tests/**/* inclusion in typecheck 2026-05-05 00:27:25 +02:00
3e6f632c4b test(blog): add feature-level test exercising router → controller → use-case → repo 2026-05-04 22:37:18 +02:00
ed4d204a7e docs(plan-2): document relative-imports-in-source rule for feature packages
Discovered during execution: when downstream packages like @repo/core-api
typecheck and follow imports into a feature, they don't have the feature's
@/ alias and fail with TS2307. Source files use relative imports;
@/ is reserved for test files within the feature's own context.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 22:36:10 +02:00
87f43924be feat(blog): wire root barrel (entity types + ui query helpers) 2026-05-04 22:35:01 +02:00
82ef7c9ef6 feat(blog): add ui/query.ts (framework-agnostic React Query option builders) 2026-05-04 22:34:53 +02:00
1ae1702786 feat(core-api): compose @repo/blog/api into appRouter under 'blog' namespace 2026-05-04 22:34:43 +02:00
fde58f2d3d feat(blog): add tRPC router with articleBySlug + listArticles + createArticle 2026-05-04 22:32:53 +02:00
81fe4aa3b2 docs(plan-2): document constructor-injection pattern for payload repos
Revises Task 2.8's note: spec example used `import config from
'@repo/core-cms'` which creates a workspace dependency cycle (blog deps
on core-cms; core-cms deps on blog/cms). Constructor injection breaks the
cycle at the package graph. Apply to all payload-backed feature repos.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 22:32:01 +02:00
a92341fb74 feat(core-cms): compose @repo/blog/cms into payload config 2026-05-04 22:29:50 +02:00
1d59698ebe feat(blog): add articles collection (simplified — no cross-feature refs) 2026-05-04 22:27:03 +02:00
f041ae5473 feat(blog): add articles controller with Zod validation 2026-05-04 22:25:10 +02:00
b250cdff80 feat(blog): add PayloadArticlesRepository with doc-to-entity mapping 2026-05-04 22:23:31 +02:00
1da0c06085 docs(plan-2): fix vitest.config.ts to include @/ alias
Vitest doesn't read tsconfig paths automatically; the alias must be
declared in vitest.config.ts via resolve.alias. Discovered during
execution and fixed in the live blog package; updating the source
plan so future feature plans (auth, media, etc.) start correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 22:22:05 +02:00
c00283506c feat(blog): add per-feature InversifyJS container (symbols, module, container) 2026-05-04 22:14:56 +02:00
41d7883e7a feat(blog): add MockArticlesRepository for tests 2026-05-04 22:14:14 +02:00
86228f2d3e feat(blog): add createArticleUseCase (test red until DI + mock repo exist) 2026-05-04 22:13:31 +02:00
b0dab254d1 feat(blog): add getArticlesUseCase (test red until DI + mock repo exist) 2026-05-04 22:13:00 +02:00
ab11f42e8d feat(blog): add IArticlesRepository interface 2026-05-04 22:11:17 +02:00
692ee58365 feat(blog): add Article entity with rich-text content + domain errors 2026-05-04 22:11:08 +02:00
161c858f32 feat(blog): scaffold empty package with feature tag + path aliases 2026-05-04 22:09:58 +02:00
74cb9bd29a docs(plan): add Plan 2 (Blog feature canonical migration)
17 tasks migrating the existing content/articles domain into a new
@repo/blog package with full canonical layer shape. Per-feature
InversifyJS container, payload-articles repository using getPayload +
core-cms config, simplified schema (author as text, no featuredImage)
with TODOs to restore in Plan 3 when auth + media features are migrated.
Wires blog/cms into core-cms and blog/api into core-api.

Plan 2 of 6 — total revised from original 4 during execution to keep
each plan digestible (Plan 1 in-flight numbering preserved).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 22:07:00 +02:00
76dbe71a75 feat(core-cms): generate initial (empty) Payload types
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 21:56:44 +02:00
dd4edce61d fix(typescript-config): expose nextjs.json + react-library.json in exports map
The prior commit added an exports map that only listed base.json and
vitest.base, accidentally hiding nextjs.json and react-library.json
from packages that extend them via tsconfig.json. Adds them back.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 20:55:34 +02:00
9c8ca61fc9 feat(cms): repoint @payload-config from cms-core to core-cms 2026-05-04 20:54:27 +02:00
0be9e4beb4 feat(core-cms): add stub payload.config (empty collections/globals) 2026-05-04 20:53:48 +02:00
614b0178a0 feat(core-shared): wire root index.ts barrel 2026-05-04 20:45:09 +02:00
884b0c01e8 fix(core-shared): narrow Payload Field union before accessing name in tests
Payload's Field type is a discriminated union; field.name only exists on
named variants. Tests now narrow on type (and 'name' in field for groups)
before reading variant-specific properties.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 20:43:23 +02:00
428346a36d feat(core-shared): add tRPC context factory 2026-05-04 20:40:52 +02:00
cd2f3b1fff feat(core-shared): add tRPC init with superjson 2026-05-04 20:40:42 +02:00
a9a8d32726 feat(core-shared): add payload barrel export 2026-05-04 20:39:54 +02:00
520a792b7f feat(core-shared): add toIsoString helper 2026-05-04 20:37:26 +02:00
3ffe752c7a feat(core-shared): add requireEnv helper 2026-05-04 20:37:12 +02:00
2b2de66b5d feat(core-shared): add slugifyIfMissing hook 2026-05-04 20:37:00 +02:00
124ccabc5f feat(core-shared): add setPublishedAt hook 2026-05-04 20:36:45 +02:00
6bd428214f feat(core-shared): add cta block 2026-05-04 20:36:30 +02:00
2d838b2dcf feat(core-shared): add seoFields group 2026-05-04 20:36:17 +02:00
f2f8e2b3b3 feat(core-shared): add slugField helper 2026-05-04 20:35:59 +02:00
5942317222 feat(core-shared): add isAdmin access helper 2026-05-04 20:35:36 +02:00
9a2158211b test(core-shared): wire shared vitest base 2026-05-04 20:34:08 +02:00
afc76754f8 build(typescript-config): add shared vitest base config 2026-05-04 20:33:34 +02:00
7c9bf5c546 build: update lockfile for new core-* packages
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 20:32:53 +02:00
76ba941252 feat(core-ui): scaffold empty package (contents migrated in Plan 3) 2026-05-04 20:30:57 +02:00
a5fa1ff32b feat(core-trpc): scaffold empty package (client + providers in Plan 3) 2026-05-04 20:30:46 +02:00
f55823fc6e feat(core-api): scaffold empty appRouter aggregator 2026-05-04 20:30:28 +02:00
cd1aa861a2 feat(core-cms): scaffold empty package with exports + tags 2026-05-04 20:30:12 +02:00
b4a9994dc2 feat(core-shared): scaffold empty package with exports + tags 2026-05-04 20:29:57 +02:00