Git Product home page Git Product logo

timoa / chrome-tab-rotate-server Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 2.0 2.11 MB

A Webserver that provides the config/contents for the chrome-tab-rotate Chrome extension

Home Page: https://timoa.com

License: MIT License

JavaScript 90.43% Dockerfile 6.93% Shell 2.65%
chrome chrome-browser server configuration content api nodejs digital-signage chrome-tab chrome-extension managed-by-terraform

chrome-tab-rotate-server's Introduction

Chrome-tab-rotate Webserver

Latest Release Build Status Docker Pulls

Quality Gate Status Security Rating Maintainability Rating

Bugs Code Smells Coverage Duplicated Lines (%)

A Webserver that provides the config/contents for the Tab Rotate Chrome extension.

The Chrome extension is open-source as chrome-tab-rotate.

This project is part of a bigger project called ScreenKit that includes the use of Raspberry PI, Chilipie Kiosk (Linux OS) that starts Chromium in fullscreen and other features, the Tab Rotate Chrome extension and this project that manage the contents and screens.

Features

  • Simple way to rotate contents on multiple screens!
  • Allow to use multiple Chrome Tab Rotate config files (playlists)
  • Webserver (Fastify) that can serves playlists and local contents (images, videos, etc.)
  • Default playlist for new screens or for using the same content on all the screens
  • Custom playlist based on the IP of the screen (support also local proxy server)
  • Available as a Docker image or by using npm/pm2

Warning

This project is meant to be use on a private network and not hosted on Internet.

Currently, there is no authentication, that mean that anyone in your local network can access to the playlist(s). Don't include any credential (Basic Auth or token) under your URLs if you want to keep them secret.

Also don't add content that needs to stay private for the same reason.

How to start

Docker image

Default with demo contents

The simplest way to test this project is by using Docker. The command below will launch the server with the demo contents from the src/examples/default.json playlist.

docker-compose up

Now, you can see the Playlist (JSON format) from your browser or command line at http://localhost:9000

curl http://localhost:9000

Customize with your own contents and screens

Simply copy the config files from the src/examples folder to the config folder (root of the project) and update these JSON files:

From To
src/examples/inventory.json => config/inventory.json
src/examples/playlists/default.json => config/playlists/default.json

If you want to have a specific playlist per screen, just create a playlist that will use the screen name that you filled on the inventory file.

For example, if you have the monitoring-01 and monitoring-02 in your your inventory.json file like this:

{
  "screens": [
    {
      "name": "monitoring-01",
      "ip": "10.0.0.11"
    },
    {
      "name": "monitoring-02",
      "ip": "10.0.0.12"
    }
  ]
}

You can create a playlist for each, by naming the file like this:

config/playlists/monitoring-01.json config/playlists/monitoring-02.json

Now, restart the Docker container to see the changes:

docker-compose down
docker-compose up
curl http://localhost:9000

Configure the Tab Rotate Chrome extension

Now that you have a web server up and running, you can set the options of the Tab Rotate Chrome extension to Remote Url and use:

  • http://localhost:9000 if the webserver is running on the same host as your Chrome browser
  • http://{ip of your webserver}:9000 if you're using a different host to test the Chrome Extension

Tab Rotate Chrome extension options

API Endpoints

Name Method Endpoint Description
Playlist GET / Provides the playlist based on the IP that request the endpoint or the default one
Content GET /content/:path Serve the local content from the path from the /public folder
Healthcheck GET /_health Allow to perform a healthcheck to see if the app is still live

Tests

API

You can launch the Docker container or node.js app and test the endpoints with Postman:

Run in Postman

NPM

Unit-tests

npm test

Coverage

npm run test:coverage

Functional

npm run test:functional

Will be replace by chai-http soon.

TODO

  • Split screen configuration and playlist
  • Add an endpoint to get random content from a folder (images for ex.)
  • Allow to edit the playlists and screens via a CMS instead of JSON files
  • Allow to schedule specific content (JIRA board during morning standup for ex.)
  • Support multiple playlists for the same IP (2x HDMI on the RPi 4 for ex.)

chrome-tab-rotate-server's People

Contributors

dependabot[bot] avatar renovate-bot avatar renovate[bot] avatar semantic-release-bot avatar snyk-bot avatar timoa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jjessuuss

chrome-tab-rotate-server's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Found renovate config warnings

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • chore(deps): update actions/checkout action to v4
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update cycjimmy/semantic-release-action action to v4
  • chore(deps): update dependency chai to v5
  • chore(deps): update dependency espree to v10
  • chore(deps): update dependency node to v20
  • chore(deps): update dependency semantic-release to v23
  • chore(deps): update docker/build-push-action action to v5
  • chore(deps): update docker/login-action action to v3
  • chore(deps): update docker/metadata-action action to v5
  • chore(deps): update docker/setup-buildx-action action to v3
  • chore(deps): update docker/setup-qemu-action action to v3
  • chore(deps): update github artifact actions to v4 (major) (actions/download-artifact, actions/upload-artifact)
  • chore(deps): update github/codeql-action action to v3
  • chore(deps): update linters to v9 (major) (eslint, eslint-config-prettier)
  • chore(deps): update npm to v10
  • fix(deps): update dependency @fastify/helmet to v11
  • fix(deps): update dependency @hapi/boom to v10
  • fix(deps): update dependency uuid to v9
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • chore(deps): update dependency eslint-plugin-react-hooks to v4.6.2
  • chore(deps): update github/codeql-action action to v2.25.3
  • chore(deps): update reviewdog/action-eslint action to v1.24.0
  • chore(deps): update reviewdog/action-hadolint action to v1.41.1

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
  • timoa/chrome-tab-rotate-server latest@sha256:64cc927c457893a8efe35d4be465374752ed1420109bebc32a173f19d56d295f
dockerfile
Dockerfile
  • node 18.19.0-alpine3.17@sha256:6239c8a63890ed145ae719574112bc2e37e839a56323bef8d292a579102cdfc2
github-actions
.github/workflows/code-review.yml
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • reviewdog/action-eslint v1.23.0@b3c5aa2589ed06195b52faffd3afb108c02faaf5
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • reviewdog/action-hadolint v1.40.0@1df236257be15d55dc80d2c08689f4f2a884d5d8
.github/workflows/codeql-analysis.yml
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • github/codeql-action v2.25.1@e949a1676c32f4c215780f7429eb9f00ff18b225
  • github/codeql-action v2.25.1@e949a1676c32f4c215780f7429eb9f00ff18b225
  • github/codeql-action v2.25.1@e949a1676c32f4c215780f7429eb9f00ff18b225
.github/workflows/nodejs.yml
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • actions/setup-node v3.8.2@1a4442cacd436585916779262731d5b162bc6ec7
  • actions/upload-artifact v3.1.3@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • actions/download-artifact v3.0.2@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
  • sonarsource/sonarcloud-github-action master
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • ShiftLeftSecurity/scan-action master
  • actions/upload-artifact v3.1.3@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • actions/setup-node v3.8.2@1a4442cacd436585916779262731d5b162bc6ec7
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • actions/setup-node v3.8.2@1a4442cacd436585916779262731d5b162bc6ec7
  • zaproxy/action-full-scan v0.10.0@d2a07475d467566c9a3e3c700f31f47724aa1060
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • cycjimmy/semantic-release-action v3.4.2@8e58d20d0f6c8773181f43eb74d6a05e3099571d
  • step-security/harden-runner 9ff9d14760a73102d9fa2f47131624137f50ead8
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • docker/metadata-action v4.6.0@818d4b7b91585d195f67373fd9cb0332e31a7175
  • docker/setup-qemu-action v2.2.0@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7
  • docker/setup-buildx-action v2.10.0@885d1462b80bc1c1c7f0b00334ad271f09369c55
  • docker/login-action v2.2.0@465a07811f14bebb1938fbed4728c6a1ff8901fc
  • docker/build-push-action v3.3.1@1104d471370f9806843c095c1db02b5a90c5f8b6
npm
package.json
  • @fastify/helmet 10.1.1
  • @fastify/swagger 8.14.0
  • @hapi/boom 9.1.4
  • fastify 4.26.2
  • fastify-healthcheck 4.4.0
  • http 0.0.0
  • lodash 4.17.21
  • uuid 8.3.2
  • winston 3.13.0
  • acorn 8.11.3
  • acorn-jsx 5.3.2
  • chai 4.4.1
  • chai-http 4.4.0
  • eslint 8.57.0
  • eslint-config-airbnb 19.0.4
  • eslint-config-prettier 4.3.0
  • eslint-plugin-import 2.29.1
  • eslint-plugin-jsx-a11y 6.8.0
  • eslint-plugin-react 7.34.1
  • eslint-plugin-react-hooks 4.6.0
  • espree 9.6.1
  • mocha 10.4.0
  • npm-run-all 4.1.5
  • nyc 15.1.0
  • request 2.88.2
  • semantic-release 20.1.3
  • node >=18.0
  • npm >=8.6.0
nvm
.nvmrc
  • node 18

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.