66c2bbec8b
- Dashboard with campaign management, asset gallery, and publishing queue - 7-agent pipeline: trend scout, research, scripts, ad creative, video, copy, distribution - Campaign form with screenshot upload, goal picker, platform selection - Campaign detail view with Details/Pipeline/Assets/Chat tabs - Two-set image generation: Gemini AI (NanoBanana MCP) + Canvas Design posters - Remotion video rendering with phone.png frame and real screenshot alignment - honeyDue branding: blue #0079FF, orange #FF9400, Inter font, warm off-white - Asset cards with source badges (Gemini/Canvas/Remotion/Playwright) - Markdown/JSON render endpoint for viewing pipeline outputs as HTML - Settings page with Tavily, Gemini, Postiz, Nextdoor integration management - Claude Chat for campaign feedback loop with streaming SSE - Postiz publishing modal with scheduling - Auth with NextAuth credentials + JWT sessions - SQLite via Prisma with better-sqlite3 adapter Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
810 B
TypeScript
33 lines
810 B
TypeScript
import bcrypt from "bcryptjs";
|
|
import { PrismaClient } from "../lib/generated/prisma/client";
|
|
import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3";
|
|
|
|
const adapter = new PrismaBetterSqlite3({
|
|
url: process.env.DATABASE_URL || "file:./data/marketing.db",
|
|
});
|
|
const prisma = new PrismaClient({ adapter });
|
|
|
|
async function main() {
|
|
const email = process.env.ADMIN_EMAIL || "admin@localhost";
|
|
const password = process.env.ADMIN_PASSWORD || "admin123";
|
|
|
|
await prisma.user.upsert({
|
|
where: { email },
|
|
update: {},
|
|
create: {
|
|
email,
|
|
password: await bcrypt.hash(password, 12),
|
|
name: "Admin",
|
|
},
|
|
});
|
|
|
|
console.log(`Admin user created: ${email}`);
|
|
}
|
|
|
|
main()
|
|
.catch((e) => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
})
|
|
.finally(() => prisma.$disconnect());
|