This repository is a public archive of the project in a team of 5 members in the subject SWP391 - Software Project at FPT University. The original repository is available here: https://gitlab.com/dunghahe181529/warehouse-management
You need to install all of these before continuing:
- Clone the repository
git clone https://gitlab.com/dunghahe181529/warehouse-management.git
- Change directory
cd warehouse-management
- Config git to use the correct username and email
git config user.name <your-username> # replace <your-username> with your actual username on GitLab
git config user.email <your-email> # replace <your-email> with your actual email on GitLab
⚠️ Warning: Do not use the--global
flag, as it will change the global configuration for all repositories.
- Install Node.js dependencies for
Husky
, andlint-staged
(used for running Prettier before committing)
npm ci
📝 Note: If formatter does not work when committing, running the above command can help
-
Create a configuration file, named
application-dev.yml
, place it atsrc/resources/
. The content of this file should follow the example file (application-dev-example.yml
) -
Run the application (all the libraries will be installed automatically in first time run)
mvn spring-boot:run
- Open your browser and navigate to
http://localhost:8080
This project includes the following libraries:
- Spring Boot
- Spring Web
- Spring Security: handling authentication and authorization
- Spring Data JPA: creating entities and repositories
- Spring DevTools
- Lombok: generating boilerplate code (constructor, getter, setter, etc.)
- Thymeleaf: view template engine
- MySQL Connector J: MySQL database driver
- Prettier Maven Plugin: code formatting
- Husky: managing Git hooks (require Node.js)
After following all the steps from getting started section, your project folder should look like this:
├── .husky/
├── .mvn/
├── node_modules/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── swp391/
│ │ │ └── warehouse_management/
│ │ │ ├── common/
│ │ │ ├── configs/
│ │ │ ├── controllers/
│ │ │ ├── dtos/
│ │ │ ├── entities/
│ │ │ ├── filters/
│ │ │ ├── repositories/
│ │ │ ├── services/
│ │ │ ├── utils/
│ │ │ └── WarehouseManagementApplication.java
│ │ └── resources/
│ │ ├── template/
│ │ ├── application-dev-example.yml
│ │ ├── application-dev.yml
│ │ └── application.yml
│ └── test
├── target/
├── .gitignore
├── .prettierrc.yml
├── package.json
├── package-lock.json
├── pom.xml
└── README.md
.husky/
: contains the configuration for Husky, a tool that helps to manage Git hooks. In this project, it is used to run Prettier to format the code before committing (DO NOT EDIT)..mvn/
: contains the configuration for Maven (DO NOT EDIT).node_modules/
: contains all the Node.js dependencies, in this case, there's only dependencies for Husky (DO NOT EDIT).src/main/java/com/swp391/warehouse_management/
: contains all the Java source code.common/
: contains common classes and interfaces, used in various places.configs/
: contains configuration classes, used on the startup of application.controllers/
: contains controller classes, which handle all HTTP requests and responses.dtos/
: contains DTO (Data Transfer Object) classes.entities/
: contains entity classes, which represent the schema for SQL tables.filters/
: contains filter classes, which intercept the HTTP requests and responses.repositories/
: contains repository classes, which query data from database.services/
: contains service classes, which handles business logic.utils/
: contains utility classes, which includes reusable helper function.WarehouseManagementApplication.java
: the main class (entry point) of the application.
src/main/resources/
: contains all the resources.template/
: contains Thymeleaf template files (in HTML).application-dev-example.yml
: an example configuration file for development environment (DO NOT EDIT).application-dev.yml
: the configuration file for development environment.application.yml
: the main configuration file (DO NOT EDIT).
src/test/
: contains all the test classes.target/
: contains all the compiled classes and resources (DO NOT EDIT)..gitignore
: contains the list of files and folders that should be ignored by Git (DO NOT EDIT)..prettierrc.yml
: contains the configuration for Prettier (DO NOT EDIT).package.json
: contains the list of Node.js dependencies (DO NOT EDIT).package-lock.json
: contains the list of Node.js dependencies with specific version (DO NOT EDIT).pom.xml
: contains the configuration for Maven (DO NOT EDIT).README.md
: the file you are reading right now.
This project is licensed under The Unlicense - see the LICENSE file for details.