Your AI-Powered Second Brain
Capture anything from the web, automatically organize it with AI, and chat with your knowledge base using natural language. Project Synapse is a complete ecosystem that transforms how you collect, store, and interact with information.
Project Synapse is a second brain application that helps you capture, organize, and interact with information from across the web. Click anything—text, images, articles, products—and save it instantly. Our AI processes everything, creates semantic embeddings, and lets you search and chat with your knowledge base naturally.
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Extension │────────▶│ Backend API │────────▶│ Frontend │
│ Chrome Plugin │ │ AI Processing │ │ Dashboard │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │ │
│ 1. Click & Capture │ 2. Process & Store │ 3. View & Chat
│ - Text highlights │ - Vector embeddings │ - Visual cards
│ - Full pages │ - Auto-categorize │ - Semantic search
│ - Images (OCR) │ - Extract metadata │ - AI chat (RAG)
│ - Products │ - Store in MongoDB │ - Related items
│ - Videos │ - Background jobs │ - Statistics
- One-Click Saving: Highlight text and click the floating button
- Keyboard Shortcuts: Quick capture with
Alt+S - Context Menu: Right-click anywhere to save
- Multi-Format Support: Text, links, images, articles, products
- Offline Queue: Captures saved locally when backend is unavailable
- Automatic Context: Captures page title, URL, favicon, and metadata
- Vector Embeddings: Google Gemini generates 768-dimensional embeddings
- Semantic Search: MongoDB Vector Search for intelligent retrieval
- Auto-Categorization: AI classifies content into 6 types automatically
- Notes
- Articles
- Products
- Videos
- Images
- Todos
- OCR Vision: Extract text from images using Gemini Vision
- Metadata Extraction: Automatic title, description, author, price extraction
- Background Jobs: Periodic summarization and optimization
- RAG (Retrieval-Augmented Generation): Chat with your knowledge base
- Type-Specific Cards: Unique beautiful designs for each content type
- Infinite Scroll: Smooth auto-loading grid
- Semantic Search: Natural language queries with relevance scores
- AI Chat Interface: ChatGPT-style conversations with source citations
- Related Content: AI-powered content discovery
- Dark Mode: Beautiful light/dark/auto themes
- Advanced Filters: Date range, type, relevance threshold
- Statistics Dashboard: Track your knowledge growth
- Node.js 18+
- MongoDB Atlas account (free tier works)
- Google Gemini API key (free tier available)
- Chrome Browser (for extension)
cd Backend
npm install
# Configure environment
copy .env.example .env
# Edit .env with your MongoDB URI, JWT secret, and Gemini API key
# Setup MongoDB Vector Search index (see Backend/SETUP.md)
# Start server
npm run devServer runs on http://localhost:3000
Detailed Guide: Backend/README.md
cd Frontend
npm install
# Configure environment
copy .env.example .env.local
# Set NEXT_PUBLIC_API_URL=http://localhost:3000
# Start dashboard
npm run devDashboard runs on http://localhost:3001
Detailed Guide: Frontend/README.md
cd Extension
npm install
# Build extension
npm run build
# Load in Chrome
# 1. Go to chrome://extensions/
# 2. Enable "Developer mode"
# 3. Click "Load unpacked"
# 4. Select the Extension folderDetailed Guide: Extension/README.md
- Runtime: Node.js + TypeScript
- Framework: Express.js
- Database: MongoDB Atlas with Vector Search
- AI: Google Gemini API (text-embedding-004, gemini-pro-vision, gemini-pro)
- Storage: GridFS for images
- Auth: JWT tokens
- Jobs: node-cron for background processing
- Framework: Next.js 15 (App Router)
- UI Library: React 18
- Styling: Tailwind CSS
- State Management: TanStack Query (React Query)
- Components: Radix UI (headless primitives)
- Icons: Lucide React
- Theme: next-themes (dark mode)
- Manifest: V3 (Service Worker)
- UI: React 18 + TypeScript
- Build: Vite
- Styling: Tailwind CSS
- Storage: Chrome Storage API
The_Vision_Project_OG/
├── Backend/ # Node.js + Express API
│ ├── src/
│ │ ├── controllers/ # Request handlers
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic (Gemini, metadata)
│ │ ├── middleware/ # Auth middleware
│ │ ├── jobs/ # Background jobs
│ │ ├── config/ # Configuration & DB
│ │ └── types/ # TypeScript types
│ ├── package.json
│ ├── tsconfig.json
│ └── README.md
│
├── Frontend/ # Next.js 15 Dashboard
│ ├── app/ # App Router
│ │ ├── (auth)/ # Auth pages
│ │ ├── dashboard/ # Main grid view
│ │ ├── search/ # Semantic search
│ │ ├── chat/ # AI chat interface
│ │ ├── settings/ # User settings
│ │ └── synapse/[id]/ # Detail view
│ ├── components/ # React components
│ │ ├── sidebar.tsx
│ │ ├── synapse-card.tsx
│ │ └── ui/ # Radix UI components
│ ├── lib/
│ │ ├── api.ts # API client
│ │ ├── types.ts # TypeScript types
│ │ └── utils.ts # Utilities
│ ├── package.json
│ └── README.md
│
└── Extension/ # Chrome Extension
├── src/
│ ├── background.ts # Service worker
│ ├── content.ts # Content script (floating button)
│ ├── popup/ # Extension popup
│ └── utils.ts # API utilities
├── assets/ # Icons
├── manifest.json # Extension manifest
├── package.json
└── README.md
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user profile
POST /api/ingest- Ingest content (text, URL, image)
GET /api/synapses- Get all synapses (paginated)GET /api/synapses/:id- Get synapse by IDPOST /api/synapses- Semantic searchGET /api/synapses/:id/related- Get related synapsesDELETE /api/synapses/:id- Delete synapse
POST /api/ask- Ask question using RAGGET /api/ask/stats- Get user statistics
GET /health- Health check
Full API Documentation: See Backend/README.md
Method 1: Inline Highlighting
- Select text on any webpage
- Click the floating "Save to Synapse" button
- Content saved automatically
Method 2: Keyboard Shortcut
- Select text
- Press
Alt+S - Done!
Method 3: Context Menu
- Right-click text/image/link
- Select "Save to Synapse"
Method 4: Full Page
- Click extension icon
- Click "Save Current Page"
Semantic Search (finds by meaning, not just keywords)
Query: "machine learning articles I saved last month"
Result: All ML content from the specified time, ranked by relevance
Type Filters
- Filter by: Notes, Articles, Products, Videos, Images, Todos
- Date range filtering
- Relevance threshold control
RAG-Powered Conversations
You: "What did I learn about React hooks?"
AI: Based on your saved articles, here's what you learned...
[Shows sources with direct links]
You: "Find products under $50 related to fitness"
AI: Here are 3 products you saved...
- JWT Authentication: Secure token-based auth
- Password Hashing: bcrypt with salt rounds
- CORS Protection: Configured origins
- Helmet.js: Security headers
- User Isolation: All data scoped to user ID
- Local Storage: Extension tokens stored locally
- No Data Sharing: Your data stays in your MongoDB
# Terminal 1 - Backend
cd Backend
npm run dev
# Terminal 2 - Frontend
cd Frontend
npm run dev
# Terminal 3 - Extension (watch mode)
cd Extension
npm run watch# Backend
cd Backend
npm run build
npm start
# Frontend
cd Frontend
npm run build
npm start
# Extension
cd Extension
npm run build
# Upload dist/ to Chrome Web Store- Text capture works
- Image capture with OCR
- Offline queue functions
- Authentication flow
- Context menu appears
- Vector embeddings generated
- Semantic search returns relevant results
- RAG provides accurate answers
- Background jobs run
- File upload works
- Cards display correctly
- Infinite scroll loads
- Search with filters
- Chat interface responds
- Theme switching works
- Related content shows
Use the included Postman collection:
# Import Backend/postman.json into PostmanOr use cURL (see Backend README for examples).
- Backend API with MongoDB
- Vector search setup
- JWT authentication
- Basic CRUD operations
- Gemini embeddings
- Image OCR
- RAG implementation
- Auto-categorization
- Type-specific cards
- Semantic search UI
- Chat interface
- Dark mode
- Infinite scroll
- Content script
- Context menu
- Offline support
- Authentication flow
- Mobile app (React Native)
- Browser extension (Firefox, Edge)
- Collaborative workspaces
- Export to PDF/Markdown
- Advanced analytics dashboard
- Custom embeddings models
- Voice notes capture
- Screenshot annotation
- Tag system
- Bulk operations
- Team accounts
- SSO integration
- Admin dashboard
- Usage analytics
- API rate limiting
- Custom deployment options
MongoDB Connection Failed
# Check your MONGODB_URI in .env
# Ensure IP is whitelisted in MongoDB Atlas
# Verify network accessGemini API Errors
# Verify GEMINI_API_KEY is valid
# Check quota limits at https://makersuite.google.com/
# Ensure correct model namesBackend Connection Failed
# Verify backend is running on port 3000
# Check NEXT_PUBLIC_API_URL in .env.local
# Test: curl http://localhost:3000/healthCards Not Displaying
# Check browser console for errors
# Verify API responses in Network tab
# Clear Next.js cache: rm -rf .next/Extension Not Loading
# Ensure npm run build completed successfully
# Load Extension folder, not dist/
# Check for errors in chrome://extensions/Authentication Failed
# Login through dashboard first
# Token stored in localStorage
# Check extension console for errors- Vector Search: ~50ms for 10k documents
- Embedding Generation: ~500ms per item
- RAG Response: ~2-3 seconds (includes LLM)
- Image OCR: ~1-2 seconds per image
- Initial Load: < 2 seconds
- Infinite Scroll: Seamless with virtualization
- Search Results: < 500ms
- Theme Switch: Instant with CSS variables
- Content Script Injection: < 100ms
- Capture Action: < 200ms
- Offline Queue: Unlimited (localStorage limits)
We welcome contributions! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Write meaningful commit messages
- Update documentation for API changes
- Test thoroughly before submitting
- Keep PRs focused and atomic
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini - AI embeddings and vision
- MongoDB - Vector search capabilities
- Vercel - Next.js framework
- Radix UI - Accessible component primitives
- Tailwind CSS - Utility-first styling
- Documentation: Check individual component READMEs
- Issues: GitHub Issues
- Discussions: GitHub Discussions
If you find this project useful, please consider giving it a star!
Built for knowledge management enthusiasts
Project Synapse - Your AI-Powered Second Brain