A modern full-stack note-taking application built with React (TypeScript) frontend and Node.js (TypeScript) backend.
- Signup with email + OTP verification
- Login/Signup with Google account
- JWT-based secure authorization
- Error handling for incorrect inputs, OTP errors, and API failures
- Create and delete notes
- View notes after login/signup
- User-specific notes (authorized via JWT)
- Mobile-friendly and responsive
- Design replicates provided assets (Apple Notes-inspired)
- Frontend: React 18 + TypeScript, Vite, TailwindCSS, React Router
- Backend: Node.js, Express, TypeScript
- Database: MongoDB with Mongoose
- Auth: JWT, Google OAuth, Nodemailer for OTP
- Version Control: Git
git clone <repository-url>
cd HD-Notescd backend
npm install
cp .env.example .env # update values
npm run devcd frontend
npm install
npm run dev- Frontend: http://localhost:5173
- Backend: http://localhost:4000
- Node.js 18+
- MongoDB (local or Atlas)
- Google OAuth credentials (for Google login)
- Gmail App Password (for OTP delivery)
PORT=4000
MONGO_URI=mongodb://localhost:27017/hdnotes
JWT_SECRET=your_jwt_secret
FRONTEND_URL=http://localhost:5173
EMAIL_USER=your-gmail@gmail.com
EMAIL_PASS=your-gmail-app-password
SESSION_SECRET=your_session_secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_CALLBACK_URL=http://localhost:4000/api/auth/google/callbackPOST /api/auth/signup- Signup with OTPPOST /api/auth/login- Login with OTPPOST /api/auth/otp/verify- Verify OTPPOST /api/auth/logout- Logout userGET /api/auth/me- Get current user infoGET /api/auth/google- Start Google OAuthGET /api/auth/google/callback- Google OAuth callback
POST /api/notes- Create noteGET /api/notes- Get all notesDELETE /api/notes/:id- Delete note