System Architecture
DecipherIt is built on a modern, scalable architecture that combines a Next.js frontend with a FastAPI backend, powered by advanced AI agents and vector search capabilities.Tech Stack
Frontend Technologies
Next.js 15
React framework with App Router for server-side rendering and optimal performance
React 19
Latest React with concurrent features and improved performance
TypeScript 5
Type-safe development with latest TypeScript features
Tailwind CSS 4
Utility-first CSS framework for rapid UI development
- Shadcn/ui - Beautiful, accessible component library
- Radix UI - Unstyled, accessible UI primitives
- Better Auth - Modern authentication solution
- Prisma - Type-safe database ORM
- react-mindmap-visualiser - Interactive mindmap visualization
Backend Technologies
Python 3.12
Latest Python with performance improvements
FastAPI
High-performance async API framework
CrewAI
Multi-agent AI framework for complex tasks
Qdrant
Vector database for semantic search
backend/pyproject.toml
AI & ML Services
DecipherIt leverages multiple AI services for different capabilities:
- Bright Data MCP Server - Real-time web access, bypassing geo-restrictions
- Google Gemini (via OpenRouter) - Content generation and analysis
- OpenAI Embeddings - Text embeddings for semantic search
- LemonFox TTS - High-quality text-to-speech synthesis
- MarkItDown - Document conversion to Markdown
Infrastructure & Storage
PostgreSQL
Primary relational database
Cloudflare R2
Object storage for files and audio
Docker
Containerization for deployment
Application Structure
Backend Architecture
The FastAPI backend is organized into modular components:backend/api.py
LLM Configuration
DecipherIt uses Google Gemini 2.0 Flash via OpenRouter for fast, cost-effective AI operations:backend/config/llm.py
The low temperature (0.01) ensures consistent, factual outputs for research tasks.
Data Flow
- User Input → Frontend collects research sources (URLs, documents, topics)
- API Request → Next.js sends data to FastAPI backend
- Agent Processing → CrewAI agents analyze and process content
- Web Scraping → Bright Data MCP extracts web content
- Vector Storage → Qdrant stores embeddings for semantic search
- Content Generation → AI agents create summaries, FAQs, mindmaps
- Response → Processed data returns to frontend for display
Asynchronous Processing
DecipherIt leverages Python’s async/await for high-performance concurrent operations:backend/server.py
All major operations (web scraping, vector search, agent processing) run asynchronously for optimal performance.
Next Steps
AI Agents
Learn about the CrewAI multi-agent system
Web Scraping
Explore Bright Data MCP Server integration
Vector Search
Understand Qdrant and embeddings