Skip to content
Ganesh75-webPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SignalFi - AI-Powered Daily Portfolio Intelligence

Your personalized, non-repetitive daily briefing for your portfolio and watchlist.

🚀 What is SignalFi?

SignalFi is an AI-powered platform that generates daily briefings for your stock portfolio. It tells you what actually matters—without repeating news you've already seen.

Key Features:

  • 🤖 AI-powered analysis using Google Gemini 2.0 Flash
  • 🎯 Severity scoring (1-10) for every event
  • 🚫 Zero repetition - never repeats news you've already read
  • 🎧 Audio briefings for Pro/Premium subscribers
  • 📊 Portfolio tracking with real-time updates
  • 🔒 Regulatory-safe (NO buy/sell recommendations)

📋 Prerequisites

Before deploying, you'll need these API keys:

  1. Supabase (database + auth)

  2. Finnhub API (stock data - free tier)

  3. Google Gemini API (AI analysis - free tier)

  4. OpenAI API (audio generation - optional)

  5. Stripe (subscriptions - optional for now)

🛠️ Local Development

  1. Clone and install:

    git clone <your-repo>
    cd SignalFi
    npm install
  2. Set up environment:

    cp .env.example .env.local

    Then add your API keys to .env.local

  3. Set up the database:

    • Go to your Supabase project
    • Navigate to SQL Editor
    • Run the migration from lib/briefing/generator.ts (or use the Supabase migrations we created)
  4. Run the dev server:

    npm run dev
  5. Visit http://localhost:3000

🚀 Deploying to Vercel

Method 1: Vercel Dashboard (Easiest)

  1. Push your code to GitHub:

    git init
    git add .
    git commit -m "Initial commit"
    git remote add origin <your-github-repo>
    git push -u origin main
  2. Deploy on Vercel:

    • Go to https://vercel.com/new
    • Import your GitHub repository
    • Add environment variables (see below)
    • Click "Deploy"

Method 2: Vercel CLI

  1. Install Vercel CLI:

    npm install -g vercel
  2. Login:

    vercel login
  3. Deploy:

    vercel --prod

Required Environment Variables for Vercel

Add these in your Vercel project settings:

NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
FINNHUB_API_KEY=your_finnhub_key
GOOGLE_GEMINI_API_KEY=your_gemini_key
OPENAI_API_KEY=your_openai_key

📁 Project Structure

signalfi/
├── src/
│   ├── app/                    # Next.js 15 App Router
│   │   ├── api/               # API routes
│   │   │   ├── briefing/      # Briefing generation
│   │   │   ├── audio/         # TTS generation
│   │   │   └── stocks/        # Stock data endpoints
│   │   ├── dashboard/         # Main dashboard
│   │   ├── portfolio/         # Holdings management
│   │   ├── watchlist/         # Watchlist management
│   │   ├── login/            # Authentication
│   │   └── pricing/          # Pricing page
│   └── ...
├── lib/
│   ├── ai/                    # AI integration
│   │   ├── gemini.ts         # Briefing generation
│   │   └── tts/              # Audio generation
│   ├── briefing/              # Briefing logic
│   │   └── generator.ts      # Main briefing engine
│   ├── stocks/                # Stock data
│   │   ├── finnhub.ts        # Finnhub API
│   │   └── yahoo.ts          # Yahoo Finance
│   └── types.ts               # TypeScript types
├── utils/
│   └── supabase/              # Supabase client setup
└── middleware.ts              # Auth middleware

🧪 Testing the App

  1. Sign up - Create an account
  2. Add holdings - Go to Portfolio → Add stocks you own
  3. Add watchlist - Go to Watchlist → Add stocks you're tracking
  4. Generate briefing - Click "Generate Briefing" on dashboard
  5. View results - See AI analysis with severity scores

🔑 Database Schema

The app uses 7 main tables:

  • profiles - User preferences and subscription tier
  • holdings - Portfolio positions
  • watchlist - Tracked stocks
  • daily_reports - Generated briefings
  • reported_events - Memory system (prevents repetition)
  • report_sections - Individual briefing sections
  • subscriptions - Stripe subscription data

🎯 How the AI Works

  1. Data Collection - Fetches stock prices and news for your holdings/watchlist
  2. Deduplication - Checks reported_events to avoid repeating news
  3. Analysis - Gemini analyzes what's new and assigns severity scores
  4. Generation - Creates structured briefing with sections
  5. Storage - Saves report and events for future reference

📊 Subscription Tiers

Feature Free Pro ($9.99) Premium ($19.99)
Holdings 3 15 Unlimited
Watchlist 5 25 Unlimited
Daily Briefings 3 15 Unlimited
Audio ✗ ✓ ✓
History 7 days 30 days Unlimited

🤝 Contributing

Contributions welcome! This is a demonstration project for AI-powered financial intelligence.

📄 License

MIT

🙏 Acknowledgments

  • Supabase - Backend infrastructure
  • Google Gemini - AI analysis
  • Finnhub - Real-time stock data
  • OpenAI - Text-to-speech
  • Vercel - Hosting platform

Built with Next.js 15, TypeScript, Supabase, and Google Gemini

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages