{"id":26590171,"url":"https://github.com/ruturajjadhav07/customer-order-backend","last_synced_at":"2026-05-09T03:34:05.773Z","repository":{"id":282367945,"uuid":"948322664","full_name":"ruturajjadhav07/Customer-Order-Backend","owner":"ruturajjadhav07","description":"Customer Order Backend is a Spring Boot application that manages customers, orders, products, and payments. It provides APIs for order processing, tracking, and management, ensuring smooth and efficient operations.","archived":false,"fork":false,"pushed_at":"2025-03-28T07:24:43.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T23:24:48.475Z","etag":null,"topics":["backend","backend-api","backend-development","jpa","rest-api","spring","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruturajjadhav07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-14T05:58:24.000Z","updated_at":"2025-03-28T07:24:46.000Z","dependencies_parsed_at":"2025-03-14T08:32:43.370Z","dependency_job_id":"f5b121da-cf45-4b91-96d5-87223934286b","html_url":"https://github.com/ruturajjadhav07/Customer-Order-Backend","commit_stats":null,"previous_names":["ruturajjadhav07/customer-order-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ruturajjadhav07/Customer-Order-Backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruturajjadhav07%2FCustomer-Order-Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruturajjadhav07%2FCustomer-Order-Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruturajjadhav07%2FCustomer-Order-Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruturajjadhav07%2FCustomer-Order-Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruturajjadhav07","download_url":"https://codeload.github.com/ruturajjadhav07/Customer-Order-Backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruturajjadhav07%2FCustomer-Order-Backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32805988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["backend","backend-api","backend-development","jpa","rest-api","spring","spring-boot"],"created_at":"2025-03-23T13:36:05.768Z","updated_at":"2026-05-09T03:34:05.768Z","avatar_url":"https://github.com/ruturajjadhav07.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Customer Order Management System\n\n## 📌 Overview\n\nThis is a backend service for managing customer orders, products, and stock levels. It provides functionalities such as adding products, placing orders, and updating order items with stock validation.\n\n## 🏗️ Tech Stack\n\n- **Backend:** Java, Spring Boot, Spring Security\n- **Database:** MySQL\n- **API Testing:** Postman\n---\n## 🚀 Features\n\n### 🛍️ Product Management (Admin)\n- **Add a new product** 🆕\n- **Update product details** ✏️\n- **Delete products** ❌\n\n### 🔍 Product Search \u0026 Filtering (Public)\n- **View all products** 📋\n- **Filter products by category** 📂\n- **Filter products by price range** 💰\n- **Search products by name** 🔎\n- **Check stock quantity of a product** 📦\n\n### 🛡️ Security \u0026 Authentication\n- **Role-based access control (RBAC)** 🔑\n- **Admin-only routes for product management** 👨‍💼\n---\n\n## 📦 Project Setup\n### 🔧 Prerequisites\n\n1. Install **Java 17+**\n2. Install **MySQL**\n3. Install **Postman** (for API testing)\n\n### 🛠️ Installation Steps\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/ruturajjadhav07/Customer-Order-Backend.git\n   cd Customer-Order-Backend\n   ```\n2. **Configure Database:**\n   - Create a **MySQL database** named `order_cart`.\n   - Update `application.properties` with your **database credentials**.\n   ```bash\n   spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver\n   spring.datasource.url=jdbc:mysql://localhost:3306/order_cart\n   spring.datasource.username=username\n   spring.datasource.password=password\n   spring.jpa.show-sql=true\n   spring.jpa.hibernate.ddl-auto=update\n   ```\n3. **Run the application:**\n   ```bash\n   mvn spring-boot:run\n   ```\n\n4. **Build \u0026 Run the Application**\n   ```sh\n   mvn spring-boot:run\n   ```\n---\n## 🔥 API Endpoints\n### **Customer APIs**\n- `POST /register` → Register a new customer  \n- `POST /login` → Login customer  \n- `GET /customer/{id}` → Get customer details (only for logged-in user)  \n- `PUT /customer/update/{id}` → Update customer details (only for logged-in user)  \n- `DELETE /customer/delete/{id}` → Delete customer (only for logged-in user)  \n- `GET /admin/customers` → Get all customers (only for Admins)  \n\n### **Order APIs**\n- `POST /customer/order` → Place an order  \n- `GET /customer/orders/{id}` → Get order details by ID  \n- `GET /customer/orders/{customerId}/orders` → Get all orders of a specific customer  \n- `DELETE /customer/order/{customerId}/{orderId}` → Delete an order (only for the customer)  \n- `GET /customer/admin/allorders` → Get all orders (only for Admins)  \n\n### **Product APIs**\n- `POST /products/admin/add` → Add a product (only for Admins)  \n- `GET /products` → Get all products  \n- `GET /products/category?category={category}` → Get products by category  \n- `GET /products/price-range?minPrice={min}\u0026maxPrice={max}` → Get products within a price range  \n- `GET /products/search?name={name}` → Search products by name  \n- `GET /products/{id}/quantity` → Check stock quantity of a product  \n- `PUT /products/admin/update/{id}` → Update product details (only for Admins)  \n- `DELETE /products/admin/delete/{id}` → Delete a product (only for Admins)  \n\n### **Order Item APIs**\n- `GET /order-items/{customer_id}/{order_id}/{product_id}` → Fetch order details by user ID  \n- `PUT /order-items/customer/{customerId}/order/{orderId}/orderitem/{orderItemId}/update?addOnQuantity={quantity}` → Update order item quantity  \n---\n## Example Data\n### **Register a Customer**\n**Request:**\n```json\n{\n    \"name\": \"Ruturaj Jadhav\",\n    \"email\": \"ruturajjadhav122@gmail.com\",\n    \"password\": \"*********\",\n    \"address\": \"Pune\",\n    \"phoneNumber\": \"123456789\",\n    \"role\": \"USER\"\n}\n```\n\n### **Login**\n**Request:**\n```json\n{\n    \"email\": \"ruturajjadhav122@gmail.com\",\n    \"password\": \"*********\"\n}\n```\n\n### **Add a Product (Admin Only)**\n**Request:**\n```json\n{\n    \"productName\": \"Laptop\",\n    \"productPrice\": 1200.50,\n    \"productDescription\": \"High-performance laptop\",\n    \"productCategory\": \"Electronics\",\n    \"productQuantity\": 10\n}\n```\n---\n## 📚 Documentation\n- **Spring Boot:** [Official Documentation](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/)\n- **Spring Security:** [Official Documentation](https://docs.spring.io/spring-security/reference/index.html)\n---\n## 📜 License\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/ruturajjadhav07/Customer-Order-Backend/blob/main/LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruturajjadhav07%2Fcustomer-order-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruturajjadhav07%2Fcustomer-order-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruturajjadhav07%2Fcustomer-order-backend/lists"}