Skip to content

KostaD02/monotor

Repository files navigation

Monotor: Open-Source monitoring application.

Table of contents

Introduction

Monotor is a self-hosted application for data monitoring. Initially, the application was designed to be a fitness tracker, but eventually, it became more dynamic, allowing users to create any type of data they want. It could be used for fitness, diet, learning, working, or adding any other type of data.

Features

  • Role-based authorization
  • Generic data display:
    • Chart
      • Desired value reached
      • Mode
      • Avarage
      • Min / Max
    • Calendar
    • Table
  • Admin / Settings panel
  • Light / Dark theme
  • Mobile application (as a PWA)
  • Data backup (coming soon)

Demo

If you want to try MonoTor, a demo is available at [IT_WILL_BE_ADDED_LATER].

Getting started

See instructions to run MonoTor below.

Prerequisites

  • Docker - production (after docker support)
  • npm & mongodb - development (local)

How to set up

The application can be easily set up using Docker Compose.

Docker compose

TODO: add after docker support

Development

First we need to clone repository.

git clone https://github.com/KostaD02/monotor

Then need to install packages:

cd monotor
npm ci

Create .env file inside /apps/server similar to .env.example, for example:

PORT = 2222
HIDE_NEST_LOGS = false
DATABASE_URL = mongodb://127.0.0.1:27017/monotor
JWT_SECRET = 6ad8ec0f2f99c267fd34c916da30286f315ee1af6cfcf400dfcd7d9305a73784
JWT_EXPIRES_IN = 1
FORCE_ADMIN_MODE_ENABLED = true

Note

If you use different PORT than 2222, keep in mind to update same value in libs/shared/consts/src/lib/api.ts

After that we have two script to run in different terminals:

npm run start:server
npm run start:client

Usage

Just open the browser and type ip:port of the machine running MonoTor. First user who registers will be admin role.

Force admin

If you forget password for admin user, you can force server to give you admin permission if it was enabled in .env configuration.

Open webiste create new user (this time remember password 🤷‍♂️) and write following code:

sessionStorage.IDDQD = true;

After writing this code refresh website and your new user will have admin permission. From new user you can set new password on old user.

Screenshots

Check more images inside the screenshots.

Home Dark Home Light Metrics base Metrics add Metrics table Schedule base Calendar base Calendar table Admin base

Project Architecture

The application is built using the Nx.

Contributing

I will add new features when I have time, but you don't have to wait feel free to add them yourself! Fork the project and submit pull requests.

Check more details at contributing page.

To Do

Here are a few ideas that will be implemented in the future. You can also open an issue for any of these ideas.

  • Dockerize
  • Backup support
  • i18n - translations
  • Notifications
  • Write unit tests
  • Extract folder structure