Skip to content

iamanimeshdev/Prisma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PRISMA πŸ’Ž

Personal Research & Intelligent System Manager Assistant

πŸ† AMD Slingshot Hackathon Submission

PRISMA is a locally-hosted, AI-powered developer productivity assistant that lives on your desktop and in your pocket. It combines a premium Electron desktop app, a Telegram bot, and a voice interface into one unified system β€” powered by an LLM with 22 autonomous AI tools that can chain together to complete complex multi-step workflows without human intervention.

Built with Node.js, Express, Electron, and SQLite. Runs entirely on your local machine. Your data never leaves your device.


🎯 What Makes PRISMA Different?

Traditional AI Assistants PRISMA
Reactive β€” waits for you to ask Proactive β€” monitors, scans, and alerts autonomously
Forgets everything between chats Persistent memory β€” remembers your contacts, preferences, projects
Text-only, browser-only Desktop app + Telegram + Voice (wake word "Prisma")
Can only chat 22 tools β€” sends emails, pushes code, creates PRs, scans for secrets
No background processing Pulse Engine β€” 6 autonomous loops running 24/7

✨ Key Features

🧠 Persistent Memory System

PRISMA proactively learns and remembers facts about you β€” contacts, preferences, GitHub usernames, project details β€” across all conversations. Stored locally in SQLite.

πŸ“§ Gmail Integration

Read, send, and schedule emails through natural language. Proactively monitors specific senders and pushes urgent Telegram alerts when they email you.

πŸ“… Google Calendar

Create events, check your schedule, and get automatic meeting briefs 10 minutes before each event via desktop notification and Telegram.

πŸ”§ Smart GitHub Push

Drag & drop any project folder and PRISMA will:

  • Auto-detect the tech stack (Node, Python, Java, Go, Rust, etc.)
  • Generate a professional README.md with directory tree
  • Generate a stack-specific .gitignore
  • Init git, create the repo, commit, and push β€” all in one step

πŸ›‘οΈ Repo Guardian β€” Proactive Security Scanner

Every push is automatically scanned for leaked secrets: AWS keys, API tokens, .env files, private keys, and more. Results are emailed as a styled HTML security report.

πŸ€– AI-Powered Issue β†’ PR Generation

When a new GitHub issue is opened, PRISMA reads the entire codebase, sends it to an LLM, generates file changes, commits to a new branch via the Git Trees API, and opens a draft Pull Request β€” fully autonomously.

πŸ” GitHub Discovery Tools

List repositories for any GitHub user, get repo summaries with stats, and search across all public GitHub repos for code or topics.

⏰ Job Scheduler

Schedule emails for future delivery, set up recurring actions (daily/weekly/hourly), and manage all pending jobs through natural language.

πŸŽ™οΈ Voice Interface

  • Wake word detection β€” Say "Prisma" to activate (Porcupine)
  • Speech-to-Text β€” Local Whisper server for high-accuracy transcription
  • Text-to-Speech β€” Microsoft Edge neural voices for natural responses
  • Full hands-free conversation loop

πŸ’¬ Telegram Bot

Access PRISMA from anywhere. Text messages, voice notes, and tool execution indicators. Commands: /start, /new, /emailcheck, /emailstop, /syncrepos, /help.

πŸ«€ Pulse Engine β€” Autonomous Background Agent

The heartbeat of PRISMA. Runs 6 parallel monitoring loops:

Loop Interval Purpose
πŸ“§ Email 5 min Checks Gmail, alerts for monitored senders
πŸ“… Calendar 5 min Sends meeting briefs before events
⏰ Reminders 10 sec Fires desktop + Telegram notifications
πŸ”§ Repo Sync 10 min Discovers repos, registers GitHub webhooks
βš™οΈ Jobs 10 sec Executes scheduled emails and recurring tasks
🧹 Cleanup 1 hour Purges old notification logs

🌐 GitHub Webhooks (Instant Notifications)

Auto-creates an ngrok tunnel, registers webhooks on all your repos, and handles push, issues, pull_request, pull_request_review, and issue_comment events with instant Telegram alerts.


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Electron Desktop   │─IPC─▢│   Express API    β”‚
β”‚  (Glassmorphism UI) β”‚      β”‚   (server.js)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚   Telegram Bot      │────────────────
β”‚  (Text + Voice)     β”‚               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
                               β”‚  AI Engine  │──▢ OpenRouter LLM
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚  (ai.js)    β”‚
β”‚  GitHub Webhooks    │───────▢│             β”‚
β”‚  (via ngrok)        β”‚        β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
                               β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚   22 Tools  β”‚
β”‚   Pulse Engine      │───────▢│  Registry   β”‚
β”‚  (6 bg loops)       β”‚        β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
                               β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚  SQLite DB  β”‚
β”‚   Voice Engine      │───────▢│  (Local)    β”‚
β”‚ (Wake + STT + TTS)  β”‚        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Layer Technology
Desktop App Electron, HTML/CSS/JS
Backend Node.js, Express
AI Model OpenRouter API (LLM)
Database SQLite (better-sqlite3)
Auth Google OAuth 2.0
Email/Calendar Gmail & Calendar API (googleapis)
Voice STT Whisper (Python FastAPI server)
Voice TTS Microsoft Edge TTS (edge-tts)
Wake Word Porcupine (Picovoice)
Telegram node-telegram-bot-api
Tunneling ngrok (for webhooks)
Validation Zod
GitHub GitHub CLI (gh)

