Skip to content

firaslamouchi21/ORION-BI

Repository files navigation

ORION-BI - Multi-Tenant AI-Powered Business Intelligence SaaS

ORION-BI transforms unstructured business data (emails, calendars, PDFs, spreadsheets) into explainable insights for SMBs and agencies.

🏗️ Architecture

  • Frontend: React (Vite) + TailwindCSS + Clerk Auth
  • Backend: Node.js + Express + Clerk
  • AI/Analytics: Python 3.11 (scikit-learn, sentence-transformers, spaCy, Ollama)
  • Database: PostgreSQL (Supabase Free Tier)
  • Storage: Supabase Storage
  • Deployment: Vercel (Frontend), Render (Backend), GitHub Actions (Python Jobs)

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.11+
  • PostgreSQL (or Supabase account)
  • Clerk account (for auth)
  • Ollama (for local LLM) or API key for cloud LLM

Setup

  1. Clone and install dependencies:
# Backend
cd backend
npm install

# Frontend
cd ../frontend
npm install

# Python AI
cd ../python-ai
pip install -r requirements.txt
  1. Database Setup:
# Run migrations
cd database
psql -U postgres -d orion_bi < schema.sql
  1. Environment Variables:

Create .env files in backend/ and frontend/:

backend/.env:

DATABASE_URL=postgresql://user:pass@host:5432/orion_bi
CLERK_SECRET_KEY=sk_test_...
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-supabase-key
JWT_SECRET=your-jwt-secret
PORT=3001

frontend/.env:

VITE_CLERK_PUBLISHABLE_KEY=pk_test_...
VITE_API_URL=http://localhost:3001
  1. Start Development:
# Terminal 1: Backend
cd backend
npm run dev

# Terminal 2: Frontend
cd frontend
npm run dev

# Terminal 3: Python AI (if running locally)
cd python-ai
python main.py

📁 Project Structure

ORION-BI/
├── frontend/          # React + Vite app
├── backend/           # Node.js API
├── python-ai/         # ML/AI analysis modules
├── database/          # SQL schemas and migrations
├── scripts/           # Utility scripts
└── docs/              # Documentation

🔐 Multi-Tenancy

All data is isolated by tenant_id (Clerk org_id). Row-level security enforced at database and API levels.

📊 Data Ingestion

  • Email: IMAP integration or forwarding
  • Calendar: Google Calendar API or .ics upload
  • Documents: PDF, CSV, XLSX via upload
  • Manual: Forms for ground truth data

🤖 AI Features

  • Pattern analysis (seasonality, trends)
  • Anomaly detection
  • Forecasting (ARIMA, exponential smoothing)
  • Natural language question answering
  • Explainable insights with confidence scores

🚢 Deployment

See docs/DEPLOYMENT.md for detailed deployment instructions.

📝 License

MIT

About

Multi-tenant AI-powered Business Intelligence SaaS for small businesses — integrates emails, calendars, CSVs; generates explainable insights using Python and Postgres.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors