{"id":23208963,"url":"https://github.com/sebastianserranob/bazaar-management-api","last_synced_at":"2026-04-18T06:33:48.814Z","repository":{"id":268611292,"uuid":"904916789","full_name":"SebastianSerranoB/Bazaar-Management-API","owner":"SebastianSerranoB","description":"A Spring Boot-based RESTful API for a bazaar application, with integrated MySQL database. The project includes CRUD operations for managing products, sales, and customers. It uses Hibernate for ORM and provides a Postman collection for testing endpoints.","archived":false,"fork":false,"pushed_at":"2024-12-17T20:55:03.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T12:09:39.469Z","etag":null,"topics":["hibernate","java","mysql","postman","rest-api","spring-boot","xampp"],"latest_commit_sha":null,"homepage":"","language":"Java","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/SebastianSerranoB.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":"2024-12-17T19:52:10.000Z","updated_at":"2024-12-17T20:59:55.000Z","dependencies_parsed_at":"2024-12-17T21:25:19.179Z","dependency_job_id":"02b5d901-c8a6-4604-bd28-4b216ed2965c","html_url":"https://github.com/SebastianSerranoB/Bazaar-Management-API","commit_stats":null,"previous_names":["sebastianserranob/bazaar-management-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianSerranoB%2FBazaar-Management-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianSerranoB%2FBazaar-Management-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianSerranoB%2FBazaar-Management-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianSerranoB%2FBazaar-Management-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SebastianSerranoB","download_url":"https://codeload.github.com/SebastianSerranoB/Bazaar-Management-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332611,"owners_count":20921853,"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","java","mysql","postman","rest-api","spring-boot","xampp"],"created_at":"2024-12-18T18:13:17.626Z","updated_at":"2026-04-18T06:33:48.778Z","avatar_url":"https://github.com/SebastianSerranoB.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bazaar Management API\nA comprehensive REST API for managing inventory, products, customers, suppliers and sales in a bazaar. \nBuilt using Spring Boot with a standard MVC architecture, this project leverages JPA/Hibernate for data persistence, Bean Validation for input validation, and dependency injection for clean and modular code.\n\n\n## Features\nCRUD Operations: Manage products, customers, suppliers, sales and supply orders.\nAnalytics: Endpoints for sales trends, top-selling products, and revenue summaries.\nRobust Exception Handling: Custom exception handling for clear error reporting.\nFunctional Programming: Utilizes Java Streams for efficient data processing.\n\n## Tech Stack\nSpring Boot: Backend framework.\nJava: Programming language.\nJPA/Hibernate: ORM for database operations.\nMySQL: Compatible with relational databases.\nPostman: API testing and documentation.\n\n\n## Installation\n\nFollow these steps to set up and run the Bazaar Management API on your local machine:\n\nPrerequisites\n- XAMPP: Download and install XAMPP to manage Apache and MySQL.\n- Java: Install JDK 21 or later.\n- Maven: Install Apache Maven for building the application.\n- Postman: Install Postman for API testing.\n\n1) Clone the Repository\n\n2) Start Apache and MySQL Services\n   - Open XAMPP Control Panel.\n   - Start Apache and MySQL services.\n\n3) Import the SQL File\n\n  - Open phpMyAdmin in your browser.\n  - Create a new database (e.g., bazaar_db).\n  - Import the SQL file (sql/bazaar.sql) to set up the database schema and initial data:\n    Go to the \"Import\" tab.\n    Upload the SQL file located in the sql/ folder.\n\n4) Configure application.properties\n\nSince application.properties includes environment variables (such as database credentials), it was not included in the repository for security reasons.\nSet the following environment variables inside an application.properties file:\n\nspring.application.name=app_bazaar\nspring.jpa.hibernate.ddl-auto=update\nspring.datasource.url=${DB_URL}\nspring.datasource.username=${DB_USER_NAME}\nspring.datasource.password=${DB_PASSWORD}\n\n- Create a .env file in the root directory and set the actual values for the environment variables\n   dotenv:\n   DB_URL=jdbc:mysql://localhost:3306/your_database_name\n   DB_USER_NAME=your_db_username\n   DB_PASSWORD=your_db_password\n\n\n5) Import Postman Collection\n\nOpen Postman and import the collection file from the postman/ folder:\nGo to \"File\" \u003e \"Import.\"\nSelect the file bazaar-collection.json.\n\nTest API Endpoints\nUse the imported Postman collection to interact with the API.\n\n\n\n## Endpoints Overview\nHere are some key endpoints from the Postman collection:\n\nProduct\nPOST /product/create: Add a new product.\nGET /product/getAll: Fetch all products.\nGET /product/findOne/{id}: Get product details by ID.\nPUT /product/update: Update product details.\nDELETE /product/delete/{id}: Delete a product by ID.\n\nCustomer\nPOST /customer/create: Add a new customer.\nGET /customer/getAll: Fetch all customers.\nGET /customer/findById/{id}: Get customer details by ID.\nPUT /customer/update: Update customer details.\nDELETE /customer/delete/{id}: Delete a customer by ID.\n\nSales Analytics\nGET /analytics/mostSoldProduct: Get the most sold product within a date range.\nGET /analytics/totalRevenue: Calculate total revenue within a date range.\n\n\n## Future Improvements\nAdd user authentication and authorization.\nImplement a front-end using Angular or React.\nEnhance analytics with more detailed reporting\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianserranob%2Fbazaar-management-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastianserranob%2Fbazaar-management-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianserranob%2Fbazaar-management-api/lists"}