This project implements a robust RESTful API using Spring Boot with the following features:
- JWT Token Authentication: Secure user authentication using JSON Web Tokens.
- Rate Limiting and Request Throttling: Manage high traffic by limiting requests per user.
- Search Functionality: Efficient keyword-based search for user notes.
- POST /api/auth/signup: Create a new user account.
- POST /api/auth/login: Log in to an existing user account and receive an access token.
- GET /api/notes: Get a list of all notes for the authenticated user.
- GET /api/notes/:id: Get a note by ID for the authenticated user.
- POST /api/notes: Create a new note for the authenticated user.
- PUT /api/notes/:id: Update an existing note by ID for the authenticated user.
- DELETE /api/notes/:id: Delete a note by ID for the authenticated user.
- POST /api/notes/:id/share: Share a note with another user for the authenticated user.
- GET /api/search?q=:query: Search for notes based on keywords for the authenticated user.
- Spring Boot
- PostgreSQL
- JWT Token Authentication
- Hibernate/JPA for Database
This guide provides step-by-step instructions to set up and run the Spring Boot 3 RESTful API with PostgreSQL and test it using Postman.
Before starting, ensure you have the following installed on your machine:
Download and install the Spring Boot 3 framework by following the official documentation: Spring Boot Installation Guide
Download and install PostgreSQL by following the official documentation: PostgreSQL Installation Guide
Clone the Spring Boot 3 RESTful API repository from GitHub and open in an IDE:
git clone https://github.com/hendisantika/Notes-App.git
src/main/resources/application.properties
spring.datasource.url=jdbc:postgresql://localhost:5432/your_database_name
spring.datasource.username=your_postgresql_username
spring.datasource.password=your_postgresql_password
cd NotesBackend
./mvnw clean spring-boot:run
Open Postman and test the API endpoints.