Skip to content

Repository files navigation

HIVE — Marketing OS by JD Nexus

A Next.js app that makes the HIVE marketing-agency-OS prototype functional with real data: auth, a SQLite-backed API, a WhatsApp lead-capture webhook, and an AI content-generation endpoint (real Claude API when ANTHROPIC_API_KEY is set, simulated output otherwise).

Getting started

npm install
npx drizzle-kit push --force
npx tsx src/db/seed.ts
npm run dev

Open http://localhost:3000 and log in with james@jdnexus.co / hive2026.

Architecture

  • The prototype UI (public/prototype.html) is a single-file React app loaded via CDN scripts, served through src/app/prototype/route.ts inside an iframe.
  • src/components/HiveApp.tsx bridges the iframe to the real Next.js API via postMessage.
  • src/db/schema.ts defines the Drizzle/SQLite schema; all tables are scoped by agencyId for multi-tenancy.
  • API routes under src/app/api/* cover clients, jobs, approvals, leads, messages, invoices, and activity.
  • src/app/api/whatsapp/webhook handles the Meta WhatsApp Business verification handshake and inbound messages; src/app/api/whatsapp/simulate is a dev-only helper to exercise that flow without real Meta credentials.
  • src/app/api/ai/generate calls Claude when ANTHROPIC_API_KEY is set, otherwise returns realistic simulated variants.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages