Skip to content

21 — Route & File Map Execution Plan (Blueprint §6)

Cursor-ready implementation map for admin routes, public routes, webhook routes, and theme extension structure for the testimonial app.

21 — Route & File Map Execution Plan (Blueprint §6)

Section titled “21 — Route & File Map Execution Plan (Blueprint §6)”

Source: 02-Implementation-Blueprint.md§6) Suggested Route/File Map (Boilerplate-Aligned).

Product alignment: 01-Post-Purchase-Video-Testimonial-Collector-Plan.md — complete surface area (admin + public + automation + storefront).

This document is a build spec only. No code changes are implied until a task references this file.

Related: all previously created screen-specific plans (05 to 20) and cleanup plan 04.


Provide one authoritative route/file implementation map so Cursor can build the testimonial app in a predictable order without route collisions, dead links, or inconsistent naming.


This plan covers only wiring and structure:

  • Admin route files
  • Public/customer route files
  • Webhook route files
  • Theme extension file layout
  • Navigation mapping
  • Suggested implementation phases

Out of scope:

  • Deep business logic for each screen (covered in individual numbered plans).

Use blueprint route names as canonical:

  • app/routes/app.testimonial-*.jsx for admin
  • app/routes/t.$token.jsx + app/routes/api.testimonial-*.jsx for public APIs
  • app/routes/webhooks.orders.*.jsx for Shopify order automation

Keep this naming stable across all plans to avoid drift.


Implement (or alias) these admin routes exactly:

  1. app/routes/app.testimonial-dashboard.jsx
  2. app/routes/app.testimonial-campaigns.jsx
  3. app/routes/app.testimonial-campaign.$id.jsx
  4. app/routes/app.testimonial-templates.jsx
  5. app/routes/app.testimonial-submissions.jsx
  6. app/routes/app.testimonial-submission.$id.jsx
  7. app/routes/app.testimonial-published.jsx
  8. app/routes/app.testimonial-widget.jsx
  9. app/routes/app.testimonial-moderation.jsx
  10. app/routes/app.testimonial-requests.jsx
  11. app/routes/app.testimonial-analytics.jsx
  12. app/routes/app.testimonial-billing.jsx
Route fileURL
app.testimonial-dashboard.jsx/app (or /app/testimonials/dashboard)
app.testimonial-campaigns.jsx/app/testimonial-campaigns
app.testimonial-campaign.$id.jsx/app/testimonial-campaigns/:id
app.testimonial-templates.jsx/app/testimonial-templates
app.testimonial-submissions.jsx/app/testimonials
app.testimonial-submission.$id.jsx/app/testimonials/:id
app.testimonial-published.jsx/app/testimonials/published
app.testimonial-widget.jsx/app/testimonials/widget
app.testimonial-moderation.jsx/app/testimonials/moderation
app.testimonial-requests.jsx/app/testimonials/requests
app.testimonial-analytics.jsx/app/testimonials/analytics
app.testimonial-billing.jsx/app/testimonials/billing

3.2 Backward compatibility with existing app shell

Section titled “3.2 Backward compatibility with existing app shell”

Current repo already has app._index.jsx and non-testimonial nav items.

For migration:

  • Either repurpose app._index.jsx as dashboard adapter to app.testimonial-dashboard.jsx
  • Or keep dashboard logic in app._index.jsx and route-link to it from testimonial nav.

Document chosen approach in a short README in this folder when implementing.


Required:

  1. app/routes/t.$token.jsx
  2. app/routes/api.testimonial-upload-url.jsx
  3. app/routes/api.testimonial-submit.jsx

Optional:

  1. app/routes/api.testimonial-media-callback.jsx
  • Must not require authenticate.admin
  • Must enforce token validation and rate limits (06 + 08)
  • Must keep response contracts stable for widget/public clients

Required by blueprint:

  1. app/routes/webhooks.orders.paid.jsx
  2. app/routes/webhooks.orders.fulfilled.jsx

Keep existing mandatory Shopify routes:

  • webhooks.compliance.jsx
  • webhooks.app.uninstalled.jsx
  • webhooks.app.scopes_update.jsx
  • webhooks.app_subscriptions.update.jsx

Ensure order webhooks are registered in app config and HMAC-verified.


Blueprint recommendation aligned with Screen 8.1:

  • extensions/<testimonial-extension>/blocks/testimonial-widget-home.liquid
  • extensions/<testimonial-extension>/blocks/testimonial-widget-pdp.liquid
  • extensions/<testimonial-extension>/assets/testimonial-widget.js
  • single block:
    • extensions/<testimonial-extension>/blocks/testimonial-widget.liquid
    • schema mode: home_top_videos | product_reviews

Recommendation: Option A for clearer merchant mental model and easier support.


7) Navigation wiring map (app/routes/app.jsx)

Section titled “7) Navigation wiring map (app/routes/app.jsx)”

Add links in testimonial section:

  1. Dashboard
  2. Campaigns
  3. Templates
  4. Submissions
  5. Published
  6. Widget
  7. Moderation
  8. Requests
  9. Analytics
  10. Billing

Keep existing support/promo/settings modules per plan 04.


8) Implementation sequencing by route groups

Section titled “8) Implementation sequencing by route groups”
  • Campaigns list/create
  • Templates
  • Order webhooks
  • Request pipeline
  • Public submission routes
  • Submissions inbox/detail
  • Published manager
  • Widget settings + storefront API + theme extension
  • Requests log
  • Analytics
  • Billing & usage

This phase split aligns with milestone intent from blueprint section 9.


RouteDepends on
Campaigns (2,3)DB models TestimonialCampaign*
Templates (4)TestimonialTemplate, send-test adapters
Submissions (5,6)TestimonialSubmission, TestimonialMediaAsset, moderation log
Published (7)submission publish fields + placement visibility
Widget (8)shop widget settings storage + public read API
Requests (10)TestimonialRequest, TestimonialRequestEvent
Analytics (11)request/submission data (+ optional rollups)
Billing (12)subscription + usage counters
Public token pageTestimonialRequest + submission APIs
Order webhookscampaign definitions + request creation pipeline

  • Every route resolves under expected URL.
  • No collisions with existing legacy routes.
  • Every admin route uses authenticate.admin.
  • Public routes avoid admin auth and have explicit validation/rate limit.
  • Webhook routes are idempotent and verified.
  • Nav links point to working routes.

  1. Finalize route naming and URL conventions from this file.
  2. Scaffold all route files with TODO stubs and shared auth/error patterns.
  3. Wire nav entries in app.jsx.
  4. Implement route logic incrementally per phase.
  5. Keep this file as route source of truth; update only when intentional changes are made.

  • 02-Implementation-Blueprint.md — Section 6 route/file map
  • 04-Delete All Existing Code and DB Tables.md — retained modules + cleanup constraints
  • 05 through 20 plans — route-level implementation detail

This folder already includes 05 through 20 plans. This file is 21-....