Skip to content

Misrilal-Sah/MirraSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MirraSync Typing subtitle

Tech Stack


React Framer Motion Zustand Node.js Express Prisma MySQL

32+ Models 24 Free 8 Providers Real-time SSE MIT


🧠 Multi-Model
Up to 20 AI models
simultaneously
⚑ Real-time SSE
Token-by-token
streaming
πŸ”“ 100% Free
24 models, zero
API key needed
πŸ” Encrypted
AES-256-GCM
key storage

🏠 Live Demoβ€‚Β·β€‚βš‘ Quick Startβ€‚Β·β€‚πŸ“‘ API Docsβ€‚Β·β€‚πŸ€ Contribute



✨ What is MirraSync?

MirraSync is an open-source multi-AI chat platform that lets you fire one prompt at up to 20 AI models simultaneously and watch their answers stream in side-by-side β€” no API keys required, no cost, no limits. Built for developers, researchers, and curious minds who want to see how different AI models think.

🧠 Multi-Model ⚑ Real-time πŸ”“ Free
Up to 20 models at once Token-by-token SSE streaming 24 models, no key needed

🎯 Features

πŸ€– Core AI Experience
  • Multi-model parallel chat β€” Fire 1–20 AI models simultaneously on the same prompt, responses stream independently
  • Real-time SSE streaming β€” Token-by-token streaming into isolated columns, zero latency feel
  • 32+ models across 8 providers β€” 24 free-to-use + 8 Pro models unlockable with your own API key
  • Single model mode β€” Falls back to a clean classic chat UI when one model is active
  • Context window control β€” Tune how much conversation history each model receives
πŸŽ™οΈ Smart Input
  • File & image attachments β€” Drag-drop JPG, PNG, WEBP, GIF, PDF, TXT, MD, CSV, DOCX (max 10MB / 5 files)
  • Voice input β€” Web Speech API with live transcription overlay
  • Prompt Cleaner β€” One click: AI rewrites your prompt for clarity and shows a visual diff
  • Markdown rendering β€” Full GitHub-Flavored Markdown with syntax-highlighted code blocks
πŸ” Authentication
  • Email + password with 6-digit OTP email verification
  • Google OAuth one-click sign-in
  • Forgot / reset password via branded email link
  • Guest access β€” unlimited messages with rate limiting, zero sign-up required
πŸ’Ύ User & Conversation Management
  • Full chat history stored in MySQL, grouped by date in sidebar
  • Rename, pin, archive, and delete conversations
  • Bring-your-own API keys β€” stored AES-256-GCM encrypted at rest
  • Unlock Pro models just by adding your own valid provider API key
  • User preferences: default models, context size, model order, theme, language
🏠 Homepage
  • RAG Chatbot β€” AI assistant trained on project knowledge (Groq-powered)
  • Animated model marquee with provider SVG logos
  • Compare Plans pricing table
  • Framer Motion animated feature showcase cards
  • Scroll-to-top button
🎨 Design System
  • Dark mode default, full light mode toggle (homepage always dark)
  • 100% custom UI β€” no shadcn, no Tailwind, pure CSS variables
  • Fully responsive β€” 300px to 4K, mobile-first
  • Custom scrollbars, dropdowns, modals, toasts, toggles
  • Framer Motion micro-animations throughout

πŸ—οΈ Tech Stack

Full Stack


Layer Technology Purpose
Frontend React 18 + React Router v6 SPA routing & UI
Styling CSS Custom Properties Design token system
Animations Framer Motion Page & component transitions
State Zustand Lightweight global stores
Backend Express.js (Node.js) REST API + SSE server
ORM Prisma Type-safe DB access
Database MySQL Persistent storage
Auth JWT + bcryptjs Session & password security
OAuth Google Identity Services Social sign-in
Email Nodemailer (Gmail SMTP) OTP & reset emails
File Storage Cloudinary Image & document hosting
AI Streaming Server-Sent Events (SSE) Real-time token delivery
Encryption Node.js crypto AES-256-GCM API key at-rest encryption
Markdown react-markdown + remark-gfm Rich response rendering
Highlighting react-syntax-highlighter Code block theming

πŸ€– Supported AI Models

All 24 free models work out of the box β€” no API key required. Add your own key to unlock Pro tier.

πŸ™ GitHub Models
Model ID πŸ‘οΈ Vision 🧠 Reasoning
GPT-5 openai/gpt-5 βœ… βœ…
Grok 3 xai/grok-3 ❌ βœ…
DeepSeek R1 0528 deepseek/deepseek-r1-0528 ❌ βœ…
πŸ”΅ Google AI Studio
Model ID πŸ‘οΈ Vision 🧠 Reasoning
Gemini 2.5 Flash gemini-2.5-flash βœ… βœ…
Gemini 3 Flash gemini-3-flash βœ… ❌
Gemini 3.1 Flash Lite gemini-3.1-flash-lite βœ… ❌
⚑ Groq
Model ID πŸ‘οΈ Vision 🧠 Reasoning
Kimi K2 Instruct moonshotai/kimi-k2-instruct ❌ βœ…
Llama 4 Scout meta-llama/llama-4-scout-17b-16e-instruct βœ… ❌
Qwen3-32B qwen/qwen3-32b ❌ βœ…
🧠 Cerebras · Cohere · Mistral · OpenRouter · Cloudflare Workers AI

Cerebras

Model ID Note
GPT-OSS 120B gpt-oss-120b Fastest inference anywhere
Llama 3.1 8B llama3.1-8b Near-instant responses

Cohere

Model ID Note
Command A Reasoning command-a-reasoning-08-2025 Exclusive reasoning model
Command A Vision command-a-vision-07-2025 Exclusive vision model
Aya Expanse 32B c4ai-aya-expanse-32b 23+ languages

Mistral

Model ID πŸ‘οΈ
Mistral Small 3.1 mistral-small-2503 βœ…
Mistral Large mistral-large-latest βœ…
Codestral codestral-latest ❌

OpenRouter

Model ID Note
Hermes 3 Llama 405B nousresearch/hermes-3-llama-3.1-405b Largest open-source LLM
Step 3.5 Flash stepfun/step-3.5-flash Exclusive provider
Qwen3 Coder qwen/qwen3-coder Coding specialist

Cloudflare Workers AI

Model ID Note
IBM Granite 3 8B @ibm/granite-3-8b-instruct Enterprise-grade IBM
Qwen QwQ 32B @cf/qwen/qwq-32b Reasoning specialist
GLM 4.7 Flash @cf/zhipuai/glm-4-32b-0520 Chinese frontier AI

πŸ’Ž Subscription Tiers

Feature πŸ‘€ Guest πŸ†“ Free ⭐ Pro (Soon)
Messages Unlimited (10/min) Unlimited (20/min) Unlimited (highest)
Available models 10 24 32+
Active models at once 3 10 20
Chat history ❌ βœ… βœ…
File uploads ❌ βœ… βœ…
Custom API keys ❌ βœ… βœ…
Pro model unlock (own key) ❌ βœ… Included

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • MySQL 8+ (local or cloud)
  • npm / yarn

1 β€” Clone & Install

git clone https://github.com/Misrilal-Sah/MirraSync.git
cd MirraSync

# Backend
cd backend && npm install

# Frontend
cd ../frontend && npm install

2 β€” Configure Environment

# Backend
cd backend
cp .env.example .env

# Frontend
cd ../frontend
cp .env.example .env
πŸ“‹ Full backend .env reference
# ─── App ───────────────────────────────────────────────────────
NODE_ENV=development
PORT=5000
FRONTEND_URL=http://localhost:3000

# ─── JWT ───────────────────────────────────────────────────────
JWT_SECRET=your_random_32_char_secret_here
JWT_EXPIRES_IN=7d

# ─── Encryption ────────────────────────────────────────────────
# Generate: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
ENCRYPTION_KEY=your_64_char_hex_key_here

# ─── Database ──────────────────────────────────────────────────
DATABASE_URL=mysql://root:password@localhost:3306/mirrasync

# ─── Google OAuth ──────────────────────────────────────────────
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

# ─── Email (Gmail) ─────────────────────────────────────────────
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_EMAIL=[email protected]
SMTP_PASSWORD=your_gmail_app_password
SMTP_FROM_NAME=MirraSync

