Never lose an important link again - Store, organize and instantly retrieve your saved content from Twitter, YouTube, Reddit and more using intelligent embeddings.
Second Brain is an intelligent knowledge management platform that helps you store, organize, and retrieve important content from various platforms using AI-powered embeddings. Think of it as your external memory bank for digital content.
This project is split into two repositories for better separation of concerns:
https://github.com/Acid-OP/second-brain-frontend###⚙️ Backend (Server)
https://github.com/Acid-OP/second-brain-backend- Save important links from multiple platforms:
- Twitter/X posts
- YouTube videos
- Reddit threads
- General web links
- Store content with rich metadata:
- Custom titles
- Descriptions
- Content type classification
- AI-generated embeddings for powerful search
- Find your saved content effortlessly:
- Search by title, description, or content characteristics
- Uses open-source embedding models (not commercial LLMs)
- Note: While highly effective, results may vary occasionally due to the nature of open-source models
- Lightning-fast semantic search using ChromaDB vector database
- Persistent storage for your embeddings
- Automatic index management
- Create shareable versions of your knowledge repository:
- Generate public links to showcase your collections
- Toggle privacy settings to make collections private
- Control exactly what others can see
- Full CRUD functionality:
- Create new knowledge cards
- Share your cards.
- Delete content you no longer need
- Organize your knowledge base
- Complete user authentication:
- Secure signup/login
- Protected content storage
- Logout functionality
- Node.js (v16 or higher)
- npm or yarn package manager
- MongoDB Atlas account (for database storage)
- Embedding API Key (choose one of these options):
- Preferred: Any LLM API key (OpenAI, Hugging Face, etc.)
- Alternative: We've pre-configured support for the open-source
sentence-transformers/all-MiniLM-L6-v2model
- ChromaDB (either local or cloud instance)
- Local:
pip install chromadb(Python 3.7+ required) - Cloud: Free tier available at Chroma Cloud
- Local:
We default to using the open-source all-MiniLM-L6-v2 sentence transformer because:
- 🆓 No API costs or usage limits
- 🔒 Runs completely locally (no data sent externally)
- ⚖️ Balanced 384-dimensional embeddings
- 📏 Good performance for semantic search tasks
For better results, you can optionally configure:
- OpenAI embeddings (requires API key)
- Hugging Face inference API
- Any other compatible embedding service
-
Clone the repository:
git clone https://github.com/your-username/second-brain.git cd second-brain -
Install dependencies:
npm install
Create these .env files in their respective directories:
# Frontend (create in /Client/.env)
VITE_BACKEND_URL=http://localhost:5000 # or Vercel deployed Backend URL
# Backend (create in /Server/.env)
MONGO_URI=your_mongodb_atlas_connection_string
JWT_SECRET=your_secure_random_string
PORT=YOUR PORT
FRONTEND_URL=http://localhost:3000 # or Vercel deployed Frontend URL
EMBEDDING_MODEL=all-MiniLM-L6-v2 # or 'openai' for OpenAI
# OPENAI_API_KEY=sk-your-key-here # Uncomment if using OpenAI
# ChromaDB Configuration
CHROMA_DB_URL=http://localhost:8000 # For local ChromaDB
# OR for Chroma Cloud:
# CHROMA_DB_URL=https://your-cluster-id.chroma.cloud
4. Run the development server:
```bash
npm run dev- Navigate to the "Add Content" section
- Enter:
- Title (what you'll remember it by)
- URL (the original content link)
- Description (key points to remember)
- Content type (YouTube, Twitter, Reddit, or General)
- The system automatically generates AI embeddings for powerful search
- Use the search functionality
- Enter any details you remember:
- Exact title or description words
- Related concepts or topics
- Content characteristics
- The system will surface the most relevant matches
- Go to "Share Brain" section
- Select a collection to share
- Click "Share" (By default it is Private):
- Public: Anyone with link can view
- Private: Only you can access
- Copy the shareable link to distribute
- Click on "Make it Private" to stop the Share functionality
- Your data is stored securely in MongoDB Atlas
- Authentication uses JWT tokens
- Passwords are hashed before storage
- You maintain full control over shared content
- React.js
- TypeScript
- Tailwind CSS
- Framer Motion (animations)
- Axios (API calls)
- Node.js
- TypeScript
- Express.js
- Auth(JWT, ZOD)
- MongoDB (database)
- Mongoose (ODM)
- Open source model for embeddings generation.
- Custom similarity search algorithms
We welcome contributions! Please follow these steps:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
For questions or support, contact us at:
- Email: gauravkapur596@gmail.com
- Twitter: https://x.com/GauravKapurr
Second Brain - Never lose an important idea or resource again. Your digital memory, enhanced with AI.