Skip to content

Alonza0314/dm-system

Repository files navigation

Device Management System

dm-system

This is a useful device management for IT.

Develop Environment

DevOpts Version
OS Ubuntu 25.04
go 1.26.2
nodejs v20.20.0
yarn 1.22.22

Make

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 Level

/api
    └─/login(POST)
    └─/logout(POST)
    └─/category(GET, POST)
    │   └─/:cate(GET, DELETE)
    └─/device(POST)
    │   └─/:cate(GET)
    │   └─/:cate/:dev(GET, DELETE)
    └─/qrcode/:cate/:dev(POST, DELETE)

Install - Docker Compose

  1. Clone the repo & install Docker

    git clone https://github.com/Alonza0314/dm-system.git
    cd dm-system
    sudo ./docker/install-docker.sh
  2. 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.

  3. Up the compose

    docker compose up

    The default db will be stored at /var/lib/dm/ which is mounted in the compose file.

  4. Down the compose

    docker compose down

Integration Test

In integration-test folder, there provides a test.sh script for test each API with using -t parameter.

cd integration-test

Now, there are some tests:

./test.sh -t TestApiAccount
./test.sh -t TestApiCategory
./test.sh -t TestApiDevice
./test.sh -t TestApiQrcode

DB

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

About

A useful Device Management system for IT.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages