Create flow: Community + custom rule UI, template review, facet recommendations, and app/docs reorg #46
Reference in New Issue
Block a user
Delete Branch "adilallo/feature/BackendImplementation4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
This branch delivers the Create Community and Create Custom CommunityRule wizard experiences end-to-end in the UI: structured screens under a single
[screenId]route, facet-driven “recommended” ordering for custom-rule method cards (backed by new API + seed data), a tightened Final Review flow with chip edit modals, and a cleaner template review path (customize / use without changes, read-only template detail, navigation fixes).It also reorganizes the app into route groups (
(app),(marketing),(admin),(dev)), adds Cursor rules and AGENTS.md for contributors, and refreshes docs (create-flow canon, backend Linear tracker, CONTRIBUTING API table, roadmap) plus broad test coverage for new helpers and routes.Why: Align the repo with Figma/product intent for the custom create journey, template entry from marketing, and recommendation matrix work already specified in docs—while keeping drafts, auth, and publish behavior consistent with existing APIs.
Changes
Create flow (custom path)
FLOW_STEP_ORDER,useCreateFlowNavigation(URL as source of step),CreateFlowScreenView, and layout/footer behavior (proportion bar, confirm footer steps, skipcommunity-savewhen signed in → redirect toreview).CommunityReviewScreen) and related state.useFacetRecommendations,rankMethodsByScore,deriveCompactCards.FinalReviewChipEditModal,applyFinalReviewChipEditPatch,buildFinalReviewCategoriesFromState); Completed tweaks; finalize/publish viauseCreateFlowFinalize+ existingPOST /api/rules.Template flow
/create/review-template/[slug]:useTemplateReviewActions, prefill/customize routing,pendingTemplateActionhandling in community review,clearCreateFlowPersistedDraftsfor marketing vs in-flow entry.TemplateReviewCard+TemplateChipDetailModal; read-only / chip interactions per product cleanup.Backend / data
GET /api/create-flow/methods— facet-scored methods per section.GET /api/templates— optionalfacet.*query params + ranked templates/scores.MethodFacet(and related) +data/create/customRule/*.jsonfacet matrices;lib/server/templateMethods,methodSlugFromTitle, validation schemas.PUT/GET /api/drafts/mewhere needed for persisted shape.App structure & tooling
app/(app)/; marketing and admin layouts; components-preview under(dev).Docs & contributor experience
AGENTS.md,.cursor/rules/*.mdc(create-flow, API, components, i18n, tests, etc.).docs/create-flow.md,docs/guides/backend-linear-tickets.md,docs/guides/backend-roadmap.md,docs/guides/template-recommendation-matrix.md,CONTRIBUTING.md(API table includes templates facets, create-flow methods, web vitals).Tests
Screenshots
How to Test
docker compose up -d postgres mailhog, copy.env.example→.env,npx prisma migrate dev, optionalnpx prisma db seed,npm run dev. Enable sync if testing drafts:NEXT_PUBLIC_ENABLE_BACKEND_SYNC=true./templates→ open review-template → Customize / Use without changes (including from/templates?fromFlow=1vs fresh marketing click).GET /api/templates,GET /api/create-flow/methods?section=communication&facet.size=…(with session if required by route).npx vitest run(andnpx tsc --noEmit/npx next buildper AGENTS.md if you want CI parity).Notes
+affordance product gaps are unchanged vs main (documented elsewhere).You can shorten the Changes bullets further for the Gitea UI if the body is too long; the structure matches the template sections.