Skip to content

βš™οΈ Note App Backend (Spring Boot) A secure Spring Boot backend for the Notes App that provides REST APIs for authentication and note operations. It uses OTP-based login with JWT authentication and stores user notes in a MongoDB database. πŸ”— Live: noteapp-0eu4.onrender.com

Notifications You must be signed in to change notification settings

Anuragreat/NoteApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ NoteApp Backend

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


πŸš€ Features

  • πŸ” 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

πŸ“¦ Tech Stack

  • Java 17+
  • Spring Boot (Web, Security, Data JPA)
  • JWT Authentication
  • MongoDB (for storing users & notes)
  • Lombok (to reduce boilerplate code)

πŸ“‘ API Endpoints

πŸ” Authentication

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" }

πŸ“ Notes

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 β€” β€”

πŸ“Έ Frontend Screenshots

Screenshot 1 Screenshot 2 Screenshot 3
## βš™οΈ Setup & Run Locally
  1. Clone repo

    git clone https://github.com/Anuragreat/noteapp-backend.git
    cd noteapp-backend
  2. Configure Database (MongoDB) in application.properties:

    spring.data.mongodb.uri=mongodb+srv://<username>:<password>@cluster.mongodb.net/notesapp
  3. Run the backend

    ./mvnw spring-boot:run
  4. API will be live at:

    http://localhost:8080
    

🌟 Future Enhancements

  • πŸ“Œ Note categories & tags
  • ☁️ Cloud file uploads with notes
  • πŸ“§ Resend OTP & expiry handling

πŸ‘¨β€πŸ’» Author

Anurag Yadav


About

βš™οΈ Note App Backend (Spring Boot) A secure Spring Boot backend for the Notes App that provides REST APIs for authentication and note operations. It uses OTP-based login with JWT authentication and stores user notes in a MongoDB database. πŸ”— Live: noteapp-0eu4.onrender.com

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published