{"id":25617827,"url":"https://github.com/thestutirajeev/usersapp","last_synced_at":"2025-07-01T22:34:41.266Z","repository":{"id":278800627,"uuid":"936820343","full_name":"thestutirajeev/UsersApp","owner":"thestutirajeev","description":"This is a simple 👥 Users REST API built with Spring Boot to demonstrate basic CRUD operations. The API interacts with a MySQL database to manage user data.","archived":false,"fork":false,"pushed_at":"2025-02-21T19:04:22.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-21T19:37:38.606Z","etag":null,"topics":["hibernate","mysql-server","postman-test","rest-api","spring-boot"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thestutirajeev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-21T18:40:16.000Z","updated_at":"2025-02-21T19:04:26.000Z","dependencies_parsed_at":"2025-02-21T19:37:42.173Z","dependency_job_id":"886d604d-d1d4-4a5f-9658-7031d2f4bcfa","html_url":"https://github.com/thestutirajeev/UsersApp","commit_stats":null,"previous_names":["thestutirajeev/usersapp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thestutirajeev/UsersApp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thestutirajeev%2FUsersApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thestutirajeev%2FUsersApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thestutirajeev%2FUsersApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thestutirajeev%2FUsersApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thestutirajeev","download_url":"https://codeload.github.com/thestutirajeev/UsersApp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thestutirajeev%2FUsersApp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263047243,"owners_count":23405277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hibernate","mysql-server","postman-test","rest-api","spring-boot"],"created_at":"2025-02-22T05:29:19.615Z","updated_at":"2025-07-01T22:34:41.249Z","avatar_url":"https://github.com/thestutirajeev.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 User REST API - Spring Boot  \n\n## 🌟 Overview  \nThis project is a RESTful API for managing users, built using Spring Boot. It provides endpoints to create, retrieve, update, and delete user records. Additionally, a **frontend using Fetch API** is implemented to interact with the backend.  \n\n## 🛠️ Tech Stack  \n- ⚡ **Spring Boot 3.4.3**  \n- 🌍 **Spring Boot Starter Web** (for building REST APIs)  \n- 💾 **Spring Boot Starter Data JPA** (for database interaction)  \n- 🛢️ **MySQL** (for persistent storage)  \n- 🔄 **Spring Boot DevTools** (for development efficiency)  \n- ✅ **Spring Boot Starter Test** (for testing)  \n- 🖥️ **Fetch API (JavaScript)** (for frontend communication)  \n\n## 🎯 Features  \n- ➕ Create a new user  \n- 📜 Retrieve all users  \n- 🔍 Retrieve a specific user by ID  \n- ✏️ Update an existing user  \n- ❌ Delete a user  \n- 🌐 **Frontend UI with Fetch API** to interact with the REST API  \n\n## 📌 API Endpoints  \n| 🏷️ HTTP Method | 🔗 Endpoint | 📄 Description |  \n|------------|----------------|-------------|  \n| 📝 POST | `/api/users` | Create a new user |  \n| 📥 GET | `/api/users` | Retrieve all users |  \n| 🔎 GET | `/api/users/{id}` | Retrieve a user by ID |  \n| 🛠️ PUT | `/api/users/{id}` | Update an existing user |  \n| 🗑️ DELETE | `/api/users/{id}` | Delete a user |  \n\n## ⚙️ Setup and Installation  \n\n### 📌 Prerequisites  \n- ☕ Java 22  \n- 🏗️ Maven  \n- 🛢️ MySQL database  \n\n## 🏗️ Project Structure  \n```\nUser_Rest_SpringBoot\n│── src/main/java/com/example/demo\n│   ├── controller/UserController.java\n│   ├── model/User.java\n│   ├── repository/UserRepository.java\n│   ├── service/UserService.java\n│   ├── exceptions/\n│   ├── service/GlobalExceptionHandler.java\n│   └── DemoApplication.java\n│── src/main/resources/\n│   ├── application.properties\n│── src/main/webapp/\n│   ├── index.html\n│   ├── add.html\n│   ├── delete.html\n│   ├── update.html\n│   ├── index.js\n│   ├── add.js\n│   ├── delete.js\n│   ├── update.js\n│── pom.xml\n```  \n\n## 🌐 Fetch API Implementation  \nThe frontend uses **Fetch API** to connect with the REST API:  \n\n- **`index.js`** → Fetches and displays all users  \n- **`add.js`** → Sends a `POST` request to add a user  \n- **`delete.js`** → Sends a `DELETE` request and shows success/failure messages  \n- **`update.js`** → Sends a `PUT` request to update user details  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthestutirajeev%2Fusersapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthestutirajeev%2Fusersapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthestutirajeev%2Fusersapp/lists"}