Megascope — AI Aggregator for Content Generation & Search
A multi-tenant AI SaaS that puts image, video, voice and music generation plus multi-platform content search behind one project workspace, billed by a single token balance.
Problem
Creators juggle a dozen separate AI tools and subscriptions — one for images, another for video, voice, music, plus scraping tools for research — each with its own login, billing and learning curve.
Result
One platform that aggregates many AI providers behind a unified workspace: generate images, video, voice and music, search content across YouTube, TikTok, Instagram, Telegram and RSS, and pay for everything from a single token balance.
Tech Stack
Overview
Megascope is a multi-tenant AI SaaS platform that aggregates many neural networks behind one workspace. Instead of hopping between separate tools, a user works inside a project and reaches every capability from the same sidebar: an AI assistant, content search across social platforms, and four generation studios — images, video, voice and music. Everything draws from a single token balance, so one top-up powers any model. The product is a monorepo: a React single-page app, an async Node.js worker, and Supabase as the entire backend (Auth, Postgres with row-level security, RPC, Storage and Edge Functions).
Problem
Modern content work is fragmented across a dozen AI services. One subscription generates images, another does video, a third handles voice or music, and research means yet more scraping tools for YouTube, TikTok and the rest. Each has its own account, its own billing, its own quirks and its own bill at the end of the month. For a creator or a small team this is death by a thousand logins — costs are impossible to track, nothing shares a workspace, and the mental overhead of switching tools eats the time the AI was supposed to save.
Solution
Megascope collapses that sprawl into one product. Behind a clean project workspace it routes requests to many AI providers through a unified execution layer, so the same interface generates an image, a clip, a voiceover or a track. A content-search module pulls channels, videos and analytics from YouTube, TikTok, Instagram, Telegram and RSS into one results view for research and inspiration. A built-in AI assistant lets users switch between models like Claude and ChatGPT in a single chat. Crucially, every action — generation or search — is metered to one token balance, topped up via crypto or card, so the user reasons about cost in a single currency instead of a dozen invoices. Projects are sharable with teammates under roles, and an admin layer manages config, queues and usage.
Features
- Four generation studios — images, video, voice (text-to-speech) and music — each with model picker, parameters and a results catalog
- Multi-platform content search across YouTube, TikTok, Instagram, Telegram and RSS, with per-source search types and a unified results grid
- AI assistant with a model switcher (Claude, ChatGPT and others) and saved conversation threads
- Project workspaces (spaces) — private or shared, with members, roles and per-project KPIs and task history
- Unified token billing — a single balance for all models, topped up via Cryptomus, Robokassa or other gateways, with payment history
- Files / Assets — upload, organize in folders and reuse generated and source media
- Async worker that executes every generation and search task and meters its token cost
- Admin panel — config, queues, usage and user management
- Internationalized UI with light/dark themes and a ⌘K command palette
Development Process
The architecture is deliberately lean: Supabase as the only backend. Auth, the Postgres schema, row-level security, RPC contracts and Storage all live there, with the database schema as the single source of truth managed entirely through migrations — never edited around. The React app (Vite + TanStack Router) is a pure client that talks to Supabase and renders the workspace; it never holds business rules that RLS should enforce. The heavy lifting happens in a separate Node.js worker: generation and search are long-running, provider-dependent jobs, so the app enqueues a task and the worker executes it asynchronously, then writes results and debits tokens under a strict worker protocol. Talking to many different AI providers through one interface is solved with LiteLLM, which maps a uniform request to each provider’s API (for example, OpenAI-style voice names to ElevenLabs voice IDs). This task-queue-plus-RLS design is what lets one platform safely aggregate many models for many tenants.
Results
- A single workspace replacing a dozen separate AI subscriptions and scraping tools
- Image, video, voice and music generation all reachable from one sidebar and one balance
- Content research across five platforms unified into one searchable results view
- Token-metered billing that makes multi-provider AI cost legible in one currency
- Multi-tenant, role-based projects with RLS isolation, ready for teams
What Was Learned
The clarifying decision was making Supabase the whole backend and pushing all execution into a worker. With RLS as the security boundary and a task queue as the execution boundary, the React app stays thin and safe while long, flaky, provider-dependent AI jobs run where they can be retried and metered. Aggregating many models is less about the models themselves and more about a uniform request layer (LiteLLM) and an honest billing layer (one token ledger) — get those two right and adding the next provider is a configuration change, not a rebuild.