Skip to content

Athang69/Second-Brain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

🧠 Second Brain

A full-stack knowledge management platform to save, organize, and retrieve your content — tweets, videos, articles, and notes — all in one place.

TypeScript React Node.js MongoDB

Save everything that matters. Find it instantly.


📸 Preview

Add a demo GIF here — record your screen using Loom or any screen recorder, convert at ezgif.com, and drop the file in the repo.


✨ Features

  • 🔐 JWT Authentication — Secure user accounts with token-based auth
  • 🗂️ Content Cards — Save tweets, YouTube videos, articles, and custom notes
  • 🔗 Shareable Brain — Generate a public share link so others can view your collection (read-only)
  • 🏷️ Tag System — Organize content with tags for fast filtering and retrieval
  • 📱 Responsive UI — Clean card-based layout that works on any screen
  • Fast Retrieval — Indexed MongoDB queries for low-latency content lookup

🛠️ Tech Stack

Layer Technology
Frontend React, TypeScript, Tailwind CSS, Vite
Backend Node.js, Express.js, TypeScript
Database MongoDB (Mongoose ODM)
Auth JWT, Bcrypt
Deployment Render / Vercel

🏗️ Project Structure

Second-Brain/
├── Backend/
│   ├── src/
│   │   ├── controllers/    # Business logic (content, users, sharing)
│   │   ├── models/         # Mongoose schemas (User, Content, Tag, Link)
│   │   ├── routes/         # Express route definitions
│   │   ├── middleware/      # JWT auth middleware
│   │   └── index.ts        # Entry point
│   └── package.json
│
└── Frontend/
    └── Second_Brain_FE/
        ├── src/
        │   ├── components/     # Card, Sidebar, Modal, Button
        │   ├── pages/          # Dashboard, Login, Register
        │   └── hooks/          # Custom React hooks
        └── vite.config.ts

🚀 Getting Started

Prerequisites

1. Clone the repo

git clone https://github.com/Athang69/Second-Brain.git
cd Second-Brain

2. Backend Setup

cd Backend
npm install

Create a .env file:

PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
npm run dev

Backend runs at http://localhost:3000

3. Frontend Setup

cd Frontend/Second_Brain_FE
npm install
npm run dev

Frontend runs at http://localhost:5173


🔌 API Endpoints

Auth

Method Endpoint Description
POST /api/v1/signup Register new user
POST /api/v1/signin Login & receive JWT

Content

Method Endpoint Description
POST /api/v1/content Add new content item
GET /api/v1/content Get all user content
DELETE /api/v1/content Delete a content item

Sharing

Method Endpoint Description
POST /api/v1/brain/share Generate/revoke share link
GET /api/v1/brain/:shareLink View shared brain (public)

📄 .env.example

PORT=3000
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/second-brain
JWT_SECRET=your_super_secret_key

💡 Design Decisions

  • TypeScript throughout — Chose TypeScript over JavaScript for both frontend and backend to catch type errors at compile time and improve code maintainability
  • MongoDB over SQL — Flexible document schema suits the varied content types (tweets, videos, articles, notes) without requiring schema migrations
  • JWT stateless auth — Avoids server-side session storage, making the API horizontally scalable

👨‍💻 Author

Athang KaliGitHub · LinkedIn · Portfolio

About

Cohort_3 Second Brain App End to End

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors