Premium SaaS for AI-generated business post packs, multi-platform publishing, growth intelligence, compliance checks, and Stripe subscriptions.
- Billing: $0.99 / 7-day trial → $9.99/mo, webhooks, refunds, 1 device limit
- AI Studio: 3 free ideas, then trial — OpenAI or template fallback
- Growth Intelligence: scores, predictions, next-best actions (
/growth-intelligence) - Compliance Center: pass/warn/fail checks, remediation (
/compliance-center) - Media: private storage, authenticated file URLs
- Campaigns: builder, carousel, expandable platform registry (LinkedIn-first)
- Security: signed OAuth state, rate limits, webhook verification
See docs/ for PRD, architecture, Apple app readiness, and OpenAPI (GET /api/openapi).
Mobile: POST /api/auth/mobile/login → use Authorization: Bearer on API calls.
cp .env.example .env
# DATABASE_URL, NEXTAUTH_SECRET, DEVICE_SECRET, STRIPE_*
npm install
npx prisma db push
npm run db:seed
npm run devIf pages look unstyled or you see Cannot find module './XXXX.js' in the terminal, clear the dev cache and restart:
npm run dev:cleanstripe listen --forward-to localhost:3000/api/stripe/webhook- Create a Next.js project in Sentry and copy your DSN.
- Set env vars in
.env:
SENTRY_DSN="https://<key>@o<org>.ingest.sentry.io/<project>"
NEXT_PUBLIC_SENTRY_DSN="$SENTRY_DSN"
SENTRY_ENVIRONMENT="development"- Restart dev server (
npm run dev). - Trigger a test server error:
curl -i http://localhost:3000/api/debug-sentry- Trigger a test message:
curl -X POST http://localhost:3000/api/debug-sentry- Verify in Sentry Issues/Events dashboard.
| Path | Role |
|---|---|
app/(app)/ |
Authenticated UI (/home, AI Studio, campaigns, …) |
app/api/ |
JSON API for web and future mobile clients |
services/ |
Domain logic |
packages/core/ |
Shared TypeScript contracts (@bizopt/core) |
workers/ |
Background jobs |
| Route | Purpose |
|---|---|
/home |
Dashboard hub |
/ai-studio |
Multi-variant generation |
/growth-intelligence |
Growth scores & predictions |
/compliance-center |
Startup compliance checks |
/integrations |
Platform connectors |
/billing |
Trial + subscription |