A full-stack notes application built with the MERN stack, featuring secure authentication, clean architecture, and a modern UI.
- User authentication (JWT)
- Create, read, update, delete notes
- Protected routes
- Clean and scalable project structure
- Centralized error handling
- Input validation
- Rate limiting for API security
- Responsive UI with Tailwind CSS + shadcn/ui
- Light/Dark mode support
Frontend
- React (Vite)
- Tailwind CSS
- shadcn/ui
- Context API
Backend
- Node.js
- Express.js
- MongoDB (Mongoose)
- JWT Authentication
root
├── backend
│ ├── .env
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ │
│ └── src
│ ├── server.js
│ │
│ ├── config
│ │ ├── db.js
│ │ └── env.js
│ │
│ ├── controllers
│ │ ├── authController.js
│ │ └── noteController.js
│ │
│ ├── middlewares
│ │ ├── authMiddleware.js
│ │ ├── errorHandler.js
│ │ └── rateLimiter.js
│ │
│ ├── models
│ │ ├── Note.js
│ │ └── User.js
│ │
│ ├── routes
│ │ ├── authRoutes.js
│ │ └── noteRoutes.js
│ │
│ ├── utils
│ │ ├── ApiError.js
│ │ ├── ApiResponse.js
│ │ ├── tokenService.js
│ │ └── wrapAsync.js
│ │
│ └── validators
│ ├── validationSchema.js
│ └── validator.js
│
└── frontend
├── .env
├── .gitignore
├── components.json
├── eslint.config.js
├── index.html
├── jsconfig.json
├── package-lock.json
├── package.json
├── README.md
├── vite.config.js
│
└── src
├── App.jsx
├── index.css
├── main.jsx
│
├── components
│ ├── DeleteConfirmDialog.jsx
│ ├── Navbar.jsx
│ ├── NoteModal.jsx
│ │
│ └── ui
│ ├── alert-dialog.jsx
│ ├── alert.jsx
│ ├── button.jsx
│ ├── card.jsx
│ ├── dialog.jsx
│ ├── input.jsx
│ ├── label.jsx
│ └── textarea.jsx
│
├── context
│ ├── AuthContext.jsx
│ └── ThemeContext.jsx
│
├── hooks
│ └── useNotes.js
│
├── lib
│ └── utils.js
│
├── pages
│ ├── Dashboard.jsx
│ ├── Login.jsx
│ ├── NoteDetail.jsx
│ ├── NotFound.jsx
│ ├── Profile.jsx
│ └── Register.jsx
│
└── services
├── api.js
├── noteService.js
└── tokenService.js
PORT=8080
MONGO_URI=your-mongodb-uri
ACCESS_TOKEN_SECRET=your-access-secret
REFRESH_TOKEN_SECRET=your-refresh-secret
ACCESS_TOKEN_EXPIRY=time
REFRESH_TOKEN_EXPIRY=time
NODE_ENV=production-development
FRONTEND_URL=your-frontend-url
VITE_API_BASE_URL=your-backend-url/api/v1
MIT License