# ─── Cloudinary ────────────────────────────────────────────────
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

# ─── AI Providers ──────────────────────────────────────────────
GITHUB_MODELS_API_KEY=github_pat_xxxxxxxxxxxx
GITHUB_MODELS_BASE_URL=https://models.github.ai/inference

GOOGLE_AI_API_KEY=AIzaSy_xxxxxxxxxxxx
GOOGLE_AI_BASE_URL=https://generativelanguage.googleapis.com/v1beta

GROQ_API_KEY=gsk_xxxxxxxxxxxx
GROQ_BASE_URL=https://api.groq.com/openai/v1

CEREBRAS_API_KEY=csk-xxxxxxxxxxxx
CEREBRAS_BASE_URL=https://api.cerebras.ai/v1

COHERE_API_KEY=your_cohere_key
COHERE_BASE_URL=https://api.cohere.com/v2

MISTRAL_API_KEY=your_mistral_key
MISTRAL_BASE_URL=https://api.mistral.ai/v1

OPENROUTER_API_KEY=sk-or-v1-xxxxxxxxxxxx
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1

CLOUDFLARE_API_KEY=your_cloudflare_api_key
CLOUDFLARE_ACCOUNT_ID=your_account_id
CLOUDFLARE_BASE_URL=https://api.cloudflare.com/client/v4/accounts
πŸ“‹ Frontend .env reference
REACT_APP_API_URL=http://localhost:5000/api
REACT_APP_GOOGLE_CLIENT_ID=your_google_client_id_here

3 β€” Set Up Database

cd backend

# Create all tables from Prisma schema
npx prisma db push

# (Optional) Open the visual DB browser
npx prisma studio

4 β€” Run

# Terminal 1 β€” Backend (http://localhost:5000)
cd backend && npm run dev

# Terminal 2 β€” Frontend (http://localhost:3000)
cd frontend && npm start

Open http://localhost:3000 β€” you're live. πŸŽ‰


πŸ—„οΈ Database Schema

Table Description
User Account info, theme, language preferences
OtpToken Email verification & password-reset tokens
ApiKey AES-256-GCM encrypted user-provided keys
Conversation Chat threads with associated model list
Message User turns + per-model AI responses
UserPreferences Default models, context size, column order
npx prisma db push            # Apply schema (dev)
npx prisma generate           # Regenerate client after changes
npx prisma studio             # Visual DB browser
npx prisma migrate dev        # Create versioned migration
npx prisma migrate reset      # ⚠️ Wipe & reseed (destructive)

πŸ“‘ API Documentation

Base URL: /api β€” all endpoints prefixed.

πŸ”‘ Authentication
Method Endpoint Description Auth
POST /auth/signup Register with email + password β€”
POST /auth/login Login β†’ JWT β€”
POST /auth/verify-email Verify 6-digit OTP β€”
POST /auth/resend-otp Re-send OTP email β€”
POST /auth/forgot-password Send reset link β€”
POST /auth/reset-password Set new password β€”
GET /auth/verify-reset-token/:token Validate reset token β€”
POST /auth/google Google ID token β†’ JWT β€”
πŸ‘€ User & Preferences
Method Endpoint Description
GET /user/me Get profile
PATCH /user/me Update name / theme / language
PATCH /user/me/avatar Update avatar URL
PATCH /user/me/password Change password
DELETE /user/me Delete account
GET /user/me/preferences Get AI preferences
PUT /user/me/preferences Save AI preferences
πŸ’¬ Chat & Conversations
Method Endpoint Description
POST /chat/stream SSE β€” stream AI response
POST /chat/save-user-message Persist user message
GET /conversations List all conversations
POST /conversations Create conversation
GET /conversations/:id Fetch conversation + messages
PATCH /conversations/:id Rename / pin / update models
DELETE /conversations/:id Delete conversation
DELETE /conversations Bulk delete { ids: [] }
πŸ”§ API Keys & Utilities
Method Endpoint Description
GET /api-keys List provider keys (masked)
PUT /api-keys/:provider Save / update key
POST /api-keys/:provider/test Validate key live
DELETE /api-keys/:provider Remove key
POST /upload Upload file β†’ Cloudinary
POST /prompt-cleaner AI prompt rewrite
POST /chatbot RAG chatbot query
GET /messages/registry/all Full model registry
GET /health Server health check
πŸ“‘ SSE Stream Event Format
event: start
data: {"modelId":"github-gpt-5","model":"GPT-5"}

