Skip to content

Repository files navigation

KORE Dashboard

AI-Powered Business Intelligence, Instantaneously.

Type a company name. Get a full analyst-grade dashboard in seconds.
Powered by Gemini & Groq · Built on Next.js 16 + FastAPI · Deployed on Vercel + Railway


Next.js FastAPI TypeScript Gemini Groq License: MIT


What is KORE?

KORE (Knowledge-Oriented Research Engine) is a full-stack AI platform that transforms a plain-text query like "Analyse Apple Inc." into a richly visualised, multi-tab business intelligence dashboard — in 15–30 seconds.

It's not a report generator. It's a live analytical workspace where you can:

  • Explore AI-generated dashboards across multiple thematic tabs
  • Chat with the AI directly about what you see
  • Ask it to refresh specific modules, create temporary analysis tabs, or reload for a different subject — all from a single chat input

"Business intelligence at the speed of thought."


Features

Feature Description
company Company Analysis Full financial, market, competitor, and business model breakdowns
startup Startup Analysis Lean Canvas, TAM/SAM/SOM, SWOT, GTM strategy, competitive matrix
chat AI Chat Three-action system: CHAT, TEMPORARY_TAB, NEW_DASHBOARD
modules Module Types KPIs, bar/line/area/grouped charts, pie/donut, tables, feeds, stats
grid Grid System Rigid 25-cell layout — no gaps, no overflows, guaranteed
multi Multi-Provider AI Auto-detects Gemini (AIzaSy…) or Groq (gsk_…) from key prefix
persist Persistent State Dashboard + chat history survive page refresh via localStorage
groq Groq Mode Ultra-fast inference via LLaMA-3.3-70B for sub-10s responses
search Google Search Grounding Live data fetched during research — no hallucinated numbers

Architecture

KORE is a clean two-service architecture. The Next.js frontend proxies all AI calls through a FastAPI backend, which routes to the correct AI provider based on API key type.

┌─────────────────────────────────────────────────────────┐
│                   Next.js 16 Frontend                    │
│  Landing Page → [Animated Load] → Dashboard View         │
│  5×5 Grid Renderer · Tab System · Chat Panel            │
│                      │                                   │
│            /api/generate   /api/chat                     │
└──────────────────────┬──────────────────────────────────┘
                       │  (proxy — keeps API keys server-side)
┌──────────────────────▼──────────────────────────────────┐
│                  FastAPI Backend                          │
│                                                          │
│  GenerateService           ChatService                   │
│       │                        │                         │
│  AIClientFactory ──────────────┘                         │
│  ┌────────────────────────────────┐                      │
│  │ key.startswith("gsk_") → Groq  │                      │
│  │ key.startswith("AIzaSy") → Gemini                     │
│  └────────────────────────────────┘                      │
└──────┬──────────────────────────┬───────────────────────┘
       │                          │
  Groq API                   Gemini API
  llama-3.3-70b-versatile    gemini-2.5-flash-preview
  (ultra-fast inference)     (Google Search grounding)

Generation Pipeline

User Query
    ↓
[FastAPI] Load system prompt from disk (no caching)
    ↓
[AI Client] Research phase with Google Search grounding
    ↓
[AI Client] Orchestration: apply 5×5 grid + module schema
    ↓
[Validator] Check structure, module types, grid cell count
    ↓
Dashboard JSON → Frontend → Render 25 modules

Chat Pipeline

User Message + Chat History + Visible Modules (context)
    ↓
[FastAPI ChatService] Sends to AI with dashboard context
    ↓
AI decides action:
  ├── CHAT           → Analytical response in chat panel
  ├── TEMPORARY_TAB  → New 5×5 tab injected into dashboard
  └── NEW_DASHBOARD  → Full regeneration with new subject

Module System

The dashboard is built on a 5×5 grid (25 cells). Every module occupies a width × height slice, rendered from a strict JSON schema.

Type Sizes Use Case
metric.kpi 1×1 Single KPI with sparkline
metric.dual 2×1 Two KPIs side by side
chart.bar / .line / .area / .hbar 2×2 → 4×3 Time-series & comparisons
chart.grouped 2×2 → 4×3 Multi-series comparisons
chart.pie / .donut 2×2 only Market share, segmentation
table 3×1 → 5×3 Structured data rows
feed 2×1 → 5×2 News, events, lists
deco.stats 3×1 / 4×1 / 5×1 Decorative stat strips
freeform 1×1 → 3×1 Rich HTML filler

Grid Rule: Every generated tab must fill exactly 25 cells. The AI validates this row-by-row before output.


Tech Stack

Frontend

Next.js React TypeScript Tailwind ECharts Three.js

Backend

FastAPI Python Gemini Groq

  • Async/await with exponential backoff retry logic
  • Prompt-from-disk architecture — no caching, always fresh

AI & Orchestration

  • Research Phase — Gemini with Google Search grounding (live data, no hallucinations)
  • Orchestration Phase — Structured JSON output with strict schema validation
  • Chat Phase — Context-aware with compact dashboard_state summary per request

Quick Start

Prerequisites

1. Clone

git clone https://github.com/your-username/Startup_Analyser.git
cd Startup_Analyser

2. Backend Setup

cd fastapi-backend

# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate        # Windows
# source venv/bin/activate   # Mac/Linux

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env → set GEMINI_API_KEY=AIzaSy... or gsk_...

# Start server
uvicorn app.main:app --reload --port 8000

3. Frontend Setup

cd kore-frontend

npm install

cp .env.local.example .env.local
# Edit .env.local → set NEXT_PUBLIC_BACKEND_URL=http://localhost:8000

npm run dev

4. Openhttp://localhost:3000 and type any company or startup name.


Environment Variables

Backend (fastapi-backend/.env)

GEMINI_API_KEY=AIzaSy...    # Gemini (auto-detected from prefix)
# or
GEMINI_API_KEY=gsk_...      # Groq   (auto-detected from prefix)

Frontend (kore-frontend/.env.local)

NEXT_PUBLIC_BACKEND_URL=http://localhost:8000

# Optional: named key slots for the key-switcher UI
NEXT_PUBLIC_GEMINI_KEY_1=gsk_...      # TACO — Groq (ultra-fast)
NEXT_PUBLIC_GEMINI_KEY_2=AIzaSy...    # Max  — Gemini
NEXT_PUBLIC_GEMINI_KEY_3=AIzaSy...    # Sam  — Gemini

The backend auto-detects the AI provider from the API key prefix. No manual provider selection needed.


Project Structure

Startup_Analyser/
├── kore-frontend/              # Next.js 16 app
│   ├── src/
│   │   ├── app/                # Next.js App Router pages
│   │   ├── components/
│   │   │   ├── layout/         # ChatPanel, TabBar, Header
│   │   │   └── modules/        # All 13 module renderers
│   │   ├── hooks/
│   │   │   └── useDashboard.ts # Core state: generate, chat, patch
│   │   └── lib/                # Types, utilities, schema
│   ├── KORE_Architecture_v2.md # Full system design document
│   └── N8N_CHAT_SYSTEM_PROMPT.md
│
├── fastapi-backend/            # Python FastAPI service
│   ├── app/
│   │   ├── main.py             # Entry point
│   │   ├── integrations/
│   │   │   ├── gemini_client.py
│   │   │   ├── groq_client.py
│   │   │   └── ai_factory.py   # Provider auto-detection
│   │   └── services/
│   │       ├── generate.py
│   │       └── chat.py
│   ├── prompts/
│   │   ├── generate.md         # Master generation prompt
│   │   └── chat.md             # Chat system prompt
│   └── requirements.txt
│
└── mds/                        # Reference docs & architecture notes

Usage

  1. Enter a query — e.g. Analyse Zomato or Startup: AI code review tool
  2. KORE generates a full multi-tab dashboard using live research data
  3. Switch tabs — Overview, Financials, Market, Business Model, Competitors
  4. Open the chat panel and ask:
    • "Why did revenue drop in Q3?" → Analytical answer in chat
    • "Compare with its top 3 competitors" → New temporary tab created
    • "Now analyse Swiggy instead" → Full dashboard regenerated
  5. State persists — refresh the page and your dashboard is still there

Deployment

Platform Component Notes
Vercel Frontend cd kore-frontend && vercel
Railway Backend Uses Procfile / nixpacks.toml
Render Backend Uses render.yaml — free tier supported
Docker Backend Dockerfile included

Set NEXT_PUBLIC_BACKEND_URL in Vercel to your Railway/Render backend URL.


Performance

Operation Time
Dashboard generation (simple) 15–30 s
Dashboard generation (complex) 30–60 s
Groq mode (LLaMA-3.3-70B) ~5–10 s
Chat response 5–15 s
Temporary tab creation 10–20 s

Roadmap

  • PDF / PowerPoint export of dashboards
  • Dashboard templates and saved presets
  • Real-time collaboration (shared dashboards)
  • Public API for programmatic access
  • Mobile-optimised layout
  • Multi-language support

Contributing

Pull requests are welcome. For major changes, open an issue first.

  1. Fork the repo
  2. Create your branch: git checkout -b feature/your-feature
  3. Commit: git commit -m 'Add your feature'
  4. Push: git push origin feature/your-feature
  5. Open a Pull Request

License

MIT License — see LICENSE for details.


Built with Next.js FastAPI Gemini Groq

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages