Backend service for NoteApp, a secure and minimal note-taking application. Built with Spring Boot, it provides authentication, OTP-based login, and note management APIs.
🔗 Frontend Live: note-front-tau.vercel.app 🔗 Backend Live: noteapp-0eu4.onrender.com
- 🔐 User Authentication with OTP + JWT
- 📨 Send OTP to email for login
- 🗂 CRUD operations on notes (Add, View, Delete)
- 👤 User-specific notes linked via JWT tokens
- 📡 RESTful APIs ready to integrate with any frontend
- Java 17+
- Spring Boot (Web, Security, Data JPA)
- JWT Authentication
- MongoDB (for storing users & notes)
- Lombok (to reduce boilerplate code)
| Method | Endpoint | Description | Body / Params |
|---|---|---|---|
POST |
/api/auth/signup |
Register new user | { "email": "user@mail.com", "password": "..." } |
POST |
/api/auth/send-otp?email=user@mail.com |
Send OTP to user email | Query param email |
POST |
/api/auth/login |
Login with OTP → returns JWT | { "email": "user@mail.com", "otp": "1234" } |
| Method | Endpoint | Description | Headers | Body |
|---|---|---|---|---|
POST |
/api/notes/add |
Add a new note (auth required) | Authorization: Bearer <JWT> |
{ "title": "My Note", "content": "Note text" } |
GET |
/api/notes/all/{userId} |
Get all notes for a user | — | — |
DELETE |
/api/notes/delete/{id} |
Delete a note by ID | — | — |
## ⚙️ Setup & Run Locally
-
Clone repo
git clone https://github.com/Anuragreat/noteapp-backend.git cd noteapp-backend -
Configure Database (MongoDB) in
application.properties:spring.data.mongodb.uri=mongodb+srv://<username>:<password>@cluster.mongodb.net/notesapp -
Run the backend
./mvnw spring-boot:run
-
API will be live at:
http://localhost:8080
- 📌 Note categories & tags
- ☁️ Cloud file uploads with notes
- 📧 Resend OTP & expiry handling
Anurag Yadav


