This is a useful device management for IT.
| DevOpts | Version |
|---|---|
| OS | Ubuntu 25.04 |
| go | 1.26.2 |
| nodejs | v20.20.0 |
| yarn | 1.22.22 |
| Type | Command |
|---|---|
| Make all | make |
| Backend | make backend |
| Frontend | make frontend |
| Run | make run |
| Tidy | make tidy |
| Lint | make lint |
| Test | make test |
| Docker Image | make docker |
/api
└─/login(POST)
└─/logout(POST)
└─/category(GET, POST)
│ └─/:cate(GET, DELETE)
└─/device(POST)
│ └─/:cate(GET)
│ └─/:cate/:dev(GET, DELETE)
└─/qrcode/:cate/:dev(POST, DELETE)-
Clone the repo & install Docker
git clone https://github.com/Alonza0314/dm-system.git cd dm-system sudo ./docker/install-docker.sh -
Check then config
Admin can modify systemm setting at ./docker/config.yaml, e.g. the default login credential:
username: "admin" password: "0000"
For other setting, please make sure the modification is match the setting at docker-compose.yaml.
-
Up the compose
docker compose up
The default db will be stored at
/var/lib/dm/which is mounted in the compose file. -
Down the compose
docker compose down
In integration-test folder, there provides a test.sh script for test each API with using -t parameter.
cd integration-testNow, there are some tests:
./test.sh -t TestApiAccount
./test.sh -t TestApiCategory
./test.sh -t TestApiDevice
./test.sh -t TestApiQrcode| Collection | Key | Value | Note |
|---|---|---|---|
| ID | category, device |
number | unique ID for category and device |
| category | category_name | Category | category list |
| category-* | device_name | Device | device under target category |
