-
Welcome to the Trade Control System (TMS) README. This document provides an overview of the TMS application, its features, installation instructions, and usage guidelines. This project is a Spring Boot application designed to manage product, category, and supplier-related operations in a PostgreSQL database.
The TMS application offers a comprehensive set of features to facilitate effective management of various aspects of your business.
-
Product Management: This tool provides users with the ability to exercise complete authority over their product inventory. It simplifies the processes of product listing, updating, and removal, offering invaluable assistance to businesses aiming to streamline their inventory management.
-
Category Handling: Through this feature, users can easily create, modify, and eliminate product categories. Furthermore, products can be linked with one or multiple categories, streamlining the process of filtering and searching for specific items.
-
Supplier Management: This utility allows businesses to effectively oversee their associations with suppliers. Users can add, revise, or remove supplier details as necessary, and they can conveniently connect products with their relevant suppliers, ensuring swift access to supplier information when required.
-
Data Integrity and Verification: To enhance data precision and reliability, this system incorporates customized validation regulations.
- IDE - Intellij Idea
- JDK - 17
- Spring Web - 2.7.14
- Spring Data Jpa
- Poatgresql
- Mapstruct
- Lombok
- Validation
- Security
- JWT
- Docker
User
- http://localhost:8080/trading/user/registration [POST]
- http://localhost:8080/trading/user/login [POST]
- http://localhost:8080/trading/user/refresh-token [GET]
Category
- http://localhost:8080/trading/category/registration [POST]
- http://localhost:8080/trading/category/all-category [GET]
Supplier
- http://localhost:8080/trading/supplier/registration [POST]
- http://localhost:8080/trading/supplier/all-supplier [GET]
Supplier
- http://localhost:8080/trading/product/registration [POST]
- http://localhost:8080/trading/product/all-product [GET]
- http://localhost:8080/trading/product/{id} [GET]
- http://localhost:8080/trading/product/{id} [PUT]
- http://localhost:8080/trading/product/{id} [DELETE]
Docker
"After completing the project, we can create Docker images of the Postgres and service using the Dockerfile and docker-compose.yml configurations. Then, we deploy them as Docker containers. Finally, we keep the server running within the container."
Security and Jwt
The project is secured using JWT (JSON Web Token) technology. Initially, the user signs up, and during this process, the user is provided with an access token and a refresh token. When the user validates their registration with the email address they provided during the sign-up, the user's account is activated. Until the access token's expiration time (token duration), the user can access API endpoints such as product, supplier, and category. When the access token expires, the user can obtain a new access token by using the login endpoint to refresh their access token.
**User registration**
User refresh-token
User login
Category registration
Product registration
Product Show
**Product Update**
When updating the product, you can modify the desired fields while leaving the others unchanged. For example, in this case, the "price" has been modified.