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
- π§ ay3898097@gmail.com


