https://github.com/suraiya-jahan-bhuiyan-sraboni/notesappbackendapi
This project is a Kotlin-based RESTful API that provides endpoints for managing users and their associated notes.
https://github.com/suraiya-jahan-bhuiyan-sraboni/notesappbackendapi
azure azure-sql-database backend gradle kotlin spring-boot
Last synced: about 1 month ago
JSON representation
This project is a Kotlin-based RESTful API that provides endpoints for managing users and their associated notes.
- Host: GitHub
- URL: https://github.com/suraiya-jahan-bhuiyan-sraboni/notesappbackendapi
- Owner: suraiya-jahan-bhuiyan-sraboni
- Created: 2024-02-17T10:59:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-27T18:44:00.000Z (over 2 years ago)
- Last Synced: 2024-04-29T02:29:54.326Z (about 2 years ago)
- Topics: azure, azure-sql-database, backend, gradle, kotlin, spring-boot
- Language: Kotlin
- Homepage:
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Introduction
This project is a Kotlin-based RESTful API that provides endpoints for managing users and their associated notes. It is built using Spring Boot framework for creating RESTful controllers and to map HTTP requests to handler methods.
## Endpoints
### 1. Register User
- **URL:** `/api/users/RegisterUser`
- **Method:** `POST`
- **Request Body:** JSON representing user details (`Users` object)
- **Description:** Registers a new user in the system.
### 2. Login User
- **URL:** `/api/users/loginUser`
- **Method:** `POST`
- **Request Body:** JSON representing user login credentials (`UserloginResponse` object)
- **Response:** JSON representing user details (`UserResponse` object)
- **Description:** Authenticates user login.
### 3. Reset Password
- **URL:** `/api/users/resetPassword`
- **Method:** `PUT`
- **Request Parameters:** `userName` (String), `password` (JSON representing new password)
- **Description:** Resets user password.
### 4. Delete User
- **URL:** `/api/users/deleteUser`
- **Method:** `DELETE`
- **Request Parameters:** `id` (Int)
- **Description:** Deletes a user based on provided user ID.
### 5. Create Note for User
- **URL:** `/api/users/createNote`
- **Method:** `POST`
- **Request Body:** JSON representing note details (`Notes` object)
- **Description:** Creates a new note for a user.
### 6. Get User's Notes
- **URL:** `/api/users/NotesList`
- **Method:** `POST`
- **Request Parameters:** `userId` (Int)
- **Response:** JSON array of notes associated with the user
- **Description:** Retrieves all notes associated with a user.
### 7. Delete User's All Notes
- **URL:** `/api/users/DeleteAllNotes`
- **Method:** `POST`
- **Request Parameters:** `userId` (Int)
- **Description:** Deletes all notes associated with a user.
### 8. Delete User's Single Note
- **URL:** `/api/users/DeleteSingleNotes`
- **Method:** `POST`
- **Request Parameters:** `id` (Int), `userId` (Int)
- **Description:** Deletes a single note associated with a user.
### 9. Update Single User's Note
- **URL:** `/api/users/updateSingleNotes`
- **Method:** `PUT`
- **Request Body:** JSON representing updated note details (`Notes` object)
- **Description:** Updates a single note associated with a user.
## Setup
1. Clone this repository.
2. Make sure you have JDK and Kotlin installed.
3. Import the project into your preferred Kotlin IDE.
4. Configure your database settings in `application.properties`.
5. Run the application.
## Dependencies
- Spring Boot
- Kotlin
- Spring Web
- Spring Data JPA