πŸš€ Getting Started

Prerequisites

  • Node.js v18+
  • Python 3.8+ (for Whisper STT server)
  • GitHub CLI (gh) installed and authenticated
  • SoX (for voice recording on Windows)
  • ngrok (for GitHub webhooks)

Installation

# Clone the repository
git clone https://github.com/iamanimeshdev/Prisma.git
cd Prisma

# Install dependencies
npm install

# Python setup (for voice)
pip install faster-whisper edge-tts fastapi uvicorn

Configuration

Create a .env file in the root directory:

# AI
OPENROUTER_API_KEY=your_openrouter_api_key

# Google OAuth (Register at Google Cloud Console)
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT_URI=http://localhost:3000/auth/google/callback

# Telegram Bot
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_OWNER_ID=your_telegram_user_id

# Voice
PORCUPINE_ACCESS_KEY=your_picovoice_access_key
TTS_VOICE=en-US-AvaNeural
SOX_PATH=C:/Program Files (x86)/sox-14-4-2/sox.exe
PYTHON_PATH=python

# Server
PORT=3000
SESSION_SECRET=prisma_secure_random_string

Run

# Start everything (Electron + Backend server)
npx electron .

πŸ“ Project Structure

Prisma/
β”œβ”€β”€ electron/                # Electron app (frontend)
β”‚   β”œβ”€β”€ main.js              # Main process + IPC handlers
β”‚   β”œβ”€β”€ preload.js           # Secure IPC bridge
β”‚   β”œβ”€β”€ renderer.js          # UI logic + streaming
β”‚   β”œβ”€β”€ index.html           # App shell
β”‚   └── styles.css           # Glassmorphism dark theme
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ ai.js            # LLM gateway (streaming + tool loops)
β”‚   β”‚   β”œβ”€β”€ context.js       # System prompt + conversation context
β”‚   β”‚   β”œβ”€β”€ database.js      # SQLite schema + helpers
β”‚   β”‚   └── toolRegistry.js  # Dynamic tool registration
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ auth.js          # Google OAuth 2.0
β”‚   β”‚   β”œβ”€β”€ pulse.js         # Background agent (958 lines)
β”‚   β”‚   β”œβ”€β”€ scheduler.js     # Job execution engine
β”‚   β”‚   β”œβ”€β”€ telegramBot.js   # Telegram integration
β”‚   β”‚   └── tunnel.js        # ngrok tunnel manager
β”‚   β”œβ”€β”€ tools/
β”‚   β”‚   β”œβ”€β”€ emailTools.js    # Gmail read/send/monitor
β”‚   β”‚   β”œβ”€β”€ calendarTools.js # Google Calendar
β”‚   β”‚   β”œβ”€β”€ memoryTools.js   # Persistent memory CRUD
β”‚   β”‚   β”œβ”€β”€ gitTools.js      # Smart GitHub push
β”‚   β”‚   β”œβ”€β”€ githubTools.js   # Repo search/list/summarize
β”‚   β”‚   β”œβ”€β”€ repoGuardian.js  # Security scanner
β”‚   β”‚   β”œβ”€β”€ issuePrTools.js  # AI issueβ†’PR generator
β”‚   β”‚   └── scheduleTools.js # Job scheduler
β”‚   β”œβ”€β”€ voice/
β”‚   β”‚   β”œβ”€β”€ engine.js        # Voice conversation loop
β”‚   β”‚   β”œβ”€β”€ wakeWord.js      # Porcupine wake word
β”‚   β”‚   β”œβ”€β”€ stt.js           # Speech-to-text client
β”‚   β”‚   β”œβ”€β”€ tts.js           # Text-to-speech (Edge TTS)
β”‚   β”‚   └── voiceServer.js   # Local Whisper FastAPI server
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   └── webhookRoutes.js # GitHub webhook handlers
β”‚   └── server.js            # Express API + SSE streaming
β”œβ”€β”€ prisma.db                # Local SQLite database
β”œβ”€β”€ package.json
└── .env                     # Configuration (not committed)

πŸ”’ Privacy & Security

PRISMA is local-first by design:

  • All data stored in a local SQLite file (prisma.db) β€” nothing leaves your machine
  • Google OAuth uses secure system browser (not embedded webviews)
  • API calls are only made with user-requested context
  • No telemetry, no tracking, no cloud storage

🧰 All 22 AI Tools

Category Tools
Email get_unread_emails, summarize_email, extract_event_from_email, send_email, monitor_email_sender, stop_monitoring_sender
Calendar create_calendar_event, get_upcoming_events, create_reminder
Memory store_memory, recall_memory, update_memory, forget_memory
GitHub push_to_github, list_github_repos, summarize_github_repo, search_github, generate_pr_from_issue
Security scan_repo
Scheduler schedule_email, schedule_action, list_scheduled_jobs, cancel_scheduled_job

πŸ“ License

Distributed under the MIT License.


PRISMA β€” Built with ❀️ for the AMD Slingshot Hackathon

About

πŸ”· AI-powered developer productivity assistant with 22 autonomous tools β€” Gmail, Calendar, GitHub automation, security scanning, voice interface & Telegram bot. Built with Electron + Node.js. AMD Slingshot Hackathon submission.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors