Skip to content

Quick-start campaign creation templates on /start #338

Open

Description

@JOY

Goal

Reduce friction for new organizers starting a campaign on /start by offering curated Vietnamese starter templates (title hint, campaign type, suggested goal, category, summary, story outline, and starter FAQs) alongside the blank option.

Scope (App-only — DOS/Give)

  1. Template Catalog (apps/web/src/lib/campaign-templates.ts + tests):
    • Curated Vietnamese templates (medical_emergency, education_community, relief_environment, creative_product, blank) mapped to verified seeded give.categories slugs (healthcare, education-charity, disaster-relief, technology, etc.).
    • Safe allowlisted getCampaignTemplate(id) lookup; no user-controlled SQL/template injection.
  2. Interactive /start Template Picker (apps/web/src/app/start/StartCampaignForm.tsx, page.tsx + tests):
    • Template cards before/above the creation form that pre-fill type, suggested goal_amount, and a hidden template_id input, while preserving seamless zero-JS submission and existing organizer setup gate.
  3. Draft Pre-fill Action (apps/web/src/app/start/actions.ts + tests):
    • Extend createCampaign to accept optional template_id, insert the draft campaign as today, and best-effort prefill template summary, story, resolved category_id, and starter FAQs using authenticated dbAs(session.accessToken) (respecting column grants/RLS; never blocking draft creation/redirect if optional template extras fail).

Acceptance Criteria

  • Inspect exact give.campaigns column grants and save_campaign_faq contracts first; escalate if any DB grant is missing (do not hack with dbService() unless proven required and planned).
  • Existing start/page.test.ts and start/actions.test.ts remain green alongside thorough template coverage.
  • pnpm --filter @give/web test, typecheck, lint, and build pass cleanly, with two independent reviews.

Activity

  1. added
    line:campaigns
    po:agy
    on Nov 23, 2026
  2. JOY commented on Nov 23, 2026

    @JOY
    ContributorAuthor

    Merged to dev (PR #343) — live on beta.give.vn, awaiting Production promotion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    line:campaignspo:agy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions