Next.js SaaS Development for AI-assisted Video Creation

Job ID: 39770037

Budget: $8 – $15 USD

Senior Next.js Contractor (Vercel + Clerk + Stripe + Supabase)
Project: — SaaS for AI-assisted, API-driven video creation (n8n orchestration)
Engagement: Contract (extendable) · Remote

Summary

Stand up the SaaS core using our chosen template (Next.js on Vercel). Wire Clerk for auth/orgs, Stripe for subscriptions & customer portal, and build a monthly credits (token) system that deducts per API usage. n8n orchestrates jobs; different APIs have different costs—your work makes that simple, auditable, and reliable.

Phase 1 — Deliverables

Deploy & Configure

Import adrianhajdin/saas-template → deploy to Vercel (Production + Preview).

Domains: shoppablevideos.com (prod) + *.vercel.app (previews).

Secure environment variables + basic error/logging hooks.

Auth & Organizations (Clerk)

Email/password + social logins.

Organizations/teams (invite/join, minimal roles).

App Router route protection (server actions, middleware).

Allowlist redirect/origin for both prod and preview.

Billing (Stripe)

Plans & prices (monthly).

Stripe Checkout + Customer Portal (upgrade/downgrade/cancel, invoices).

Webhook handler for subscription start/renew/cancel/refund (idempotent).

Map plan → app limits (credits per month, feature flags).

Credits / Token System (Postgres/Supabase)

Tables:

wallets(org_id, balance_credits, refill_amount, next_refill_at)

ledger(id, org_id, delta, reason, ref_id, created_at) (immutable)

price_book(action, unit, credits_per_unit)

usage_events(id, org_id, action, units, cost_credits, job_id, idempotency_key, created_at)

Webhooks add monthly refills on successful invoice.

Optional one-off top-ups via Checkout.

Atomic endpoint POST /api/credits/consume (idempotent) that validates, prices, decrements, and logs.

n8n Integration Points

Authenticated reserve/consume endpoints n8n calls per job/step.

Example n8n workflow + README showing retry-safe consumption (no double billing).

Minimal UI

Dashboard: plan, current credit balance, last 20 usage events, “Manage Billing,” “Buy Top-Up.”

Pricing page pulling plan config (maps to Stripe Price IDs).

Phase 2 (nice to have)

Low-balance email alerts & auto-top-up.

Overage via Stripe metered add-on.

Simple admin view (users, subs, credits).

Affiliate hook (store ?ref= → customer metadata; we may add Rewardful/FirstPromoter later).

Must-have Skills

Next.js (App Router), TypeScript, Vercel, Clerk, Stripe (Checkout/Portal/Webhooks), Supabase/Postgres, n8n (webhooks/retries), secure env handling, idempotency, and basic observability.

What to include in your proposal

Links to live Next.js apps on Vercel using Clerk + Stripe.

Briefly describe how you’d implement an atomic credit wallet + ledger (concurrency/idempotency).

Any prior usage/credit-based billing work.

Availability (hours/week) + hourly rate.

Include the word PINEAPPLE so we know you read this.
Related categories: JavaScript Stripe Next.js Vercel n8n