event: token
data: {"token":"Hello","modelId":"github-gpt-5"}

event: done
data: {"modelId":"github-gpt-5","responseTimeMs":1234,"totalLength":450}

event: error
data: {"modelId":"github-gpt-5","code":"RATE_LIMIT","message":"Rate limit reached..."}

πŸ” Authentication Guide

Email + Password Flow
  1. Register with name, email, password
  2. A 6-digit OTP is emailed (expires in 10 min)
  3. Enter OTP on the verify-email page
  4. JWT issued β€” valid for 7 days

Passwords hashed with bcrypt (12 salt rounds).

Google OAuth Setup
  1. Go to console.cloud.google.com β†’ New project
  2. Enable Google Identity API
  3. Create OAuth 2.0 Web Application credentials
  4. Add origin: http://localhost:3000
  5. Add redirect URI: http://localhost:3000
  6. Copy Client ID β†’ GOOGLE_CLIENT_ID in both .env files
Gmail SMTP App Password
  1. Google Account β†’ Security β†’ 2-Step Verification β†’ On
  2. Search "App Passwords" β†’ Generate for "Mail"
  3. Use the 16-char password as SMTP_PASSWORD
  4. Use your Gmail address as SMTP_EMAIL

πŸ“ Project Structure

mirrasync/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   └── schema.prisma           # DB schema
β”‚   └── src/
β”‚       β”œβ”€β”€ server.js               # Express entry point
β”‚       β”œβ”€β”€ routes/                 # auth Β· user Β· chat Β· conversations Β· apiKeys Β· upload
β”‚       β”œβ”€β”€ providers/
β”‚       β”‚   └── adapters.js         # 8-provider AI adapter layer
β”‚       β”œβ”€β”€ models/
β”‚       β”‚   └── registry.js         # 32+ model definitions
β”‚       β”œβ”€β”€ middleware/
β”‚       β”‚   └── auth.js             # JWT guard
β”‚       β”œβ”€β”€ services/
β”‚       β”‚   └── email.js            # Nodemailer templates
β”‚       β”œβ”€β”€ knowledge/
β”‚       β”‚   └── project_knowledge.txt  # RAG source document
β”‚       └── utils/
β”‚           β”œβ”€β”€ prisma.js Β· jwt.js Β· encryption.js
β”‚
└── frontend/
    └── src/
        β”œβ”€β”€ App.js + index.js
        β”œβ”€β”€ pages/                  # ChatPage Β· AuthPages Β· LandingPage Β· LogsPage
        β”œβ”€β”€ components/
        β”‚   β”œβ”€β”€ chat/               # ModelColumn Β· PromptInput Β· AddModelModal
        β”‚   β”œβ”€β”€ layout/             # Sidebar
        β”‚   β”œβ”€β”€ settings/           # SettingsModal
        β”‚   β”œβ”€β”€ ui/                 # Shared UI primitives
        β”‚   └── ChatbotWidget.js
        β”œβ”€β”€ stores/                 # authStore Β· chatStore Β· uiStore (Zustand)
        β”œβ”€β”€ lib/                    # api.js Β· modelRegistry.js
        └── styles/
            └── globals.css         # Full design token system

🀝 Contributing

Contributions are welcome! Here's how to get started:

  1. Fork this repository
  2. Create a feature branch: git checkout -b feat/amazing-feature
  3. Commit your changes: git commit -m 'feat: add amazing feature'
  4. Push to the branch: git push origin feat/amazing-feature
  5. Open a Pull Request

Please keep PRs focused β€” one feature or fix per PR.


πŸ“„ License

Distributed under the MIT License β€” free to use, modify, and distribute.



β—ˆ ──────────────────────────────────────────────────────────────── β—ˆ
Footer typing

MirraSync β€” Sync Every Mind. One Prompt.


Made with πŸ’œ by Misrilal Sah

About

Run Every AI. One Prompt. Sync Every Mind. One Prompt.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors