docs: plan first admin module port
This commit is contained in:
1 parent
acc34ea8bf
commit
9ead82bbca
1 file changed
+43
@@ -0,0 +1,43 @@
|
|||||||
|
# Admin Events Polls Banners Prefixes Implementation Plan
|
||||||
|
|
||||||
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||||
|
|
||||||
|
**Goal:** Port four complete admin modules from habbo-next into EpicNext with safe schema ownership and ACL enforcement.
|
||||||
|
|
||||||
|
**Architecture:** Add CMS-owned tables and Prisma models first, then validators/actions, then locale-free admin routes and navigation. Existing safe-action, audit, admin-list, UI primitives, and semantic theme systems are reused.
|
||||||
|
|
||||||
|
**Tech Stack:** Next.js 16, Prisma 7, MariaDB SQL migrations, Zod, React Hook Form, Vitest.
|
||||||
|
|
||||||
|
## Global Constraints
|
||||||
|
|
||||||
|
- Never modify emulator-owned poll tables.
|
||||||
|
- Preserve the local `package.json` modification.
|
||||||
|
- Remove `[locale]` routing assumptions.
|
||||||
|
- Use EpicNext semantic colors and ACL permission constants.
|
||||||
|
|
||||||
|
### Task 1: Schema and ACL
|
||||||
|
|
||||||
|
- [ ] Add failing migration/schema contract tests for all CMS tables and permission slugs.
|
||||||
|
- [ ] Add Prisma models and an idempotent numbered migration.
|
||||||
|
- [ ] Generate Prisma and run schema/migration tests.
|
||||||
|
- [ ] Commit with `feat: add schema for admin content modules`.
|
||||||
|
|
||||||
|
### Task 2: Validators and actions
|
||||||
|
|
||||||
|
- [ ] Port event/poll validators and add invalid-input tests.
|
||||||
|
- [ ] Port events, polls, banners, and prefixes actions using existing safe-action/audit APIs.
|
||||||
|
- [ ] Run action import contracts, typecheck, and targeted tests.
|
||||||
|
- [ ] Commit with `feat: add admin content module actions`.
|
||||||
|
|
||||||
|
### Task 3: Routes and UI
|
||||||
|
|
||||||
|
- [ ] Port the 24 module files without locale routing and add the missing date-time picker primitive.
|
||||||
|
- [ ] Add route/import contract tests and adapt query/API differences found by typecheck.
|
||||||
|
- [ ] Add navigation entries and permission visibility.
|
||||||
|
- [ ] Run targeted tests and typecheck; commit with `feat: add admin content module pages`.
|
||||||
|
|
||||||
|
### Task 4: Verification
|
||||||
|
|
||||||
|
- [ ] Run Prisma generation, full test suite, typecheck, and production build.
|
||||||
|
- [ ] Verify migration idempotency and ensure `package.json` is unstaged.
|
||||||
|
- [ ] Push the verified commits to `origin/main`.
|
||||||
Reference in new issue
Block a user