ResearchHub is a comprehensive AI-powered research management platform that helps users automatically collect, monitor, and summarize research content from various sources. The application provides workspace-based organization, intelligent content aggregation, AI-powered summarization capabilities, comprehensive content management features, and Telegram bot integration for seamless content addition from mobile devices.
- Smart Workspace Organization: Create purpose-driven workspaces with advanced relevance scoring (0-100 points)
- Intelligent Content Monitoring: Automated collection from trusted sources with configurable frequency (hourly to weekly)
- Advanced Archive System: Complete workspace lifecycle management with archive/restore functionality
- Expandable Navigation: Smart sidebar with workspace hierarchy and alphabetical sorting
- Rich Content Display: Full HTML rendering with image preservation and responsive design
- Multi-Provider AI Support: Configure OpenAI, Anthropic, Google AI, Azure OpenAI, and Vertex AI
- Cost Tracking & Analytics: Detailed usage logs and cost estimation across providers
- Advanced Summarization: Generate comprehensive summaries with configurable focus areas
- Relevance Scoring Algorithm: Sophisticated scoring considering keywords, purpose alignment, and content quality
- Visual Annotation System: Direct text highlighting and commenting with color-coded indicators
- Content Management: Advanced move/copy system for organizing content across workspaces
- Mobile Integration: Telegram bot (@researchHubBot) for seamless content submission
- Export Capabilities: Export workspace content in structured Markdown format
- Dark Mode Support: Beautiful light and dark themes with system preference detection
- Real-time Updates: Live content and summary updates with TanStack Query caching
- Replit Auth Integration: Secure OpenID Connect authentication with session management
- Role-Based Access Control: User and admin roles with protected routes
- Secure API Key Management: Masked display and secure storage of AI provider credentials
- PostgreSQL Session Storage: Robust session handling with configurable TTL
- React 18 with TypeScript and Vite build system
- Shadcn/UI components built on Radix UI primitives
- TailwindCSS with custom design system and theme support
- Wouter for lightweight client-side routing
- React Hook Form with Zod validation for type-safe forms
- TanStack Query for server state management and caching
- Node.js with Express.js framework and TypeScript
- Drizzle ORM for type-safe database operations
- PostgreSQL with Neon serverless database integration
- Service-based Architecture for business logic organization
- Express Sessions with PostgreSQL storage using connect-pg-simple
- Multi-AI Provider Support: OpenAI, Anthropic, Google AI, Azure OpenAI, Vertex AI
- Telegram Bot API: node-telegram-bot-api for mobile content ingestion
- Content Processing: Advanced HTML extraction with image preservation
- Authentication: Replit Auth service with OpenID Connect
- Node.js 18+ environment
- PostgreSQL database (Neon recommended)
- AI provider API keys (configured securely in-app)
- Telegram Bot Token (optional for mobile integration - store in environment variables, never in code)
- Configure Secrets: Go to Replit Secrets (lock icon) and add:
DATABASE_URL- Your PostgreSQL connection stringSESSION_SECRET- A secure random stringREPL_ID- Your Replit app IDTELEGRAM_BOT_TOKEN- Your bot token (optional)
- Click the "Run" button to start the development server
- The application will be available at the provided Replit domain
- Use Replit Auth to sign in and create your first workspace
- Configure AI providers securely in Settings β AI Models
- Optionally set up Telegram bot in Settings β Telegram Bot
# Clone the repository
git clone <your-repo-url>
cd research-hub
# Install dependencies
npm install
# Set up environment variables (NEVER commit .env to git)
cp .env.example .env
# Edit .env with your actual credentials:
# - DATABASE_URL, SESSION_SECRET, REPL_ID, TELEGRAM_BOT_TOKEN
# Push database schema
npm run db:push
# Start development server
npm run devπ Security Note: Never commit your .env file or any secrets to version control. See SECURITY.md for complete security guidelines.
βββ client/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components and routing
β β β βββ Dashboard.tsx # Main workspace overview
β β β βββ Archive.tsx # Archived workspace management
β β β βββ Search.tsx # Content discovery and monitoring
β β β βββ Summaries.tsx # AI summary management
β β β βββ Settings.tsx # Settings hub
β β β βββ AiModelConfig.tsx # AI provider configuration
β β β βββ TelegramIntegration.tsx # Mobile bot setup
β β β βββ ArticleReader.tsx # Rich content viewer with annotations
β β β βββ WorkspaceEdit.tsx # Workspace settings editor
β β β βββ Workspaces.tsx # Workspace overview and management
β β βββ hooks/ # Custom React hooks (useAuth, useToast)
β β βββ lib/ # Utilities (queryClient, authUtils)
β β βββ contexts/ # React context providers
βββ server/ # Express backend API
β βββ services/ # Business logic services
β β βββ aiService.ts # Multi-provider AI integration
β β βββ summaryService.ts # Summary generation logic
β β βββ telegramBotService.ts # Telegram bot handlers
β β βββ contentExtractor.ts # Content processing and extraction
β βββ routes.ts # Comprehensive API route definitions
β βββ storage.ts # Database operations with Drizzle ORM
β βββ replitAuth.ts # Authentication setup and middleware
β βββ db.ts # Database connection and configuration
β βββ index.ts # Server entry point with Express setup
βββ shared/ # Shared TypeScript types and schemas
β βββ schema.ts # Complete Drizzle database schema
βββ components.json # Shadcn/UI configuration
βββ drizzle.config.ts # Database migration configuration
βββ replit.md # Project documentation and architecture notes
- Users: Authentication and user profile data
- Workspaces: Research containers with purpose and keyword configuration
- Content Items: Collected research with HTML content and relevance scores
- Summaries: AI-generated summaries with version tracking
- Sources: Trusted content sources for monitoring
- Activities: Comprehensive user activity logging
- Annotations: Visual highlighting and commenting system
- AI Model Configs: Multi-provider configuration with cost tracking
- AI Usage Logs: Detailed usage analytics and cost monitoring
- Telegram Connections: User account linking for mobile integration
- Telegram Submissions: Content submitted via mobile bot
- Sessions: PostgreSQL-backed session storage for security
- Content Operations: Move/copy system for cross-workspace content management
GET /api/auth/user- Current user profileGET /api/login- Initiate Replit Auth flowGET /api/logout- Secure logout with session cleanup
GET /api/workspaces- List active workspacesGET /api/workspaces/archived- List archived workspacesPOST /api/workspaces- Create new workspacePATCH /api/workspaces/:id- Update workspace settingsPOST /api/workspaces/:id/archive- Archive workspace (stops monitoring)POST /api/workspaces/:id/restore- Restore archived workspacePOST /api/workspaces/:id/recalculate-scores- Recalculate content relevance
GET /api/workspaces/:id/content- Workspace content with paginationGET /api/content/:id- Individual content item with annotationsPOST /api/content/:id/annotations- Add text highlights and commentsDELETE /api/annotations/:id- Remove annotationsPOST /api/content/:id/move- Move content between workspacesPOST /api/content/:id/copy- Copy content to other workspaces
GET /api/ai-model-configs- List configured AI providersPOST /api/ai-model-configs- Add new AI providerPOST /api/workspaces/:id/summaries- Generate AI summaryGET /api/workspaces/:id/summaries- List workspace summaries
GET /api/telegram/connections- User Telegram connectionsPOST /api/telegram/connections- Link Telegram accountGET /api/telegram/submissions- Mobile content submissions
- Complete removal of legacy sharing system components and database tables
- Streamlined codebase with modern move/copy content management
- Enhanced error handling and UI refresh system for immediate updates
- Cleaned backend routes and storage methods for better maintainability
- Comprehensive code audit ensuring no leftover functionality
- Complete workspace lifecycle management with archive/restore functionality
- Monitoring control: archive stops content monitoring, restore resumes it
- User-friendly terminology: "restore" instead of "unarchive" throughout
- Comprehensive activity logging for archive/restore actions
- Enhanced navigation with dedicated Archive page
- Comprehensive SECURITY.md with security guidelines and best practices
- Enhanced .gitignore to prevent any secret files from being committed
- Secure environment configuration with .env.example and .env.template
- Updated setup instructions emphasizing Replit Secrets over file-based config
- Added incident response procedures for compromised tokens
- Direct text highlighting with persistent visual indicators
- Color-coded comment system for collaborative research
- HTML content preservation with rich formatting
- Responsive annotation interface with proper click handling
- Multi-provider support: OpenAI, Anthropic, Google AI, Azure OpenAI, Vertex AI
- Cost tracking and usage analytics across providers
- Secure API key management with masked display
- Default provider selection for seamless operations
- Modern move/copy system replacing legacy sharing functionality
- Immediate UI updates with forced cache refresh
- Content operations with comprehensive activity logging
- Streamlined workspace content organization
The application is optimized for Replit's deployment system:
- Environment Setup: Configure DATABASE_URL and SESSION_SECRET
- AI Configuration: Set up providers through Settings β AI Models
- Mobile Integration: Configure Telegram bot (optional)
- Database Migration: Automatic schema push with Drizzle
- Deployment: Use Replit's one-click deployment
- Fork the repository
- Create a feature branch (
git checkout -b feature/enhancement) - Follow TypeScript and React best practices
- Test thoroughly with the development server
- Update documentation in
replit.mdfor architectural changes - Submit a pull request with detailed description
This project is licensed under the MIT License. See LICENSE file for details.
For support, questions, or feature requests:
- Open an issue on GitHub
- Contact the development team
- Check
replit.mdfor architectural documentation
Built with modern web technologies, AI-powered intelligence, and comprehensive research management capabilities.