# @marsxklink/backend-common

> K-Link's Backend's common / globally shared and reusable things including: Models, Libs, Configs / Constants, etc

Latest version **1.23.7** (published 2026-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @marsxklink/backend-common
pnpm add @marsxklink/backend-common
yarn add @marsxklink/backend-common
bun add @marsxklink/backend-common
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.23.7 |
| Published | 2026-04-29 |
| First published | 2021-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 345.4 KB |
| Known vulnerabilities | 0 (+33 in 3 direct dependencies) |
| Install scripts | no |
| Author | Oka Prinarjaya |
| Maintainers | klink-kmart |

## Links

- npm: https://www.npmjs.com/package/@marsxklink/backend-common
- Repository: https://github.com/MarsXKLink/backend-common
- Homepage: https://github.com/MarsXKLink/backend-common#readme
- Issues: https://github.com/MarsXKLink/backend-common/issues
- npm.io page: https://npm.io/package/@marsxklink/backend-common

## Dependencies (14)

- [qs](https://npm.io/package/qs.md) ^6.10.1
- [axios](https://npm.io/package/axios.md) ^0.21.1
- [dayjs](https://npm.io/package/dayjs.md) ^1.10.6
- [ksuid](https://npm.io/package/ksuid.md) ^2.0.0
- [redis](https://npm.io/package/redis.md) ^3.1.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.20
- [mysql2](https://npm.io/package/mysql2.md) ^2.2.5
- [hashids](https://npm.io/package/hashids.md) ^2.2.8
- [winston](https://npm.io/package/winston.md) ^3.3.3
- [sequelize](https://npm.io/package/sequelize.md) ^6.6.5
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1
- [winston-cloudwatch](https://npm.io/package/winston-cloudwatch.md) ^2.5.2
- [sequelize-nested-set](https://npm.io/package/sequelize-nested-set.md) ^1.5.1
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) ^7.13.0

## Recent versions

- 1.23.7 (latest) — 2026-04-29
- 1.23.6 — 2026-02-27
- 1.23.5 — 2026-02-20
- 1.23.4 — 2026-02-20
- 1.23.3 — 2026-02-20
- 1.23.2 — 2026-02-20
- 1.23.1 — 2026-02-20
- 1.23.0 — 2026-02-20
- 1.22.6 — 2025-12-18
- 1.22.5 — 2025-12-12
- 1.22.4 — 2025-12-04
- 1.22.3 — 2025-12-04
- 1.22.2 — 2025-06-19
- 1.22.1 — 2025-06-03
- 1.21.12 — 2024-08-27
- … 31 more at https://npm.io/package/@marsxklink/backend-common/versions

## README

# Backend Common

Common / globally shared and reusable things including: Models, Fns, Config / Constants, etc

## How to install this package

Every developer that want to install (not publishing) this package just need to run command `npm install @marsxklink/backend-common` to install
this package.

## How to publish new version of this package

Every developer that want to publish new version of this package must add k-link's npm account into their local machine. And we recommend that this
package should be maintained by one delegated developer. So we can easily track the changes and publishing centralized in only one person. And please
note that adding k-link's npm account only needs to be performed once.

And this published package should only used for production deployment. We recommend to use `npm link`, `npm unlink` command strategy to use
in daily development. We will explain it in other section of this README.

So for the first step, add k-link's npm account into your local machine by run command: `npm adduser` and you will prompted some information input
as below:

```raw
[user@hostname]$ npm adduser
[npm notice] Log in on https://registry.npmjs.org/
Username: <username>
Password: <password>
Email: (this IS public) akun.it.dnm@gmail.com
Logged in as <username> on https://registry.npmjs.org/.
```

And please note that adding k-link's npm account only needs to be performed once. Next, follow these steps below:
- `git pull` your latest changes. We recommend do it in `master` branch.
- Open file `package.json` then increase version of this package via `version` attribute.
- Run `npm publish --access public` to publish the package.
- Then we recommend to sync `master` branch to `development` branch.

## How to use / interact with this package in daily development

You will be tired if you do publish for every changes that the team made to use / consume changes of this package. So we recommend you to use
`npm uninstall`, `npm unlink` and `npm link` command strategy. NPM have ability to share usage of a package locally without publishing to npm server.

For example, We will show you how to use `backend-common` project in `klink-backend-order-service` project. Follow these steps below:
1. Provide a special directory to work on `klink-backend-order-service` project. For example, let's say your working directory at `/home/developer1/Kmart-Project`
2. At your working directory, clone `klink-backend-order-service` project.
3. Also at your working directory, clone `backend-common` project.
4. `cd backend-common`
5. `git pull origin development` run this inside `backend-common` project directory
6. `npm install` run this inside `backend-common` project directory
7. `npm link` run this inside `backend-common` project directory
8. `cd ..` , `cd klink-backend-order-service`
9. Do these commands inside `klink-backend-order-service` project directory
   - `npm uninstall @marsxklink/backend-common`
   - `npm unlink @marsxklink/backend-common`
   - `npm link @marsxklink/backend-common`
10. Then validate the results by run command: `npm run start:dev`
11. Repeat step number 5 if there are any new changes in `backend-common` project.
12. And do not forget to run `npm install @marsxklink/backend-common` if you are ready to push your work to project's remote repository.
13. Repeat step number 8 if you continue to work on `klink-backend-order-service` project.

You need to clone `backend-common` only once inside your working directory. This example working directory below will make it more clear

```raw
├── 📂 Working_Directory/
├────── 📂 backend-common/
├────── 📂 klink-backend-order-service/
├────── 📂 klink-backend-product-service/
├────── 📂 klink-backend-user-service/
├────── 📂 klink-backend-scheduler-n-queue/
```

---
_Source: https://npm.io/package/@marsxklink/backend-common · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
