Skip to main content
Get your SENTi-radar instance running and perform your first sentiment analysis in just a few steps.

Prerequisites

Before you begin, ensure you have:
  • Node.js 18+ installed
  • npm, yarn, or bun package manager
  • A Supabase account (free tier works)
  • (Optional) A Scrape.do account for live social media data

Installation

1

Clone the Repository

Clone the SENTi-radar repository to your local machine:
git clone https://github.com/Yashviit886/SENTi-radar.git
cd SENTi-radar
2

Install Dependencies

Install all required packages:
npm install
3

Set Up Environment Variables

Copy the example environment file and configure your credentials:
cp .env.example .env
Edit .env and add your Supabase credentials (required):
.env
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_PUBLISHABLE_KEY=your-supabase-anon-key
Minimum Configuration: Only Supabase credentials are required to start. You can add Scrape.do, YouTube, and AI service keys later for full functionality.
4

Set Up Supabase Database

Run the database migration to create all required tables:
  1. Go to your Supabase project dashboard
  2. Navigate to SQL Editor
  3. Copy the contents of supabase/migrations/FULL_MIGRATION_RUN_IN_DASHBOARD.sql
  4. Paste and execute the SQL
This creates tables for topics, posts, sentiment stats, alerts, and more.
5

Start the Development Server

Launch the local development server:
npm run dev
The app will be available at http://localhost:8080

Your First Analysis

Now let’s analyze a topic to see SENTi-radar in action:
1

Open the Dashboard

Navigate to http://localhost:8080 in your browser. You’ll see the main dashboard with a search bar.
2

Search for a Topic

Enter a topic, hashtag, or brand name in the search bar. For example:
  • climate change
  • #tech
  • iPhone 15
Click Analyze or press Enter.
3

Wait for Analysis

The system will:
  • Fetch posts from available sources (YouTube by default, X/Reddit if Scrape.do is configured)
  • Analyze emotions using keyword-based classification
  • Generate an AI summary (if Gemini/Groq API keys are configured, otherwise uses local analysis)
  • Calculate sentiment scores and crisis levels
This typically takes 5-15 seconds.
4

Review Results

Once complete, you’ll see:
  • Sentiment Gauge: Overall positive/negative/mixed sentiment (-100 to +100)
  • Emotion Breakdown: Distribution across 6 emotions (joy, anger, sadness, fear, surprise, disgust)
  • AI Insights: Strategic summary with key takeaways
  • Live Feed: Recent posts with sentiment labels
  • Crisis Alerts: Any detected spikes or volatility warnings

Add Live Data Sources

To unlock full functionality with real-time social media scraping: Get live X (Twitter) and Reddit data:
  1. Sign up at scrape.do (free tier available)
  2. Get your API token from the dashboard
  3. Add to .env:
.env
VITE_SCRAPE_TOKEN=your-scrape-do-token
  1. Restart the dev server
Scrape.do provides residential proxies and JavaScript rendering for reliable scraping. See Scrape.do Integration for advanced configuration.

YouTube Data API

Enable YouTube comment analysis:
  1. Go to Google Cloud Console
  2. Create a project and enable YouTube Data API v3
  3. Create an API key
  4. Add to .env:
.env
VITE_YOUTUBE_API_KEY=your-youtube-api-key

AI Services (Optional)

Add Gemini or Groq for enhanced AI summaries:
.env
VITE_GEMINI_API_KEY=your-gemini-api-key
Get a key at Google AI Studio
Fallback: If no AI keys are configured, SENTi-radar uses a local keyword-based summary generator as a fallback.

Deploy Supabase Edge Functions (Optional)

For production use, deploy the backend edge functions:
# Login to Supabase CLI
npx supabase login

# Link your project
npx supabase link --project-ref your-project-ref

# Deploy all functions
npx supabase functions deploy fetch-twitter
npx supabase functions deploy fetch-youtube
npx supabase functions deploy analyze-sentiment
npx supabase functions deploy analyze-topic
npx supabase functions deploy generate-insights
npx supabase functions deploy scheduled-monitor
Set your secrets:
npx supabase secrets set SCRAPE_DO_TOKEN=your-token
npx supabase secrets set YOUTUBE_API_KEY=your-key
npx supabase secrets set GEMINI_API_KEY=your-key

Troubleshooting

Clear cache and reinstall:
rm -rf node_modules package-lock.json
npm install
Verify your VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY are correct. Check that you’ve run the database migration.
  • If using Scrape.do, verify your token is valid and has remaining credits
  • Try a different topic (some topics may have limited content)
  • Enable YouTube API for broader coverage
  • Verify Gemini/Groq API keys are correct
  • Check API quotas haven’t been exceeded
  • The local fallback should generate a basic summary even without AI keys

Next Steps

Architecture Overview

Understand how the system works

Environment Variables

Complete configuration reference

Analyzing Topics

Learn advanced analysis techniques

Deployment Guide

Deploy to production

Build docs developers (and LLMs) love