Skip to content

UAMonitor - FOSS minecraft monitoring web service originally made for ukrainians

Notifications You must be signed in to change notification settings

Andrmist/uamonitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UAMonitor

UAMonitor - FOSS minecraft monitoring web service originally made for ukrainians

It pings all servers from DB every 10 minutes and writes results into DB (WIP autoremove)

Backend was made using Fastify as framework and Prisma as ORM, Frontend was made using SvelteKit as framework and TailwindCSS.

Install

You can install manually or build docker container

Install manually

# clone repo
git clone https://github.com/Andrmist/uamonitor.git
# move to directory
cd uamonitor
# install depenencies (pnpm recommended)
pnpm install
# or (not tested)
cd backend && npm install
cd ..
cd frontend && npm install
cd ..
# move to backend and build
cd backend
npm run migrate
npm run generate
npm run build
# move to frontend and build
cd frontend
npm run build

Configure

Currently, only way to configure is editing .env file in /backend But you must configure ~.env~ file before start otherwise it won’t work

Start

cd backend
npm start
cd frontend
node ./build

Docker method

Before executing next commands, make sure that you cloned repository and changed values in .env in /backend Also check docker-compose.yml for changing port forwarding and other settings.

docker compose up -d --build --remove-orphans -d backend frontend

API

  • /api/graph Returns graph servers graph data for last 24 hours:
    [
        {
            "id": 3,
            "data": [
                {
                    "isOnline": true, 
                    "onlineCount": 12,
                    "date": "2022-07-06T21:40:00.483Z"
                },
            //...
            ]
        },
        //...
    ]
        
  • /api/servers Returns status of all servers in DB
    [
        {
            "id": 3,
            "name": "Ukraine State",
            "ip": "play.ukr-state.fun",
            "port": "25565",
            "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAvUlEQVR4Xu3RwQnCUBBF0RdjD+6sy/DFAizMGgQ/uksDYoI7+wj63b8UMFwYOJs7u8eoKxVN6xNLDoiWA6LlgGg5IFoOiJYDouWAaDkgWg6IlgOi5YBo6oeKJh3vbDpd2TaHB5r6UtGkcmNbP4VF+/MFTZ9xh6ZlZlN7sek3s+n7ZlN7btHUJjYtU4fmg3C8cbxxvHG8cbxxvHG8cbxxvHG8cbxxvHG8cbxxvHG8cbxxvHG8cbxxvHG8cbxx/nK3aBo18jm7AAAAAElFTkSuQmCC",
            "link": null, // server website link if present
            "discord": "hE6cQXy2Uu", // server discord invite (https://discord.gg/<discord>)
            "telegram": "ukr_state", // server telegram invite (https://t.me/<telegram>)
            "statuses": [
                {
                    "date": "2022-07-06T21:40:00.483Z",
                    "isOnline": true,
                    "onlineCount": 12,
                    "maxOnline": 100,
                    "version": "Purpur 1.18.2"
                }
            ]
        },
        //....
    ]
        
  • /api/servers/<id> Returns server status for server id:
    {
        "id": 3,
        "name": "Ukraine State",
        "ip": "play.ukr-state.fun",
        "port": "25565",
        "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAvUlEQVR4Xu3RwQnCUBBF0RdjD+6sy/DFAizMGgQ/uksDYoI7+wj63b8UMFwYOJs7u8eoKxVN6xNLDoiWA6LlgGg5IFoOiJYDouWAaDkgWg6IlgOi5YBo6oeKJh3vbDpd2TaHB5r6UtGkcmNbP4VF+/MFTZ9xh6ZlZlN7sek3s+n7ZlN7btHUJjYtU4fmg3C8cbxxvHG8cbxxvHG8cbxxvHG8cbxxvHG8cbxxvHG8cbxxvHG8cbxxvHG8cbxx/nK3aBo18jm7AAAAAElFTkSuQmCC",
        "link": null, // server website link if present
        "discord": "hE6cQXy2Uu", // server discord invite (https://discord.gg/<discord>)
        "telegram": "ukr_state", // server telegram invite (https://t.me/<telegram>)
        "statuses": [
            {
                "date": "2022-07-06T21:40:00.483Z",
                "isOnline": true,
                "onlineCount": 12,
                "maxOnline": 100,
                "version": "Purpur 1.18.2"
            }
        ]
    }
        

About

UAMonitor - FOSS minecraft monitoring web service originally made for ukrainians

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Svelte 50.0%
  • TypeScript 35.9%
  • JavaScript 7.6%
  • CSS 3.3%
  • HTML 1.9%
  • Dockerfile 1.1%
  • Shell 0.2%