AI Content Engine (ACE) is a Next.js 16 app that helps small businesses generate practical, channel-specific social content plans in seconds β‘. It turns three inputs (business type, target audience, and goal) into a five-day execution blueprint with ready-to-use ideas for Instagram, TikTok, Facebook/LinkedIn, hashtags, and learning resources π.
Most businesses know they should post consistently but struggle with what to post next π€. ACE is built to reduce that friction by giving users a concrete action plan they can execute immediately β .
- AI strategy generation via OpenRouter (
/api/generate-content) π€. - Structured outputs: title, overview, Instagram plan, TikTok plan, Facebook/LinkedIn plan, hashtag plan, and a 5-day action plan ποΈ.
- Curated video recommendations to help users execute each strategy π₯.
- Local free-tier usage tracking (5 free generations/day per browser) π.
- Stripe checkout + verification flow for Pro upgrades π³.
- Firebase Auth support (Google provider, browser persistence) π.
- User opens the marketing site/dashboard.
- User submits:
- business type
- target audience
- goal
- API validates payload (required fields + max lengths).
- Server requests generation from OpenRouter.
- Response is parsed into strict JSON sections.
- UI renders a practical 5-day strategy and related recommendations.
- Free plan usage is tracked in localStorage.
- User can upgrade to Pro through Stripe checkout.
- Frontend: Next.js App Router with React 19 + TypeScript βοΈ.
- Styling/UX: Tailwind CSS 4, Framer Motion, and Three.js scene components π¨.
- Backend routes:
POST /api/generate-contentPOST /api/checkoutGET /api/checkout/verify
- AI provider: OpenRouter chat completions API π€.
- Payments: Stripe subscriptions πΈ.
- Auth: Firebase client auth utilities π.
- Config source of truth:
app/lib/site.ts.
The generation pipeline expects these JSON keys:
titleoverviewinstagram_plantiktok_planfacebook_linkedin_planhashtag_planfive_day_plan(exactly 5 items)video_topics(3 to 4 items)
- Free: 5 generations/day (browser-local tracking) π.
- Pro: unlimited generations (subscription flow scaffolded with Stripe) π.
app/
api/
generate-content/route.ts
checkout/route.ts
checkout/verify/route.ts
components/
lib/
generator.ts
site.ts
usage.ts
stripe.ts
firebase.ts
dashboard/page.tsx
pricing/page.tsx
page.tsx
public/
- Framework: Next.js 16.2
- Language: TypeScript 5
- UI: React 19, Tailwind CSS 4, Framer Motion
- 3D/visuals: Three.js + React Three Fiber + Drei
- AI: OpenRouter
- Payments: Stripe
- Auth: Firebase
Create .env.local in the project root:
# App
NEXT_PUBLIC_SITE_URL=http://localhost:3000
# OpenRouter
OPENROUTER_API_KEY=...
OPENROUTER_MODEL=openai/gpt-4o-mini
# Stripe
STRIPE_SECRET_KEY=...
STRIPE_PRO_PRICE_ID=...
# Firebase (client)
NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=...
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...npm install
npm run devOpen http://localhost:3000.
npm run devβ start local dev server π§ͺnpm run buildβ production build πnpm run startβ run production server πnpm run lintβ lint codebase π
- Product strategy framing for early-stage SaaS π§
- Prompt and output-structure design for AI marketing workflows βοΈ
- Next.js app architecture and feature decomposition π§±
- Growth-oriented landing page and conversion copy π£
- API-first integration planning (OpenRouter, Stripe, Firebase) π
- Save and export generated strategies πΎ.
- Team collaboration and shared workspaces π€.
- Calendar integrations and scheduled posting workflows ποΈ.
- Brand voice memory and campaign history π§¬.
- Analytics feedback loop for recommendation tuning π.