Skip to content

Gr3gorywolf/HardWatch-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HardWatch Client Logo

HardWatch Server

GitHub release downloads Pipeline Status GitHub last commit GitHub release (latest by date)

Overview

HardWatch Server is an NX monorepo containing both the backend and frontend applications required to run the HardWatch monitoring system.

Project Structure

HardWatch-server/
│── apps/
│   │── backend/      # Node.js backend server
│   │── frontend/     # React frontend with Tailwind
│── libs/             # Shared libraries
│── dist/             # Compiled output
│── docker/           # Docker configurations
│── config.json       # Server configuration
│── package.json      # Project dependencies
│── nx.json           # NX monorepo configuration

Components

Backend

  • Receives and processes information from HardWatch Clients.
  • Exposes data via a REST API with authentication.
  • Hosts a WebSocket server to track device availability and execute real-time actions.

Frontend

  • A React + Tailwind web dashboard displaying connected devices and their stats.
  • Can be served from the backend or a CDN.

Installation

Running from Release

If you plan to host the app on linux/macos you can run this script that will assist you during the installation process

bash <(curl -s https://raw.githubusercontent.com/Gr3gorywolf/multi-devices-monitor/main/scripts/release-install.sh)

Alternatively you can download the latest release from the Releases page. This includes prebuilt binaries, so you only need to install dependencies and run:

npm install && node main.js

Running from Source

There are multiple ways to run HardWatch Server from source:

Using Docker

# Clone the repository
git clone https://github.com/Gr3gorywolf/HardWatch-server.git
cd HardWatch-server

# Build and run the server
docker-compose up -d --build

Without Docker

# Install dependencies
pnpm install

# Build the project
npm run build

# Run the backend
node dist/main.js

Configuration

Before running the server, ensure you have a config.json file in the root directory with the following format:

{
    "appKey": "<Your App Key>",
    "useFrontendCdn": false
}

Configuration Parameters

Parameter Description
appKey Authentication key for the server.
useFrontendCdn If true, the backend will serve the precompiled frontend from the latest release. If false, it will serve the local frontend.

Development

For local development, clone the repository and run:

git clone https://github.com/Gr3gorywolf/HardWatch-server.git
cd HardWatch-server
pnpm install && npm run dev

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Links

About

HardWatch frontend & backend monorepo

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors