Second Brain is a full-stack personal knowledge base for capturing ideas, saving links and media, and sharing a curated public view with one link.
- Create an account and sign in with JWT-based authentication.
- Save content items with a title, link, and type.
- Organize saved content in a protected dashboard.
- Filter items by content type.
- Preview supported content types directly in the dashboard.
- Generate a shareable public brain link for others to view.
- Copy item links and share links to the clipboard.
- Switch between light and dark themes in the dashboard.
- React 19
- Vite
- TypeScript
- Tailwind CSS
- Framer Motion
- React Router
- Axios
- react-hot-toast
- Node.js
- Express
- TypeScript
- MongoDB with Mongoose
- JSON Web Tokens
- bcrypt
- Zod
- CORS
backend/ Express + TypeScript API
frontend/ React + Vite client
embedding_service/ Placeholder service folder
- Node.js 18 or later
- npm
- MongoDB connection string
Create a .env file inside backend/:
MONGODB_URI=your_mongodb_connection_string
JWT_SECREAT=your_jwt_secret
PORT=3000Note: the backend currently reads JWT_SECREAT with that exact spelling.
Create a .env file inside frontend/:
VITE_BACKEND_URL=http://localhost:3000The checked-in frontend .env points to the deployed backend, so update it locally if you are running the API on your machine.
cd backend
npm install
npm run build
npm run startIf you prefer the scripted workflow in this repo, npm run dev builds first and then starts the compiled server.
cd frontend
npm install
npm run devThe app will be available in the Vite dev server output, usually at http://localhost:5173.
- Sign up with a name, username, and password.
- Sign in to receive a JWT token.
- Use the dashboard to add content items with a title, URL, and type.
- Filter your saved content by type.
- Share your brain with a generated public link.
- Open the shared view to browse the published content without signing in.
- Image
- Video
- Article
- Audio
POST /api/v1/user/signupPOST /api/v1/user/signinGET /api/v1/user/me
POST /api/v1/contentGET /api/v1/contentDELETE /api/v1/content
POST /api/v1/brain/shareGET /api/v1/brain/:shareLink
Most protected routes expect the JWT token in the Authorization header.
- The backend includes a Vercel configuration that routes requests to
backend/src/index.ts. - The frontend includes a Vercel rewrite so client-side routes keep working on refresh.
- Add richer content notes and tagging.
- Add delete and edit actions in the dashboard UI.
- Expand search and sorting.
- Wire up the placeholder embedding service if semantic search is added later.
This project is currently marked as ISC in the package metadata.