<markdown
"Your mind is for having ideas, not holding them." – David Allen
2nd Brain is a personal knowledge management platform that lets you capture, organize, and share content from across the internet — all in one place. Save Twitter threads, YouTube videos, Instagram posts, and more. Categorize them your way. Share your entire knowledge base with a single link.
Think of it as your digital memory — always organized, always accessible.
| Feature | Description |
|---|---|
| 🔐 Secure Auth | JWT-based sign up & login |
| 📌 Embed Posts | Save Twitter, YouTube, Instagram & more |
| 🗂️ Categorization | Organize content into custom categories |
| 🧠 View Brain | Visualize your entire knowledge base |
| 🔗 Share Brain | One link to share everything with anyone |
| 📱 Responsive UI | Works seamlessly on all devices |
2nd-brain/ ├── 📁 frontend/ # React + TypeScript app │ ├── src/ │ │ ├── components/ # Reusable UI components │ │ ├── pages/ # Route-level pages │ │ ├── hooks/ # Custom React hooks │ │ ├── context/ # Auth & global state │ │ └── utils/ # Helper functions │ └── package.json │ ├── 📁 backend/ # Node.js + Express API │ ├── src/ │ │ ├── routes/ # API route handlers │ │ ├── controllers/ # Business logic │ │ ├── models/ # MongoDB schemas │ │ ├── middleware/ # Auth & error middleware │ │ └── config/ # DB & env config │ └── package.json │ └── README.md
Make sure you have these installed:
git clone https://github.com/your-username/2nd-brain.git
cd 2nd-braincd backend
npm installCreate a .env file in the /backend directory:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_super_secret_key
NODE_ENV=developmentStart the backend server:
npm run dev🟢 Server running at
http://localhost:5000
cd ../frontend
npm install
npm start🌐 App running at
http://localhost:3000
📝 Sign up for a new account (or log in) ➕ Click "Add Content" and paste any social media URL 🗂️ Assign a category (e.g. Learning, Inspiration, Dev) 🧠 Navigate to "My Brain" to see all saved content 🔗 Hit "Share Brain" to generate your public link 🚀 Share the link — anyone can now browse your Brain!
| Method | Endpoint | Description | Auth |
|---|---|---|---|
POST |
/api/auth/signup |
Register new user | ❌ |
POST |
/api/auth/login |
Login & get JWT token | ❌ |
GET |
/api/content |
Get all user content | ✅ |
POST |
/api/content |
Add new content | ✅ |
DELETE |
/api/content/:id |
Delete content item | ✅ |
GET |
/api/brain/share |
Get shareable link | ✅ |
GET |
/api/brain/:shareId |
View shared brain | ❌ |
- User authentication (JWT)
- Save & embed social media posts
- Content categorization
- View Brain dashboard
- Shareable Brain link
- 🤖 AI-based auto-categorization
- 🔍 Full-text search across saved content
- 🌙 Dark mode & customizable themes
- 📱 Mobile app (React Native)
- 🔔 Browser extension to save content on the go
- 📊 Analytics — most saved topics, engagement stats
- 🤝 Collaborative brains (shared workspaces)
Contributions are what make open source amazing! Here's how to get started:
# 1. Fork the project
# 2. Create your feature branch
git checkout -b feature/amazing-feature
# 3. Commit your changes
git commit -m "feat: add amazing feature"
# 4. Push to the branch
git push origin feature/amazing-feature
# 5. Open a Pull Request 🎉Please read our Contributing Guidelines and follow the Code of Conduct.
Distributed under the MIT License. See LICENSE for more information.