{"id":18153238,"url":"https://github.com/apsarawitharana/aad-assignment-spring-pos-system-backend","last_synced_at":"2026-05-09T14:31:31.950Z","repository":{"id":258288371,"uuid":"871010832","full_name":"ApsaraWitharana/AAD-Assignment-Spring-Pos-System-Backend","owner":"ApsaraWitharana","description":"The POS System Backend is a RESTful API that supports the frontend operations of a Point of Sale system. This backend service manages customer, order, and inventory data, providing essential functionalities such as creating, reading, updating, and deleting records.","archived":false,"fork":false,"pushed_at":"2024-11-25T08:43:42.000Z","size":4682,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T00:52:19.330Z","etag":null,"topics":["api-rest","jpa-hibernate","meven","modelmapper","mysql","spring","tomcat"],"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/ApsaraWitharana.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}},"created_at":"2024-10-11T05:06:08.000Z","updated_at":"2024-11-25T08:43:51.000Z","dependencies_parsed_at":"2024-12-20T12:45:02.699Z","dependency_job_id":"af98d876-f954-4f0b-80c1-792d5a21900d","html_url":"https://github.com/ApsaraWitharana/AAD-Assignment-Spring-Pos-System-Backend","commit_stats":null,"previous_names":["apsarawitharana/aad-assignment-spring-pos-system-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApsaraWitharana%2FAAD-Assignment-Spring-Pos-System-Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApsaraWitharana%2FAAD-Assignment-Spring-Pos-System-Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApsaraWitharana%2FAAD-Assignment-Spring-Pos-System-Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApsaraWitharana%2FAAD-Assignment-Spring-Pos-System-Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ApsaraWitharana","download_url":"https://codeload.github.com/ApsaraWitharana/AAD-Assignment-Spring-Pos-System-Backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247574097,"owners_count":20960495,"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":["api-rest","jpa-hibernate","meven","modelmapper","mysql","spring","tomcat"],"created_at":"2024-11-02T03:06:06.497Z","updated_at":"2026-05-09T14:31:31.892Z","avatar_url":"https://github.com/ApsaraWitharana.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://git.io/typing-svg\"\u003e\n  \u003cimg src=\"https://readme-typing-svg.herokuapp.com?font=Fira+Code\u0026weight=600\u0026size=50\u0026pause=1000\u0026center=true\u0026vCenter=true\u0026color=FFFF00\u0026width=835\u0026height=70\u0026lines=POS+SYSTEM+BACKEND\" alt=\"pos\" /\u003e\n\u003c/a\u003e\n\n# Spring Pos System Backend\n![Java](https://img.shields.io/badge/Java-ED8B00?style=for-the-badge\u0026logo=java\u0026logoColor=white)\n![Spring](https://img.shields.io/badge/Spring-6DB33F?style=for-the-badge\u0026logo=spring\u0026logoColor=white)\n![MySQL](https://img.shields.io/badge/MySQL-4479A1?style=for-the-badge\u0026logo=mysql\u0026logoColor=white)\n![Postman](https://img.shields.io/badge/Postman-FF6C37?style=for-the-badge\u0026logo=postman\u0026logoColor=white)\n![Apache Tomcat](https://img.shields.io/badge/Apache%20Tomcat-F8DC75?style=for-the-badge\u0026logo=apache-tomcat\u0026logoColor=black)\n\n## Project Description\nThe POS System Backend is a RESTful API that supports the frontend operations of a Point of Sale system. This backend service manages customer, order, and inventory data, providing essential functionalities such as creating, reading, updating, and deleting records, and securing endpoints using authentication.\n\n## Table of Contents\n- [Project Description](#project-description)\n- [Features](#features)\n- [Technologies](#technologies)\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Documentation](#api-documentation)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n\n## Features\n- Manage customer records\n- Process orders and track inventory\n- Update item quantities\n- Apply discounts and calculate totals\n- Secure endpoints with authentication\n- Built-in validation for request payloads\n- Loggers for application event tracking\n\n## Technologies\n- **Backend Framework**: Spring Boot, Spring WebMVC\n- **ORM**: Spring Data JPA, Hibernate 6.6.0\n- **Database**: MySQL 8.0.33\n- **Mapping**: ModelMapper 3.2.1\n- **Build Tool**: Maven 4.0.0\n- **Application Server**: Apache Tomcat 10\n- **JDK**: OpenJDK 17\n\n## Installation\n### Prerequisites\n- Java 17 (OpenJDK 17)\n- Maven\n- MySQL 8.0.33\n- Apache Tomcat 10\n\n### Steps\n1. **Clone the repository - Backend**\n    ```bash\n   https://github.com/ApsaraWitharana/AAD-Assignment-Spring-Pos-System-Backend.git\n    ```\n   **Clone the repository - Frontend**\n    ```bash\n   https://github.com/ApsaraWitharana/AAD-Assignment-Spring-Pos-Frontend.git\n    ```\n\n2. **Configure the database**\n    - Create a MySQL database named `pos_system`\n    - Update the `application.properties` file with your MySQL credentials\n   \n    ```properties\n    \n      DriverManagerDataSource dmds = new DriverManagerDataSource();\n      dmds.setDriverClassName(\"com.mysql.cj.jdbc.Driver\");\n      dmds.setUrl(\"jdbc:mysql://localhost:3306/pos_spring?createDatabaseIfNotExist=true\");\n      dmds.setUsername(\"your_username\");\n      dmds.setPassword(\"your_password\"); \n      return dmds;\n    ```\n\n3. **Build the project**\n    ```bash\n    mvn clean install\n    ```\n\n4. **Deploy to Tomcat**\n    - Ensure Tomcat is installed and running.\n    - Copy the generated WAR file from the `target` directory to the Tomcat `webapps` directory.\n    - Restart Tomcat.\n\n## Usage\n### Running the Server\nAfter installation, run the server by starting Tomcat. The API will be available at `http://localhost:8080/`.\n\n## Project Structure\n\n### Back-end\n\nThe back-end code is organized to follow best practices and maintainability. Important directories and files include:\n\n- `src/main/java`: Contains Java classes.\n- `src/main/resources/schema`: Database schema.\n- `src/main/resources/logback-spring.xml`: Logger configuration.\n- `src/main/webapp/WEB-INF/`: Configuration files for the JavaEE application.\n\n#### Project Packages\n\n(src/main/java/lk.ijse.gdse68/pos_system_back_end)\n\n- **config**: Contains configuration classes, such as security filters and logging filters, responsible for setting up the security mechanisms (e.g., JWT filters) and logging functionality across the application.\n- **controller**: Contains classes defining the API endpoints and services.\n- **sevice**: Business Objects - classes that encapsulate business logic.\n- **dao**: Data Access Objects - classes responsible for database interactions.\n- **entity**: Entity classes representing database tables.\n- **dto**: Data Transfer Objects - classes used for data exchange between layers.\n- **exception**: Contains custom exception classes that handle different types of errors throughout the application..\n- **customObject**: Contains custom object classes, which are utility classes or specific objects that don’t necessarily fit into other categories. .\n- **util**: Utility classes that provide common functionalities or helper methods used across the application..\n\n\n## Getting Started\n\nTo set up and run the POS system locally, follow these steps:\n\n1. Clone the repository.  \n2. Set up the back-end dependencies.  \n3. Configure the database connection.  \n4. Deploy the JavaEE application on the Apache Tomcat server.\n\n## Dependencies\n\n#### Back-end\n\n- **Spring Boot 3.3.3**: Used for building and deploying the POS system as a RESTful API.\n- **Spring Data JPA 3.3.3**: Provides JPA support for database interaction.\n- **Hibernate 6.6.0**: Object-relational mapping tool to manage database entities.\n- **ModelMapper 3.2.1**: Framework for mapping between object models.\n- **Spring WebMVC**: Handles the HTTP requests and responses.\n\n#### Database\n\n- **MySQL Connector**: Java-based driver for connecting to MySQL databases. (Version 8.0.33)\n- **JNDI**: Java API for managing database connections efficiently through connection pooling, enhancing performance and scalability.\n\n#### Development Tools\n\n- **Maven 4.0.0**: Build automation and project management tool.\n- **Logback**: Logging framework for logging application events.\n\n### Accessing the API\nThe API will be available at `http://localhost:8080/`.\n\n## API Documentation\nFor detailed API documentation, please refer to the project’s Swagger UI and Postman collections.\n\n- **Customer API documentation URL**: [Postman Customer API Documentation](https://documenter.getpostman.com/view/35385905/2sAXxTaqKz)\n- **Item API documentation URL**: [Postman Item API Documentation](https://documenter.getpostman.com/view/35385905/2sAXxTaqL2)\n- **Order API documentation URL**: [Postman Order API Documentation](https://documenter.getpostman.com/view/35385905/2sAXxTaqL3)\n- \n## License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n\u003cdiv align=\"center\"\u003e\n\n#### This project is licensed under the [MIT License](LICENSE)\n\n#### © 2024 All Right Reserved, Designed By [Sachini Apsara](https://github.com/ApsaraWitharana)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsarawitharana%2Faad-assignment-spring-pos-system-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapsarawitharana%2Faad-assignment-spring-pos-system-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsarawitharana%2Faad-assignment-spring-pos-system-backend/lists"}