Sentra AI is a production-style enterprise AI intelligence platform built with Next.js 15, TypeScript, Tailwind CSS, ShadCN-style UI primitives, Framer Motion, GSAP, Three.js / React Three Fiber, AI/ML API, Bright Data, Speechmatics, Lucide icons, and Recharts.
The app presents a futuristic operating system for autonomous business intelligence: landing page, authentication screens, AI dashboard, live alert center, enterprise chat, voice playback, charts, command palette, and typed API routes.
- Premium dark glassmorphism UI with animated gradients, particles, glowing AI orb, smooth reveal animations, and responsive layouts.
- Dashboard for competitor monitoring, market intelligence, live signals, sentiment/risk analysis, company tracking, trend visualization, and AI recommendations.
- AI chat interface with markdown responses, typing animation, prompt shortcuts, thinking state, contextual follow-up questions, retrieval labels, and voice playback controls.
- AI World Engine with a WebGL intelligence globe, adaptive visualizations, relationship graph, predictive timelines, scenario simulations, narrated briefings, and cinematic World Pulse presentation mode.
- Real-time AI Activity Console backed by server-sent events, with measured collection/API lifecycle logs, virtualized terminal output, live source tracking, system health telemetry, and safe summarized thought-stream cards.
- Visual-forensics analyst workspace for prompt-directed image investigations, comparison review, verdict scoring, report history, and PDF export.
- Backend API routes for Bright Data intelligence collection (SERP + Web Unlocker), AI/ML API analysis, and Speechmatics voice synthesis.
- Demo-safe fallbacks in local dev when provider keys are absent; production requires live Bright Data for GTM collection paths.
- Import the repo at vercel.com/new (Next.js auto-detected).
- Set env vars from
.env.example(Vercel block) — runnpm run env:check:vercelfor the list. - Add Supabase redirect URL:
https://<your-app>.vercel.app/auth/callback - Run
npm run secrets:synclocally so AIML / Bright Data keys live in the Supabase vault. - Deploy —
vercel.jsonuses a daily cron (Hobby-safe). Full guide: docs/DEPLOY_VERCEL.md.
npm install
npm run devOpen http://localhost:3001 (dev server default port).
.env.local is gitignored — it is not pushed to GitHub. New developers:
npm run env:setup # creates .env.local from .env.example
# add Supabase keys (see docs/COLLABORATOR_SETUP.md)
npm run env:check
npm run devGet keys from the project owner (secure message) or a Supabase team invite. Full guide: docs/COLLABORATOR_SETUP.md and docs/SUPABASE_SETUP.md.
You can run Sentra without Supabase. Leave NEXT_PUBLIC_SUPABASE_URL and
NEXT_PUBLIC_SUPABASE_ANON_KEY empty in .env.local.
npm run env:setupthen sync provider keys to Supabase vault (npm run secrets:sync) or add AIML_API_KEY, Bright Data, and SPEECHMATICS_API_KEY locally.npm run dev→ open http://localhost:3001 → Enter workspace (local mode).- Monitors are stored in browser localStorage per machine; chat history is session-only until you add Supabase for deploy.
When you deploy, create a Supabase project, run supabase/migrations/001_initial_schema.sql,
add the three Supabase env vars, and real auth + cloud persistence turn on automatically.
Copy .env.example to .env.local and fill in the provider keys you want to
enable:
# Optional until production deploy
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
AIML_API_KEY=
AIML_BASE_URL=https://api.aimlapi.com/v1
AIML_MODEL_ANALYSIS=gpt-4o-mini
AIML_MODEL_CHAT=gpt-4o
AIML_MODEL_SEARCH=gpt-4o-search-preview
AIML_MODEL_INTENT=gpt-4o-mini
AIML_MODEL_WORLD=gpt-4o
AIML_MODEL_VISION=gpt-4o
AIML_MODEL_TRANSCRIBE=#g1_whisper-medium
SENTRA_TIMEZONE=Asia/Colombo
BRIGHT_DATA_API_KEY=
BRIGHT_DATA_CACHE_TTL_SECONDS=900
BRIGHT_DATA_SERP_ENDPOINT=https://api.brightdata.com/request
BRIGHT_DATA_SERP_ZONE=
BRIGHT_DATA_WEB_UNLOCKER_ENDPOINT=https://api.brightdata.com/request
BRIGHT_DATA_WEB_UNLOCKER_ZONE=
BRIGHT_DATA_SCRAPER_ENDPOINT=
SPEECHMATICS_API_KEY=Without keys, Sentra AI uses polished demo intelligence so the UI and API routes remain functional.
/- cinematic landing page/sign-in- Supabase auth (email, magic link, Google, GitHub)/sign-up- create workspace/onboarding- first-run setup checklist/settings- integration status (Bright Data zones, AI/ML API, Speechmatics)/dashboard- intelligence operating system with live briefing refresh/chat- AI analyst chat with microphone transcription and voice playback/analyst- AI World Engine and visual-forensics investigation workspaces/alerts- enterprise alert center
POST /api/chat- answers general chat questions using AI/ML API live web search; monitoring, competitor, pricing, and URL prompts use Bright Data collection first, then AIML analysis with citationsPOST /api/transcribe- transcribes microphone recordings (AIML Whisper)GET|POST /api/intelligence- returns risks, opportunities, recommendations, confidence score, and live signalsPOST /api/world-engine- creates visualization-ready global intelligence models with live-search verification and Bright Data evidence when configuredPOST /api/world-engine/stream- streams real collection, web-search, synthesis, visualization, and completion activity events over SSE while returning the completed World Engine modelPOST /api/image-analysis- analyzes uploaded visual evidence after an investigator submits a promptPOST /api/bright-data- reusable Bright Data collection endpoint (auth required)POST /api/voice- Speechmatics text-to-speech (WAV)GET /api/cron/monitors- scheduled GTM monitor checks (Vercel Cron +CRON_SECRET)GET /api/signals- latest signals for the signed-in userGET|POST /api/monitors- CRUD custom monitorsPOST /api/monitors/[id]/check- Bright Data + AIML monitor check (manual or cron)GET /api/health/integrations- integration readiness for settings/onboarding
- Create a project at supabase.com.
- Run the SQL in
supabase/migrations/001_initial_schema.sqlin the SQL editor. - Enable Email, Magic Link, Google, and GitHub providers in Authentication.
- Set redirect URL:
http://localhost:3001/auth/callback(and your production URL).
Track: GTM Intelligence
Full submission guide: docs/HACKATHON_GTM_SUBMISSION.md
Operator setup (zones, Vercel, vault): docs/USER_SETUP.md
Stack: Bright Data (SERP + Web Unlocker) → AI/ML API → Supabase → Vercel. Voice via Speechmatics.
npm run secrets:sync— AIML, Bright Data zones, Speechmatics in Supabase vault.- Deploy to Vercel with Supabase env vars +
CRON_SECRET(see hackathon doc). - Settings → AI/ML API + Bright Data + Speechmatics Ready.
- Dashboard → Refresh briefing → Live · Bright Data (not Sample).
- Chat → paste competitor
https://URL → badge Bright Data + AIML. - Alerts → monitor → Check now → executive report.
- Optional: World Engine, document upload (Featherless), voice play.
Bright Data promo: unlocked on brightdata.com.
- On Vercel/production, sample Bright Data fallback is disabled unless
SENTRA_ALLOW_DEMO_FALLBACK=true. - Active monitors are checked on a schedule via
/api/cron/monitors(daily on Vercel Hobby; seevercel.jsonand docs/DEPLOY_VERCEL.md).
- Deploys cleanly on Vercel.
- Provider calls run in Node.js API routes and keep secrets server-side.
- Chat uses Bright Data only when configured and a collection-oriented prompt is detected; otherwise it uses AI/ML API search-capable models.
- Demo fallbacks are intentionally typed and isolated in
src/dataandsrc/servicesso they can be swapped for real data pipelines.